utf-8 produces "Data too long for column" erroneously
Posted by: Richard Shea
Date: July 03, 2006 09:50PM

Hi - I'm hoping someone can explain the status of an existing bug for me.

There is a bug logged ...

http://bugs.mysql.com/bug.php?id=18908

... which I believe I am experiencing as well. However I am not on Windows (which seems to be what the comments on that bug suggest it is restricted to).

I can create the bug with the following script ...

DROP TABLE IF EXISTS TBL_UTF8BUGTEST;
CREATE TABLE `TBL_UTF8BUGTEST` (`alty_desc` varchar(150) NOT NULL default '') ENGINE=InnoDB DEFAULT CHARSET=utf8;
SET NAMES utf8;
/*!40000 ALTER TABLE TBL_UTF8BUGTEST DISABLE KEYS */;
INSERT INTO TBL_UTF8BUGTEST VALUES ('Albarino');
INSERT INTO TBL_UTF8BUGTEST VALUES ('Côte Rôtie');


... and the output looks like this ...

localhost ~/src/sql $ mysql --user=wxyzdba --password=123 wxyzlearn
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3393 to server version: 5.0.18-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> source testutf8bug.sql
Query OK, 0 rows affected (0.01 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 1 row affected (0.00 sec)

ERROR 1406 (22001): Data too long for column 'alty_desc' at row 1
mysql> status
--------------
mysql Ver 14.12 Distrib 5.0.18, for pc-linux-gnu (i686) using readline 5.0

Connection id: 3393
Current database: wxyzlearn
Current user: wxyzdba@localhost
SSL: Not in use
Current pager: /usr/bin/less
Using outfile: ''
Using delimiter: ;
Server version: 5.0.18-log
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /var/run/mysqld/mysqld.sock
Uptime: 19 days 4 hours 51 min 26 sec

Threads: 4 Questions: 119182 Slow queries: 0 Opens: 53 Flush tables: 1 Open tables: 64 Queries per second avg: 0.072
--------------


What I'd like to know is in which release is this resolved. If it's not resolved what sort of workaround is there. Also should I log this as a new bug given the old one seems to be limited to Windows ?

thanks

Richard.

Options: ReplyQuote


Subject
Views
Written By
Posted
utf-8 produces "Data too long for column" erroneously
2843
July 03, 2006 09:50PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.