mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
ctype_utf8.result, ctype_utf8.test, mi_key.c:
bug 4521: unique key prefix interacts poorly with utf8: fixed length key fix.
This commit is contained in:
@ -187,3 +187,30 @@ select c cz from t1 where c='z';
|
||||
select c ca10 from t1 where c='aaaaaaaaaa';
|
||||
select c cb20 from t1 where c=repeat('b',20);
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug 4521: unique key prefix interacts poorly with utf8
|
||||
# Check fixed length keys
|
||||
create table t1 (c char(3) character set utf8, unique (c(2)));
|
||||
insert into t1 values ('1'),('2'),('3'),('4'),('x'),('y'),('z');
|
||||
insert into t1 values ('a');
|
||||
insert into t1 values ('aa');
|
||||
--error 1062
|
||||
insert into t1 values ('aaa');
|
||||
insert into t1 values ('b');
|
||||
insert into t1 values ('bb');
|
||||
--error 1062
|
||||
insert into t1 values ('bbb');
|
||||
insert into t1 values ('а');
|
||||
insert into t1 values ('аа');
|
||||
--error 1062
|
||||
insert into t1 values ('ааа');
|
||||
insert into t1 values ('б');
|
||||
insert into t1 values ('бб');
|
||||
--error 1062
|
||||
insert into t1 values ('ббб');
|
||||
insert into t1 values ('ꪪ');
|
||||
insert into t1 values ('ꪪꪪ');
|
||||
--error 1062
|
||||
insert into t1 values ('ꪪꪪꪪ');
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user