It is a character set conflict between the source of the data and the
column. I run into this all of the time when using the CLI. Programmatically
it can be avoided.

Regards,
 
Jerry Schwartz
The Infoshop by Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
 
860.674.8796 / FAX: 860.674.8341
 
www.the-infoshop.com
www.giiexpress.com
www.etudes-marche.com


>-----Original Message-----
>From: Roland Kaber [mailto:[EMAIL PROTECTED]
>Sent: Thursday, September 04, 2008 4:21 PM
>To: mysql@lists.mysql.com
>Subject: Erro 1406 Data too long
>
>Hello
>
>I recently encountered the following problem. I changed the sql mode to
>TRADITIONAL recently. Here is a test table for demonstration purposes.
>
>CREATE TABLE `text_t` (
>  `t` text collate latin1_general_cs
>) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs
>
>The following INSERT returns: error 1406 Data too long for column 't';
>INSERT INTO text_t (t) values ('©')
>
>Why? A single character can't be too long.
>
>After executing INSERT IGNORE INTO text_t (t) values ('©'), the special
>character '©' is inserted with a warning that the string had to be
>truncated?
>
>I then changed sql_mode again: SET sql_mode = ''. Thereafter the initial
>INSERT worked correctly.
>
>A few additional remarks:
>
>    * The special character seems to be part of the problem. Any normal
>      character works fine.
>    * The problem occured on my local server, MySQL version 5.0.37.
>    * I run a MAC book pro.
>    * I issued the same statements to a MySQL server on a Windows XP
>      machine. The problem simply didn't occur even in traditional sql
>mode.
>
>Do you understand what is going on? Could it be a bug?
>Thank you in advance for any help you can offer.
>
>Roland K




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to