Bug #58936 | Wrong Unique duplicate error | ||
---|---|---|---|
Submitted: | 15 Dec 2010 5:11 | Modified: | 15 Dec 2010 6:14 |
Reporter: | Ian Lord | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: General | Severity: | S3 (Non-critical) |
Version: | 5.5.4-m3 | OS: | FreeBSD (7.2) |
Assigned to: | CPU Architecture: | Any | |
Tags: | duplicate, unique |
[15 Dec 2010 5:11]
Ian Lord
[15 Dec 2010 5:13]
Ian Lord
By thw way, that bug existed in version 5.5.4-m3 also so it's now new to 5.5.7
[15 Dec 2010 5:14]
Ian Lord
By thw way, that bug existed in version 5.5.4-m3 also so it's not new to 5.5.7
[15 Dec 2010 5:39]
MySQL Verification Team
Looks like expected behaviour: mysql> select ''=' '; +--------+ | ''=' ' | +--------+ | 1 | +--------+ 1 row in set (2 min 51.52 sec) http://dev.mysql.com/doc/refman/5.5/en/char.html "All MySQL collations are of type PADSPACE. This means that all CHAR and VARCHAR values in MySQL are compared without regard to any trailing spaces. For example:" ... "For those cases where trailing pad characters are stripped or comparisons ignore them, if a column has an index that requires unique values, inserting into the column values that differ only in number of trailing pad characters will result in a duplicate-key error. For example, if a table contains 'a', an attempt to store 'a ' causes a duplicate-key error."