19
19
select * from t1 ignore key (key1) where text1='teststring' or
20
20
text1 like 'teststring_%' ORDER BY text1;
21
22
select * from t1 where text1='teststring' or text1 like 'teststring_%';
22
24
select * from t1 where text1='teststring' or text1 > 'teststring\t';
23
25
select * from t1 order by text1;
24
26
explain select * from t1 order by text1;
28
30
select * from t1 ignore key (key1) where text1='teststring' or
29
31
text1 like 'teststring_%' ORDER BY text1;
30
33
select concat('|', text1, '|') from t1 where text1='teststring' or text1 like 'teststring_%';
31
35
select concat('|', text1, '|') from t1 where text1='teststring' or text1 > 'teststring\t';
32
36
select text1, length(text1) from t1 order by text1;
33
37
select text1, length(text1) from t1 order by text1;
35
39
alter table t1 modify text1 blob not null, drop key key1, add key key1 (text1(20));
36
40
insert into t1 values ('teststring ');
37
41
select concat('|', text1, '|') from t1 order by text1;
38
43
select concat('|', text1, '|') from t1 where text1='teststring' or text1 > 'teststring\t';
39
45
select concat('|', text1, '|') from t1 where text1='teststring';
40
47
select concat('|', text1, '|') from t1 where text1='teststring ';
42
49
alter table t1 modify text1 text not null;
43
51
select concat('|', text1, '|') from t1 where text1='teststring';
44
53
select concat('|', text1, '|') from t1 where text1='teststring ';
45
54
explain select concat('|', text1, '|') from t1 where text1='teststring ';
46
56
select concat('|', text1, '|') from t1 where text1 like 'teststring_%';
47
58
select concat('|', text1, '|') from t1 where text1='teststring' or text1 like 'teststring_%';
48
60
select concat('|', text1, '|') from t1 where text1='teststring' or text1 > 'teststring\t';
49
61
select concat('|', text1, '|') from t1 order by text1;
52
64
create table t1 (text1 varchar(32) not NULL, KEY key1 (text1));
53
65
insert into t1 values ('teststring'), ('nothing'), ('teststring\t');
54
67
select concat('|', text1, '|') from t1 where text1='teststring' or text1 like 'teststring_%';
55
69
select concat('|', text1, '|') from t1 where text1='teststring' or text1 >= 'teststring\t';
77
91
create table t1 (text1 varchar(32) not NULL, KEY key1 (text1)) engine=innodb;
78
92
insert into t1 values ('teststring'), ('nothing'), ('teststring\t');
80
95
select * from t1 where text1='teststring' or text1 like 'teststring_%';
81
97
select * from t1 where text1='teststring' or text1 > 'teststring\t';
82
98
select * from t1 order by text1;
83
99
explain select * from t1 order by text1;
90
106
select concat('|', text1, '|') from t1 order by text1;
92
108
alter table t1 modify text1 text not null;
93
110
select * from t1 where text1 like 'teststring_%';
95
112
# The following gives wrong result in InnoDB
96
114
select text1, length(text1) from t1 where text1='teststring' or text1 like 'teststring_%';
97
116
select text1, length(text1) from t1 where text1='teststring' or text1 >= 'teststring\t';
98
117
select concat('|', text1, '|') from t1 order by text1;