Bug #12600 Inserting into LONGTEXT gives strange error message
Submitted: 16 Aug 2005 14:30 Modified: 14 Sep 2005 15:42
Reporter: Hakan Küçükyılmaz Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:5.0.12 OS:Linux (Linux)
Assigned to: Alexander Barkov CPU Architecture:Any

[16 Aug 2005 14:30] Hakan Küçükyılmaz
Description:
Inserting into LONGTEXT gives strange error message if field is set to utf8.

How to repeat:
DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a longtext);
INSERT INTO t1 VALUES (0xef87b1f48fbfbff0908080c3bcd098e4b880ec9a81);

ALTER TABLE t1 MODIFY a longtext character set utf8;
INSERT INTO t1 VALUES (0xef87b1f48fbfbff0908080c3bcd098e4b880ec9a81);

5.0.12-beta-debug-log
[16:08] root@test>INSERT INTO t1 VALUES (0xef87b1f48fbfbff0908080c3bcd098e4b880ec9a81);
ERROR 1406 (22001): Data too long for column 'a' at row 1
[16 Aug 2005 14:31] Hakan Küçükyılmaz
SQL mode is
sql_mode="ANSI_QUOTES,NO_BACKSLASH_ESCAPES,TRADITIONAL,IGNORE_SPACE"
[16 Aug 2005 15:25] MySQL Verification Team
mysql> INSERT INTO t1 VALUES (0xef87b1f48fbfbff0908080c3bcd098e4b880ec9a81);
ERROR 1406 (22001): Data too long for column 'a' at row 1
[17 Aug 2005 1:27] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/28363
[29 Aug 2005 10:43] Alexander Barkov
Duplicate with bug#9337