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

Reply via email to