1
drop table if exists t1;
3
a char(3) character set latin1 collate latin1_bin primary key
5
insert into t1 values('aAa');
6
insert into t1 values('aaa');
7
insert into t1 values('AAA');
8
select * from t1 order by a;
13
select * from t1 where a = 'aAa';
16
select * from t1 where a = 'aaa';
19
select * from t1 where a = 'AaA';
21
select * from t1 where a = 'AAA';
26
a char(3) character set latin1 collate latin1_swedish_ci primary key
28
insert into t1 values('aAa');
29
insert into t1 values('aaa');
30
ERROR 23000: Duplicate entry 'aaa' for key 'PRIMARY'
31
insert into t1 values('AAA');
32
ERROR 23000: Duplicate entry 'AAA' for key 'PRIMARY'
33
select * from t1 order by a;
36
select * from t1 where a = 'aAa';
39
select * from t1 where a = 'aaa';
42
select * from t1 where a = 'AaA';
45
select * from t1 where a = 'AAA';
50
a varchar(20) character set latin1 collate latin1_swedish_ci primary key
52
insert into t1 values ('A'),('b '),('C '),('d '),('E'),('f');
53
insert into t1 values('b');
54
ERROR 23000: Duplicate entry 'b' for key 'PRIMARY'
55
insert into t1 values('a ');
56
ERROR 23000: Duplicate entry 'a ' for key 'PRIMARY'
57
select a,length(a) from t1 order by a;
65
select a,length(a) from t1 order by a desc;
73
select * from t1 where a = 'a';
76
select * from t1 where a = 'a ';
79
select * from t1 where a = 'd';
85
a char(3) character set latin1 collate latin1_bin not null,
88
insert into t1 values(1, 'aAa');
89
insert into t1 values(2, 'aaa');
90
insert into t1 values(3, 'AAA');
91
select * from t1 order by p;
96
select * from t1 where a = 'aAa';
99
select * from t1 where a = 'aaa';
102
select * from t1 where a = 'AaA';
104
select * from t1 where a = 'AAA';
110
a char(3) character set latin1 collate latin1_swedish_ci not null,
113
insert into t1 values(1, 'aAa');
114
insert into t1 values(2, 'aaa');
115
ERROR 23000: Duplicate entry 'aaa' for key 'a'
116
insert into t1 values(3, 'AAA');
117
ERROR 23000: Duplicate entry 'AAA' for key 'a'
118
select * from t1 order by p;
121
select * from t1 where a = 'aAa';
124
select * from t1 where a = 'aaa';
127
select * from t1 where a = 'AaA';
130
select * from t1 where a = 'AAA';
136
a varchar(20) character set latin1 collate latin1_swedish_ci not null,
139
insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f');
140
insert into t1 values(99,'b');
141
ERROR 23000: Duplicate entry 'b' for key 'a'
142
insert into t1 values(99,'a ');
143
ERROR 23000: Duplicate entry 'a ' for key 'a'
144
select a,length(a) from t1 order by a;
152
select a,length(a) from t1 order by a desc;
160
select * from t1 where a = 'a';
163
select * from t1 where a = 'a ';
166
select * from t1 where a = 'd';
172
a char(3) character set latin1 collate latin1_bin not null,
175
insert into t1 values(1, 'aAa');
176
insert into t1 values(2, 'aaa');
177
insert into t1 values(3, 'AAA');
178
insert into t1 values(4, 'aAa');
179
insert into t1 values(5, 'aaa');
180
insert into t1 values(6, 'AAA');
181
select * from t1 order by p;
189
select * from t1 where a = 'aAa' order by p;
193
select * from t1 where a = 'aaa' order by p;
197
select * from t1 where a = 'AaA' order by p;
199
select * from t1 where a = 'AAA' order by p;
206
a char(3) character set latin1 collate latin1_swedish_ci not null,
209
insert into t1 values(1, 'aAa');
210
insert into t1 values(2, 'aaa');
211
insert into t1 values(3, 'AAA');
212
insert into t1 values(4, 'aAa');
213
insert into t1 values(5, 'aaa');
214
insert into t1 values(6, 'AAA');
215
select * from t1 order by p;
223
select * from t1 where a = 'aAa' order by p;
231
select * from t1 where a = 'aaa' order by p;
239
select * from t1 where a = 'AaA' order by p;
247
select * from t1 where a = 'AAA' order by p;
258
a varchar(20) character set latin1 collate latin1_swedish_ci not null,
261
insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f');
262
insert into t1 values (7,'a'),(8,'B '),(9,'c '),(10,'D'),(11,'e'),(12,'F ');
263
select p,a,length(a) from t1 order by a, p;
277
select * from t1 where a = 'a ' order by a desc, p desc;
281
select * from t1 where a >= 'D' order by a, p;
289
select * from t1 where a < 'D' order by a, p;
297
select count(*) from t1 x, t1 y, t1 z where x.a = y.a and y.a = z.a;
302
a char(10) primary key
303
) engine=ndbcluster default charset=latin1;
304
insert into t1 values ('aaabb');
308
replace into t1 set a = 'AAABB';
312
replace into t1 set a = 'aAaBb';
316
replace into t1 set a = 'aaabb';