~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/endspace.test

  • Committer: Stewart Smith
  • Date: 2010-12-02 04:41:48 UTC
  • mto: (2021.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1971.
  • Revision ID: stewart@flamingspork.com-20101202044148-ksg6bd0aftzn7r0c
update endspace test - now with --sorted_result

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
-- source include/endspace.inc
11
11
 
12
12
#
13
 
# Test MyISAM tables.
 
13
# Test default engine tables.
14
14
#
15
15
 
16
16
create table t1 (text1 varchar(32) not NULL, KEY key1 (text1));
18
18
check table t1;
19
19
select * from t1 ignore key (key1) where text1='teststring' or 
20
20
  text1 like 'teststring_%' ORDER BY text1;
 
21
--sorted_result
21
22
select * from t1 where text1='teststring' or text1 like 'teststring_%';
 
23
--sorted_result
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;
27
29
check table t1;
28
30
select * from t1 ignore key (key1) where text1='teststring' or 
29
31
  text1 like 'teststring_%' ORDER BY text1;
 
32
--sorted_result
30
33
select concat('|', text1, '|') from t1 where text1='teststring' or text1 like 'teststring_%';
 
34
--sorted_result
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;
 
42
--sorted_result
38
43
select concat('|', text1, '|') from t1 where text1='teststring' or text1 > 'teststring\t';
 
44
--sorted_result
39
45
select concat('|', text1, '|') from t1 where text1='teststring';
 
46
--sorted_result
40
47
select concat('|', text1, '|') from t1 where text1='teststring ';
41
48
 
42
49
alter table t1 modify text1 text not null;
 
50
--sorted_result
43
51
select concat('|', text1, '|') from t1 where text1='teststring';
 
52
--sorted_result
44
53
select concat('|', text1, '|') from t1 where text1='teststring ';
45
54
explain select concat('|', text1, '|') from t1 where text1='teststring ';
 
55
--sorted_result
46
56
select concat('|', text1, '|') from t1 where text1 like 'teststring_%';
 
57
--sorted_result
47
58
select concat('|', text1, '|') from t1 where text1='teststring' or text1 like 'teststring_%';
 
59
--sorted_result
48
60
select concat('|', text1, '|') from t1 where text1='teststring' or text1 > 'teststring\t';
49
61
select concat('|', text1, '|') from t1 order by text1;
50
62
drop table t1;
51
63
 
52
64
create table t1 (text1 varchar(32) not NULL, KEY key1 (text1));
53
65
insert into t1 values ('teststring'), ('nothing'), ('teststring\t');
 
66
--sorted_result
54
67
select concat('|', text1, '|') from t1 where text1='teststring' or text1 like 'teststring_%';
 
68
--sorted_result
55
69
select concat('|', text1, '|') from t1 where text1='teststring' or text1 >= 'teststring\t';
56
70
drop table t1;
57
71
 
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');
79
93
check table t1;
 
94
--sorted_result
80
95
select * from t1 where text1='teststring' or text1 like 'teststring_%';
 
96
--sorted_result
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;
91
107
 
92
108
alter table t1 modify text1 text not null;
 
109
--sorted_result
93
110
select * from t1 where text1 like 'teststring_%';
94
111
 
95
112
# The following gives wrong result in InnoDB
 
113
--sorted_result
96
114
select text1, length(text1) from t1 where text1='teststring' or text1 like 'teststring_%';
 
115
--sorted_result
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;
99
118
drop table t1;