EVOLUTION-MANAGER
Edit File: index_multiple_column_unique_varchar.result
drop table if exists t1; create table t1 (c1 int primary key, c2 varchar(10), c3 varchar(10), unique key uk1(c2,c3)) default charset=utf8 collate utf8_bin; insert into t1 values(1,'abcde','abc '); insert into t1 values(2,'abc\0','abcde'); insert into t1 values(3,'abc','abc\0'); insert into t1 values(4,'abc ','abc'); insert into t1 values(5,'abc ','abc '); select c1, c2, c3 from t1 force index(uk1) where c2 = 'abc ' and c3 = 'abc'; c1 c2 c3 4 abc abc select c1, c2, c3 from t1 force index(uk1) order by c2, c3; c1 c2 c3 3 abc abc 2 abc abcde 5 abc abc 4 abc abc 1 abcde abc select c1, c2, c3 from t1 force index(uk1) order by c2 desc, c3 desc; c1 c2 c3 1 abcde abc 4 abc abc 5 abc abc 2 abc abcde 3 abc abc select c2, c3 from t1 force index(uk1) order by c2, c3; c2 c3 abc abc abc abcde abc abc abc abc abcde abc insert into t1 values(6,'abcde','abc '); ERROR 23000: Duplicate entry 'abcde-abc ' for key 'uk1' delete from t1 where c1 = 1; insert into t1 values(1,'abcde','abc '); drop table t1;