Bug #26626 mysql Error: "Warning | 1265 | Data truncated for column '"
Submitted: 25 Feb 2007 23:03 Modified: 27 Apr 2008 7:29
Reporter: dennismoore@dodgeit.com dennismoore@dodgeit.com Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Data Types Severity:S3 (Non-critical)
Version:5.0.26, 5.0.44 OS:Linux (Linux, Gentoo)
Assigned to: Sveta Smirnova CPU Architecture:Any
Tags: data types, text

[25 Feb 2007 23:03] dennismoore@dodgeit.com dennismoore@dodgeit.com
Description:
I have a table with structure:

DROP TABLE IF EXISTS `syslog`;
CREATE TABLE `syslog` (
`date` datetime NOT NULL default '0000-00-00 00:00:00',
`host` varchar(128) default NULL,
`date_logged` datetime NOT NULL default '0000-00-00 00:00:00',
`message` text,
`id` int(10) unsigned NOT NULL auto_increment,
`analized` tinyint(2) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
KEY `analized` (`analized`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

When I try to insert:

mysql> INSERT INTO syslog (date, date_logged, host, message) VALUES ('2007-02-25 23:00', '2007-02-25 23:00', 'host', 'prova amb acc ´ FFFFFFFFFFFFFFF');
Query OK, 1 row affected, 1 warning (0.03 sec)

mysql> show warnings
-> ;
+---------+------+----------------------------------------------+
| Level | Code | Message |
+---------+------+----------------------------------------------+
| Warning | 1265 | Data truncated for column 'message' at row 1 |
+---------+------+----------------------------------------------+
1 row in set (0.00 sec)

I have detected that dthe problem is with " ´ " char because if I insert

mysql> INSERT INTO syslog (date, date_logged, host, message) VALUES ('2007-02-25 23:00', '2007-02-25 23:00', 'host', 'prova amb acc FFFFFFFFFFFFFFF');
Query OK, 1 row affected (0.05 sec)

Works correctly

What can I do?

Thanks

How to repeat:
DROP TABLE IF EXISTS `syslog`;
CREATE TABLE `syslog` (
`date` datetime NOT NULL default '0000-00-00 00:00:00',
`host` varchar(128) default NULL,
`date_logged` datetime NOT NULL default '0000-00-00 00:00:00',
`message` text,
`id` int(10) unsigned NOT NULL auto_increment,
`analized` tinyint(2) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
KEY `analized` (`analized`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

When I try to insert:

mysql> INSERT INTO syslog (date, date_logged, host, message) VALUES ('2007-02-25 23:00', '2007-02-25 23:00', 'host', 'prova amb acc ´ FFFFFFFFFFFFFFF');
Query OK, 1 row affected, 1 warning (0.03 sec)

mysql> show warnings
-> ;
+---------+------+----------------------------------------------+
| Level | Code | Message |
+---------+------+----------------------------------------------+
| Warning | 1265 | Data truncated for column 'message' at row 1 |
+---------+------+----------------------------------------------+
1 row in set (0.00 sec)
[26 Feb 2007 9:33] Sveta Smirnova
Thank you for the report.

I can not repeat it using current development sources.
[11 Sep 2007 19:18] klx out
I have mysql 5.0.44 on a gentoo linux and the problem persist. In which version was resolved the bug?
What can I do?

Thanks
[11 Sep 2007 19:20] klx out
now  appears this 

mysql> INSERT INTO syslog (date, date_logged, host, message) VALUES ('2007-02-25 23:00', '2007-02-25 23:00', 'host', 'prova amb acc ´ FFFFFFFFFFFFFFF');
Query OK, 1 row affected, 1 warning (0.00 sec)

mysql> show warnings
    -> ;
+---------+------+----------------------------------------------------------------------+
| Level   | Code | Message                                                              |
+---------+------+----------------------------------------------------------------------+
| Warning | 1366 | Incorrect string value: '\xB4 FFFF...' for column 'message' at row 1 |
+---------+------+----------------------------------------------------------------------+
1 row in set (0.03 sec)
[25 Sep 2007 7:32] Sveta Smirnova
Thank you for the feedback.

The bug looks similar to bug #25815 fixed in version 5.0.38.

But as you can repeat it with version 5.0.44 please provide output of SHOW VARIABLES LIKE 'char%' and SHOW VARIABLES LIKE 'coll%'
[25 Oct 2007 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[31 Oct 2007 19:27] klx out
output of SHOW VARIABLES LIKE
'char%' and SHOW VARIABLES LIKE 'coll%'  is:

*********************************

mysql> SHOW VARIABLES LIKE 'char%' and SHOW VARIABLES LIKE 'coll%';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and SHOW VARIABLES LIKE 'coll%'' at line 1

*********************************

Also I have tried to reproduce  bug #25815  but the result its OK

Soory, how Can I change status to open?
[12 Nov 2007 11:25] Sveta Smirnova
klx out,

you should run these 2 queries separately. Like:

mysql> SHOW VARIABLES LIKE 'char%';

mysql> SHOW VARIABLES LIKE 'coll%';
[12 Nov 2007 12:40] klx out
Sorry for my error, 

output is:

mysql> SHOW VARIABLES LIKE 'char%';
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | utf8                       |
| character_set_connection | utf8                       |
| character_set_database   | utf8                       |
| character_set_filesystem | binary                     |
| character_set_results    | utf8                       |
| character_set_server     | utf8                       |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.04 sec)

mysql> SHOW VARIABLES LIKE 'coll%';
+----------------------+-----------------+
| Variable_name        | Value           |
+----------------------+-----------------+
| collation_connection | utf8_general_ci |
| collation_database   | utf8_general_ci |
| collation_server     | utf8_general_ci |
+----------------------+-----------------+
3 rows in set (0.00 sec)

mysql>

Thanks
[22 Feb 2008 20:36] Sveta Smirnova
Thank you for the feedback.

I still can not repeat described behavior. Please indicate which package you use (file name)
[23 Mar 2008 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[25 Mar 2008 12:36] Susanne Ebrecht
Please try with our newest version: Mysql 5.0.51a. Also make sure that your environment encoding is matching to your client encoding.
[25 Apr 2008 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[26 Apr 2008 8:31] klx out
Problem solved with versions 5.0.54 of gentoo thanks for all
[27 Apr 2008 7:29] Sveta Smirnova
Thank you for the feedback.

Closed as "Can't repeat" because last comment.