Bug #41703 | Falcon: dagger duplicates space | ||
---|---|---|---|
Submitted: | 23 Dec 2008 0:56 | Modified: | 23 Dec 2008 15:31 |
Reporter: | Peter Gulutzan | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: Falcon storage engine | Severity: | S2 (Serious) |
Version: | 6.0.10-alpha-debug | OS: | Any |
Assigned to: | Assigned Account | CPU Architecture: | Any |
Tags: | F_ENCODING |
[23 Dec 2008 0:56]
Peter Gulutzan
[23 Dec 2008 1:00]
Hakan Küçükyılmaz
Peter, your example looks like an empty string. Do you mean space (0x20) or an empty character?
[23 Dec 2008 1:02]
Hakan Küçükyılmaz
[02:01] root@test>create table t1 (s1 char(4) character set ucs2 primary key) engine=falcon; Query OK, 0 rows affected (0.00 sec) [02:01] root@test>insert into t1 values (0x2020); Query OK, 1 row affected (0.00 sec) [02:01] root@test>insert into t1 values (''); ERROR 1062 (23000): Duplicate entry '' for key 'PRIMARY' [02:01] root@test>insert into t1 values (' '); ERROR 1062 (23000): Duplicate entry '' for key 'PRIMARY'
[23 Dec 2008 15:31]
Ann Harrison
This is a duplicate of 34479 Note that this is UCS2. We've got an untamed tendency to chop off dangling 0x20 bytes from strings that needs to be adjusted for fixed size multi-byte characters. create table t1 (s1 char(4) character set ucs2 primary key) engine=falcon; insert into t1 values (0x2020); insert into t1 values (''); When using UCS2 we can truncate trailing blanks which are two bytes, not trailing 0x20 bytes.