1 select @@collation_connection;
4 # Create a table with a nullable varchar(10) column
5 # using currect character_set_connection.
6 create
table t1 as select repeat(
' ',10) as a union select null;
7 alter
table t1 add key(a);
9 insert into t1 values ("a"),("abc"),("abcd"),("hello"),("
test");
10 explain select * from t1 where a like 'abc%';
11 explain select * from t1 where a like concat('abc','%');
12 select * from t1 where a like "abc%";
13 select * from t1 where a like concat("abc","%");
14 select * from t1 where a like "ABC%";
15 select * from t1 where a like "test%";
16 select * from t1 where a like "te_t";
17 select * from t1 where a like "%a%";
18 select * from t1 where a like "%abcd%";
19 select * from t1 where a like "%abc\d%";
23 # Bug #2619 ucs2 LIKE comparison fails in some cases
26 select
'AA' like
'AA';
27 select
'AA' like
'A%A';
28 select
'AA' like
'A%%A';
29 select
'AA' like
'AA%';
30 select
'AA' like
'%AA%';
31 select
'AA' like
'%A';
32 select
'AA' like
'%AA';
33 select
'AA' like
'A%A%';
34 select
'AA' like
'_%_%';
35 select
'AA' like
'%A%A';
36 select
'AAA'like
'A%A%A';
38 select
'AZ' like
'AZ';
39 select
'AZ' like
'A%Z';
40 select
'AZ' like
'A%%Z';
41 select
'AZ' like
'AZ%';
42 select
'AZ' like
'%AZ%';
43 select
'AZ' like
'%Z';
44 select
'AZ' like
'%AZ';
45 select
'AZ' like
'A%Z%';
46 select
'AZ' like
'_%_%';
47 select
'AZ' like
'%A%Z';
48 select
'AZ' like
'A_';
49 select
'AZ' like
'_Z';
50 select
'AMZ'like
'A%M%Z';