Bug #15316 SET value having comma not correctly handled
Submitted: 29 Nov 2005 15:40 Modified: 4 Apr 2006 13:40
Reporter: Andrey Hristov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1.14, 5.1.3 OS:
Assigned to: Sergei Glukhov CPU Architecture:Any

[29 Nov 2005 15:40] Andrey Hristov
Description:
MySQL truncates a SET value, which is valid, doing INSERT

How to repeat:
create table set_test(a set("a,b","c,d") not null);
insert into set_test values("c,d");

Query OK, 1 row affected, 1 warning (0.01 sec)

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

mysql> select * from set_test;
+---+
| a |
+---+
|   |
+---+
1 row in set (0.00 sec)
[29 Nov 2005 16:19] Jorge del Conde
I was able to reproduce this bug with a recent clone of 5.1
[16 Jan 2006 10:18] 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/commits/1131
[18 Jan 2006 12:26] 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/commits/1261
[29 Mar 2006 14:48] 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/commits/4280
[29 Mar 2006 14:57] Sergei Glukhov
Fixed in 4.1.19
[4 Apr 2006 13:40] Paul Dubois
Noted in 4.1.19 changelog.

<literal>SET</literal> value definitions containing commas
were not rejected. Now a definition such as
<literal>SET('a,b','c,d')</literal> results in an error. (Bug
#15316)
[23 May 2006 14:27] Robert Berman
It works for me in version 4.1.18-nt-max, but NOT in 4.1.19-community-max-nt. Is this expected behaviour? I.e. are commas no longer allowed in SET values?