MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ctype_innodb_like.inc
1 #
2 # Bug#11650: LIKE pattern matching using prefix index
3 # doesn't return correct result
4 #
5 --disable_warnings
6 #
7 # This query creates a column using
8 # character_set_connection and
9 # collation_connection.
10 #
11 create table t1 engine=innodb select repeat('a',50) as c1;
12 --enable_warnings
13 alter table t1 add index(c1(5));
14 
15 insert into t1 values ('abcdefg'),('abcde100'),('abcde110'),('abcde111');
16 select collation(c1) from t1 limit 1;
17 select c1 from t1 where c1 like 'abcdef%' order by c1;
18 select c1 from t1 where c1 like 'abcde1%' order by c1;
19 select c1 from t1 where c1 like 'abcde11%' order by c1;
20 select c1 from t1 where c1 like 'abcde111%' order by c1;
21 drop table t1;