utf8 char accounting failure on inserts

Bug #643495 reported by Andrew Hutchings
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Invalid
High
Andrew Hutchings
7.0
Invalid
High
Andrew Hutchings

Bug Description

drizzle> create table t1 (a int, b varchar(255));
Query OK, 0 rows affected (0.16 sec)

drizzle> insert into t1 values (1, 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin at metus in mauris consectetur hendrerit. Donec nec nulla mauris, ut adipiscing augue. Donec eu lorem at felis malesuada tristique quis sit amet arcu. Morbi hendrerit cursus lectus et posuere. ');
ERROR 1406 (22001): Data too long for column 'b' at row 1

drizzle> insert into t1 values (1, 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin at metus in mauris consectetur hendrerit. Donec nec nulla mauris, ut adipiscing augue. Donec eu lorem at felis malesuada tristique quis sit amet arcu. Morbi hendrerit cursus lectus et posuere.');
Query OK, 1 row affected (0.08 sec)

Note that it is blocking inserts longer that 255 bytes rather than 255 characters (the first insert has an extra space at the end making it 256 characters).

Changed in drizzle:
assignee: nobody → Andrew Hutchings (linuxjedi)
milestone: none → 2010-10-11
status: New → Triaged
Revision history for this message
Andrew Hutchings (linuxjedi) wrote :

grr... really silly of me, !bug

Changed in drizzle:
status: Triaged → Invalid
Revision history for this message
Andrew Hutchings (linuxjedi) wrote :

data source I used said it was giving my 256bytes utf8. Like a fool I believed it without trying to count it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.