~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to tests/r/pbxt/ctype_utf8.result

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
drop table if exists t1,t2;
 
2
select left(0xD0B0D0B1D0B2,1);
 
3
left(0xD0B0D0B1D0B2,1)
 
4
 
5
select right(0xD0B0D0B2D0B2,1);
 
6
right(0xD0B0D0B2D0B2,1)
 
7
 
8
select locate('he','hello');
 
9
locate('he','hello')
 
10
1
 
11
select locate('he','hello',2);
 
12
locate('he','hello',2)
 
13
0
 
14
select locate('lo','hello',2);
 
15
locate('lo','hello',2)
 
16
4
 
17
select locate('HE','hello');
 
18
locate('HE','hello')
 
19
1
 
20
select locate('HE','hello',2);
 
21
locate('HE','hello',2)
 
22
0
 
23
select locate('LO','hello',2);
 
24
locate('LO','hello',2)
 
25
4
 
26
select locate('HE','hello' collate utf8_bin);
 
27
locate('HE','hello' collate utf8_bin)
 
28
0
 
29
select locate('HE','hello' collate utf8_bin,2);
 
30
locate('HE','hello' collate utf8_bin,2)
 
31
0
 
32
select locate('LO','hello' collate utf8_bin,2);
 
33
locate('LO','hello' collate utf8_bin,2)
 
34
0
 
35
select locate(0xD0B1, 0xD0B0D0B1D0B2);
 
36
locate(0xD0B1, 0xD0B0D0B1D0B2)
 
37
3
 
38
select locate(0xD091, 0xD0B0D0B1D0B2);
 
39
locate(0xD091, 0xD0B0D0B1D0B2)
 
40
0
 
41
select locate(0xD0B1, 0xD0B0D091D0B2);
 
42
locate(0xD0B1, 0xD0B0D091D0B2)
 
43
0
 
44
select length(0xD0B1), char_length(0xD0B1);
 
45
length(0xD0B1)  char_length(0xD0B1)
 
46
2       2
 
47
select 'a' like 'a';
 
48
'a' like 'a'
 
49
1
 
50
select 'A' like 'a';
 
51
'A' like 'a'
 
52
1
 
53
select 'A' like 'a' collate utf8_bin;
 
54
'A' like 'a' collate utf8_bin
 
55
0
 
56
select 0xD0B0D0B1D0B2 like concat('%',0xD0B1,'%');
 
57
0xD0B0D0B1D0B2 like concat('%',0xD0B1,'%')
 
58
1
 
59
select 'Günter André' like 'GÜNTER%';
 
60
'Günter André' like 'GÜNTER%'
 
61
1
 
62
SELECT 'a' = 'a ';
 
63
'a' = 'a '
 
64
1
 
65
SELECT 'a\0' < 'a';
 
66
'a\0' < 'a'
 
67
1
 
68
SELECT 'a\0' < 'a ';
 
69
'a\0' < 'a '
 
70
1
 
71
SELECT 'a\t' < 'a';
 
72
'a\t' < 'a'
 
73
1
 
74
SELECT 'a\t' < 'a ';
 
75
'a\t' < 'a '
 
76
1
 
77
SELECT 'a' = 'a ' collate utf8_bin;
 
78
'a' = 'a ' collate utf8_bin
 
79
1
 
80
SELECT 'a\0' < 'a' collate utf8_bin;
 
81
'a\0' < 'a' collate utf8_bin
 
82
1
 
83
SELECT 'a\0' < 'a ' collate utf8_bin;
 
84
'a\0' < 'a ' collate utf8_bin
 
85
1
 
86
SELECT 'a\t' < 'a' collate utf8_bin;
 
87
'a\t' < 'a' collate utf8_bin
 
88
1
 
89
SELECT 'a\t' < 'a ' collate utf8_bin;
 
90
'a\t' < 'a ' collate utf8_bin
 
91
1
 
92
CREATE TABLE t1 (a char(10) not null);
 
93
INSERT INTO t1 VALUES ('a'),('a\0'),('a\t'),('a ');
 
94
SELECT hex(a),STRCMP(a,'a'), STRCMP(a,'a ') FROM t1;
 
95
hex(a)  STRCMP(a,'a')   STRCMP(a,'a ')
 
96
61      0       0
 
97
6100    -1      -1
 
98
6109    -1      -1
 
99
6120    0       0
 
100
DROP TABLE t1;
 
101
select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es');
 
102
insert('txs',2,1,'hi')  insert('is ',4,0,'a')   insert('txxxxt',2,4,'es')
 
103
this    is a    test
 
104
select insert("aa",100,1,"b"),insert("aa",1,3,"b");
 
105
insert("aa",100,1,"b")  insert("aa",1,3,"b")
 
106
aa      b
 
107
select char_length(left(@a:='න ',5)), length(@a), @a;
 
108
char_length(left(@a:='න ',5))   length(@a)      @a
 
109
2       4       න 
 
110
create table t1 select date_format("2004-01-19 10:10:10", "%Y-%m-%d");
 
111
show create table t1;
 
112
Table   Create Table
 
113
t1      CREATE TABLE `t1` (
 
114
  `date_format("2004-01-19 10:10:10", "%Y-%m-%d")` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL
 
115
) ENGINE=PBXT COLLATE = utf8_general_ci
 
116
select * from t1;
 
117
date_format("2004-01-19 10:10:10", "%Y-%m-%d")
 
118
2004-01-19
 
119
drop table t1;
 
120
create table t1 (s1 char(10));
 
121
insert into t1 values (0x41FF);
 
122
ERROR HY000: Incorrect string value: '\xFF' for column 's1' at row 1
 
123
select hex(s1) from t1;
 
124
hex(s1)
 
125
drop table t1;
 
126
create table t1 (s1 varchar(10));
 
127
insert into t1 values (0x41FF);
 
128
ERROR HY000: Incorrect string value: '\xFF' for column 's1' at row 1
 
129
select hex(s1) from t1;
 
130
hex(s1)
 
131
drop table t1;
 
132
create table t1 (s1 text);
 
133
insert into t1 values (0x41FF);
 
134
ERROR HY000: Incorrect string value: '\xFF' for column 's1' at row 1
 
135
select hex(s1) from t1;
 
136
hex(s1)
 
137
drop table t1;
 
138
create table t1 (a text, primary key(a(360))) engine=innodb;
 
139
ERROR 42000: Specified key was too long; max key length is 1023 bytes
 
140
CREATE TABLE t1 ( a varchar(10) );
 
141
INSERT INTO t1 VALUES ( 'test' );
 
142
SELECT a.a, b.a FROM t1 a, t1 b WHERE a.a = b.a;
 
143
a       a
 
144
test    test
 
145
SELECT a.a, b.a FROM t1 a, t1 b WHERE a.a = 'test' and b.a = 'test';
 
146
a       a
 
147
test    test
 
148
SELECT a.a, b.a FROM t1 a, t1 b WHERE a.a = b.a and a.a = 'test';
 
149
a       a
 
150
test    test
 
151
DROP TABLE t1;
 
152
create table t1 (a char(255));
 
153
insert into t1 values('b'),('b');
 
154
select * from t1 where a = 'b';
 
155
a
 
156
b
 
157
b
 
158
select * from t1 where a = 'b' and a = 'b';
 
159
a
 
160
b
 
161
b
 
162
select * from t1 where a = 'b' and a != 'b';
 
163
a
 
164
drop table t1;
 
165
CREATE TABLE t1 (a enum ('Y', 'N') DEFAULT 'N' COLLATE utf8_unicode_ci);
 
166
ALTER TABLE t1 ADD COLUMN b CHAR(20);
 
167
DROP TABLE t1;
 
168
create table t1 (c varchar(30), unique(c(10)));
 
169
insert into t1 values ('1'),('2'),('3'),('x'),('y'),('z');
 
170
insert into t1 values ('aaaaaaaaaa');
 
171
insert into t1 values ('aaaaaaaaaaa');
 
172
ERROR 23000: Duplicate entry 'aaaaaaaaaa' for key 'c'
 
173
insert into t1 values ('aaaaaaaaaaaa');
 
174
ERROR 23000: Duplicate entry 'aaaaaaaaaa' for key 'c'
 
175
insert into t1 values (repeat('b',20));
 
176
select c c1 from t1 where c='1';
 
177
c1
 
178
1
 
179
select c c2 from t1 where c='2';
 
180
c2
 
181
2
 
182
select c c3 from t1 where c='3';
 
183
c3
 
184
3
 
185
select c cx from t1 where c='x';
 
186
cx
 
187
x
 
188
select c cy from t1 where c='y';
 
189
cy
 
190
y
 
191
select c cz from t1 where c='z';
 
192
cz
 
193
z
 
194
select c ca10 from t1 where c='aaaaaaaaaa';
 
195
ca10
 
196
aaaaaaaaaa
 
197
select c cb20 from t1 where c=repeat('b',20);
 
198
cb20
 
199
bbbbbbbbbbbbbbbbbbbb
 
200
drop table t1;
 
201
create table t1 (c varchar(30), unique(c(10))) engine=innodb;
 
202
insert into t1 values ('1'),('2'),('3'),('x'),('y'),('z');
 
203
insert into t1 values ('aaaaaaaaaa');
 
204
insert into t1 values ('aaaaaaaaaaa');
 
205
ERROR 23000: Duplicate entry 'aaaaaaaaaa' for key 'c'
 
206
insert into t1 values ('aaaaaaaaaaaa');
 
207
ERROR 23000: Duplicate entry 'aaaaaaaaaa' for key 'c'
 
208
insert into t1 values (repeat('b',20));
 
209
select c c1 from t1 where c='1';
 
210
c1
 
211
1
 
212
select c c2 from t1 where c='2';
 
213
c2
 
214
2
 
215
select c c3 from t1 where c='3';
 
216
c3
 
217
3
 
218
select c cx from t1 where c='x';
 
219
cx
 
220
x
 
221
select c cy from t1 where c='y';
 
222
cy
 
223
y
 
224
select c cz from t1 where c='z';
 
225
cz
 
226
z
 
227
select c ca10 from t1 where c='aaaaaaaaaa';
 
228
ca10
 
229
aaaaaaaaaa
 
230
select c cb20 from t1 where c=repeat('b',20);
 
231
cb20
 
232
bbbbbbbbbbbbbbbbbbbb
 
233
drop table t1;
 
234
create TEMPORARY table t1 (c char(3), unique (c(2))) engine=myisam;
 
235
insert into t1 values ('1'),('2'),('3'),('4'),('x'),('y'),('z');
 
236
insert into t1 values ('a');
 
237
insert into t1 values ('aa');
 
238
insert into t1 values ('aaa');
 
239
ERROR 23000: Duplicate entry 'aa' for key 'c'
 
240
insert into t1 values ('b');
 
241
insert into t1 values ('bb');
 
242
insert into t1 values ('bbb');
 
243
ERROR 23000: Duplicate entry 'bb' for key 'c'
 
244
insert into t1 values ('킱');
 
245
insert into t1 values ('킱킱');
 
246
insert into t1 values ('킱킱킱');
 
247
ERROR 23000: Duplicate entry '킱킱' for key 'c'
 
248
drop table t1;
 
249
create table t1 (c char(3), unique (c(2))) engine=innodb;
 
250
insert into t1 values ('1'),('2'),('3'),('4'),('x'),('y'),('z');
 
251
insert into t1 values ('a');
 
252
insert into t1 values ('aa');
 
253
insert into t1 values ('aaa');
 
254
ERROR 23000: Duplicate entry 'aa' for key 'c'
 
255
insert into t1 values ('b');
 
256
insert into t1 values ('bb');
 
257
insert into t1 values ('bbb');
 
258
ERROR 23000: Duplicate entry 'bb' for key 'c'
 
259
insert into t1 values ('킱');
 
260
insert into t1 values ('킱킱');
 
261
insert into t1 values ('킱킱킱');
 
262
ERROR 23000: Duplicate entry '킱킱' for key 'c'
 
263
drop table t1;
 
264
create TEMPORARY table t1 (
 
265
c char(10),
 
266
unique key a using hash (c(2))
 
267
) engine=MEMORY;
 
268
insert into t1 values ('1'),('2'),('3'),('4'),('x'),('y'),('z');
 
269
insert into t1 values ('a');
 
270
insert into t1 values ('aa');
 
271
insert into t1 values ('aaa');
 
272
ERROR 23000: Duplicate entry 'aa' for key 'a'
 
273
insert into t1 values ('b');
 
274
insert into t1 values ('bb');
 
275
insert into t1 values ('bbb');
 
276
ERROR 23000: Duplicate entry 'bb' for key 'a'
 
277
insert into t1 values ('킱');
 
278
insert into t1 values ('킱킱');
 
279
insert into t1 values ('킱킱킱');
 
280
ERROR 23000: Duplicate entry '킱킱' for key 'a'
 
281
select c as c_all from t1 order by c;
 
282
c_all
 
283
1
 
284
2
 
285
3
 
286
4
 
287
a
 
288
aa
 
289
b
 
290
bb
 
291
x
 
292
y
 
293
z
 
294
 
295
킱킱
 
296
select c as c_a from t1 where c='a';
 
297
c_a
 
298
a
 
299
select c as c_a from t1 where c='킱';
 
300
c_a
 
301
 
302
drop table t1;
 
303
create TEMPORARY table t1 (
 
304
c char(10),
 
305
unique key a using btree (c(2))
 
306
) engine=MEMORY;
 
307
show create table t1;
 
308
Table   Create Table
 
309
t1      CREATE TEMPORARY TABLE `t1` (
 
310
  `c` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
 
311
  UNIQUE KEY `a` (`c`(2)) USING BTREE
 
312
) ENGINE=MEMORY COLLATE = utf8_general_ci
 
313
insert into t1 values ('1'),('2'),('3'),('4'),('x'),('y'),('z');
 
314
insert into t1 values ('a');
 
315
insert into t1 values ('aa');
 
316
insert into t1 values ('aaa');
 
317
ERROR 23000: Duplicate entry 'aa' for key 'a'
 
318
insert into t1 values ('b');
 
319
insert into t1 values ('bb');
 
320
insert into t1 values ('bbb');
 
321
ERROR 23000: Duplicate entry 'bb' for key 'a'
 
322
insert into t1 values ('킱');
 
323
insert into t1 values ('킱킱');
 
324
insert into t1 values ('킱킱킱');
 
325
ERROR 23000: Duplicate entry '킱킱' for key 'a'
 
326
select c as c_all from t1 order by c;
 
327
c_all
 
328
1
 
329
2
 
330
3
 
331
4
 
332
a
 
333
aa
 
334
b
 
335
bb
 
336
x
 
337
y
 
338
z
 
339
 
340
킱킱
 
341
select c as c_a from t1 where c='a';
 
342
c_a
 
343
a
 
344
select c as c_a from t1 where c='킱';
 
345
c_a
 
346
 
347
drop table t1;
 
348
create TEMPORARY table t1 (
 
349
str varchar(255) not null,
 
350
key str  (str(2))
 
351
) engine=myisam;
 
352
INSERT INTO t1 VALUES ('str');
 
353
INSERT INTO t1 VALUES ('str2');
 
354
select * from t1 where str='str';
 
355
str
 
356
str
 
357
drop table t1;
 
358
create table t1 (
 
359
str varchar(255) not null,
 
360
key str  (str(2))
 
361
) engine=innodb;
 
362
INSERT INTO t1 VALUES ('str');
 
363
INSERT INTO t1 VALUES ('str2');
 
364
select * from t1 where str='str';
 
365
str
 
366
str
 
367
drop table t1;
 
368
create temporary table t1 (
 
369
str varchar(255) not null,
 
370
key str using btree (str(2))
 
371
) engine=MEMORY;
 
372
INSERT INTO t1 VALUES ('str');
 
373
INSERT INTO t1 VALUES ('str2');
 
374
select * from t1 where str='str';
 
375
str
 
376
str
 
377
drop table t1;
 
378
create temporary table t1 (
 
379
str varchar(255) not null,
 
380
key str using hash (str(2))
 
381
) engine=MEMORY;
 
382
INSERT INTO t1 VALUES ('str');
 
383
INSERT INTO t1 VALUES ('str2');
 
384
select * from t1 where str='str';
 
385
str
 
386
str
 
387
drop table t1;
 
388
create table t1 (
 
389
str varchar(255) not null,
 
390
key str (str(2))
 
391
) engine=innodb;
 
392
INSERT INTO t1 VALUES ('str');
 
393
INSERT INTO t1 VALUES ('str2');
 
394
select * from t1 where str='str';
 
395
str
 
396
str
 
397
drop table t1;
 
398
CREATE TABLE t1 (a varchar(32));
 
399
INSERT INTO t1 VALUES ('test');
 
400
SELECT a FROM t1 WHERE a LIKE '%te';
 
401
a
 
402
DROP TABLE t1;
 
403
CREATE TABLE t1 (
 
404
subject varchar(255) collate utf8_unicode_ci,
 
405
p varchar(15)
 
406
) ENGINE=InnoDB;
 
407
INSERT INTO t1 values ('킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱','abcdefghijklmno');
 
408
INSERT INTO t1 VALUES ('aaa','bbb');
 
409
SELECT length(subject) FROM t1;
 
410
length(subject)
 
411
765
 
412
3
 
413
SELECT length(subject) FROM t1 ORDER BY 1;
 
414
length(subject)
 
415
3
 
416
765
 
417
DROP TABLE t1;
 
418
CREATE TEMPORARY TABLE t1 (
 
419
id       int NOT NULL auto_increment,
 
420
list_id  int NOT NULL,
 
421
term     TEXT NOT NULL,
 
422
PRIMARY KEY(id),
 
423
INDEX(list_id, term(4))
 
424
) ENGINE=MYISAM;
 
425
INSERT INTO t1 SET list_id = 1, term = "letterc";
 
426
INSERT INTO t1 SET list_id = 1, term = "letterb";
 
427
INSERT INTO t1 SET list_id = 1, term = "lettera";
 
428
INSERT INTO t1 SET list_id = 1, term = "letterd";
 
429
SELECT id FROM t1 WHERE (list_id = 1) AND (term = "letterc");
 
430
id
 
431
1
 
432
SELECT id FROM t1 WHERE (list_id = 1) AND (term = "letterb");
 
433
id
 
434
2
 
435
SELECT id FROM t1 WHERE (list_id = 1) AND (term = "lettera");
 
436
id
 
437
3
 
438
SELECT id FROM t1 WHERE (list_id = 1) AND (term = "letterd");
 
439
id
 
440
4
 
441
DROP TABLE t1;
 
442
CREATE TEMPORARY TABLE t1 (
 
443
id int NOT NULL auto_increment,
 
444
list_id int NOT NULL,
 
445
term text NOT NULL,
 
446
PRIMARY KEY(id),
 
447
INDEX(list_id, term(19))
 
448
) ENGINE=MyISAM;
 
449
INSERT INTO t1 set list_id = 1, term = "testétest";
 
450
INSERT INTO t1 set list_id = 1, term = "testetest";
 
451
INSERT INTO t1 set list_id = 1, term = "testètest";
 
452
SELECT id, term FROM t1 where (list_id = 1) AND (term = "testétest");
 
453
id      term
 
454
1       testétest
 
455
2       testetest
 
456
3       testètest
 
457
SELECT id, term FROM t1 where (list_id = 1) AND (term = "testetest");
 
458
id      term
 
459
1       testétest
 
460
2       testetest
 
461
3       testètest
 
462
SELECT id, term FROM t1 where (list_id = 1) AND (term = "testètest");
 
463
id      term
 
464
1       testétest
 
465
2       testetest
 
466
3       testètest
 
467
DROP TABLE t1;
 
468
create table t1 (
 
469
a int primary key,
 
470
b varchar(6),
 
471
index b3(b(3))
 
472
) engine=innodb;
 
473
insert into t1 values(1,'foo'),(2,'foobar');
 
474
select * from t1 where b like 'foob%';
 
475
a       b
 
476
2       foobar
 
477
alter table t1 engine=innodb;
 
478
select * from t1 where b like 'foob%';
 
479
a       b
 
480
2       foobar
 
481
drop table t1;
 
482
create table t1 (
 
483
a enum('☃','☄','킱') not null default '킱'
 
484
);
 
485
create table t2 select concat(a,'') as a from t1;
 
486
show create table t2;
 
487
Table   Create Table
 
488
t2      CREATE TABLE `t2` (
 
489
  `a` VARCHAR(1) COLLATE utf8_general_ci DEFAULT NULL
 
490
) ENGINE=PBXT COLLATE = utf8_general_ci
 
491
drop table t2;
 
492
drop table t1;
 
493
select 'c' like '\_' as want0;
 
494
want0
 
495
0
 
496
SELECT SUBSTR('☃☄킱',-2);
 
497
SUBSTR('☃☄킱',-2)
 
498
☄킱
 
499
create table t1 select repeat('a',4000) a;
 
500
delete from t1;
 
501
insert into t1 values ('a'), ('a '), ('a\t');
 
502
select collation(a),hex(a) from t1 order by hex(a);
 
503
collation(a)    hex(a)
 
504
utf8_general_ci 61
 
505
utf8_general_ci 6109
 
506
utf8_general_ci 6120
 
507
drop table t1;
 
508
create table t1 select repeat('a',50) as c1 ;
 
509
insert into t1 values('abcdef');
 
510
insert into t1 values('_bcdef');
 
511
insert into t1 values('a_cdef');
 
512
insert into t1 values('ab_def');
 
513
insert into t1 values('abc_ef');
 
514
insert into t1 values('abcd_f');
 
515
insert into t1 values('abcde_');
 
516
select c1 as c1u from t1 where c1 like 'ab\_def';
 
517
c1u
 
518
ab_def
 
519
select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
 
520
c2h
 
521
ab_def
 
522
drop table t1;
 
523
drop table if exists t1;
 
524
create table t1 as select repeat(' ', 64) as s1;
 
525
select collation(s1) from t1;
 
526
collation(s1)
 
527
utf8_general_ci
 
528
delete from t1;
 
529
insert into t1 values ('a'),('ae'),('ä');
 
530
insert into t1 values ('o'),('oe'),('ö');
 
531
insert into t1 values ('s'),('ss'),('ß');
 
532
insert into t1 values ('u'),('ue'),('ü');
 
533
select s1, hex(s1) from t1 order by s1, binary s1;
 
534
s1      hex(s1)
 
535
a       61
 
536
ä       C3A4
 
537
ae      6165
 
538
o       6F
 
539
ö       C3B6
 
540
oe      6F65
 
541
s       73
 
542
ß       C39F
 
543
ss      7373
 
544
u       75
 
545
ü       C3BC
 
546
ue      7565
 
547
select group_concat(s1 order by binary s1) from t1 group by s1;
 
548
group_concat(s1 order by binary s1)
 
549
a,ä
 
550
ae
 
551
o,ö
 
552
oe
 
553
s,ß
 
554
ss
 
555
u,ü
 
556
ue
 
557
drop table t1;
 
558
create table t1 select repeat('a',4000) a;
 
559
delete from t1;
 
560
insert into t1 values ('a'), ('a '), ('a\t');
 
561
select collation(a),hex(a) from t1 order by hex(a);
 
562
collation(a)    hex(a)
 
563
utf8_general_ci 61
 
564
utf8_general_ci 6109
 
565
utf8_general_ci 6120
 
566
drop table t1;
 
567
create table t1 select repeat('a',50) as c1 ;
 
568
insert into t1 values('abcdef');
 
569
insert into t1 values('_bcdef');
 
570
insert into t1 values('a_cdef');
 
571
insert into t1 values('ab_def');
 
572
insert into t1 values('abc_ef');
 
573
insert into t1 values('abcd_f');
 
574
insert into t1 values('abcde_');
 
575
select c1 as c1u from t1 where c1 like 'ab\_def';
 
576
c1u
 
577
ab_def
 
578
select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
 
579
c2h
 
580
ab_def
 
581
drop table t1;
 
582
create table t1 (a varchar(10));
 
583
insert into t1 values ('test');
 
584
select ifnull(a,'') from t1;
 
585
ifnull(a,'')
 
586
test
 
587
drop table t1;
 
588
select repeat('+',3) as h union select NULL;
 
589
h
 
590
+++
 
591
NULL
 
592
select ifnull(NULL, 'string');
 
593
ifnull(NULL, 'string')
 
594
string
 
595
create table t1 (s1 char(5) collate utf8_lithuanian_ci);
 
596
insert into t1 values ('I'),('K'),('Y');
 
597
select * from t1 where s1 < 'K' and s1 = 'Y';
 
598
s1
 
599
I
 
600
Y
 
601
select * from t1 where 'K' > s1 and s1 = 'Y';
 
602
s1
 
603
I
 
604
Y
 
605
drop table t1;
 
606
create table t1 (s1 char(5) collate utf8_czech_ci);
 
607
insert into t1 values ('c'),('d'),('h'),('ch'),('CH'),('cH'),('Ch'),('i');
 
608
select * from t1 where s1 > 'd' and s1 = 'CH';
 
609
s1
 
610
ch
 
611
CH
 
612
Ch
 
613
select * from t1 where 'd' < s1 and s1 = 'CH';
 
614
s1
 
615
ch
 
616
CH
 
617
Ch
 
618
select * from t1 where s1 = 'cH' and s1 <> 'ch';
 
619
s1
 
620
cH
 
621
select * from t1 where 'cH' = s1 and s1 <> 'ch';
 
622
s1
 
623
cH
 
624
drop table t1;
 
625
create table t1 (a varchar(255));
 
626
insert into t1 values (1.0);
 
627
drop table t1;
 
628
create table t1 (
 
629
id int not null,
 
630
city varchar(20) not null,
 
631
key (city(7),id)
 
632
);
 
633
insert into t1 values (1,'Durban North');
 
634
insert into t1 values (2,'Durban');
 
635
select * from t1 where city = 'Durban';
 
636
id      city
 
637
2       Durban
 
638
select * from t1 where city = 'Durban ';
 
639
id      city
 
640
2       Durban
 
641
drop table t1;
 
642
CREATE TEMPORARY TABLE t1 (
 
643
`id` int NOT NULL auto_increment,
 
644
`country` varchar(100) NOT NULL default '',
 
645
`shortcode` varchar(100) NOT NULL default '',
 
646
`operator` varchar(100) NOT NULL default '',
 
647
`momid` varchar(30) NOT NULL default '',
 
648
`keyword` varchar(160) NOT NULL default '',
 
649
`content` varchar(160) NOT NULL default '',
 
650
`second_token` varchar(160) default NULL,
 
651
`gateway_id` int NOT NULL default '0',
 
652
`created` datetime NULL,
 
653
`msisdn` varchar(15) NOT NULL default '',
 
654
PRIMARY KEY  (`id`),
 
655
UNIQUE KEY `MSCCSPK_20030521130957121` (`momid`),
 
656
KEY `IX_mobile_originated_message_keyword` (`keyword`),
 
657
KEY `IX_mobile_originated_message_created` (`created`),
 
658
KEY `IX_mobile_originated_message_support` (`msisdn`,`momid`,`keyword`,`gateway_id`,`created`)
 
659
) ENGINE=MyISAM;
 
660
INSERT INTO t1 VALUES 
 
661
(1,'blah','464','aaa','fkc1c9ilc20x0hgae7lx6j09','ERR','킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱','G', 3,'2005-06-01 17:30:43','1234567890'),
 
662
(2,'blah','464','aaa','haxpl2ilc20x00bj4tt2m5ti','11','11 g','G',3,'2005-06-02 22:43:10','1234567890');
 
663
CREATE TABLE t2 (
 
664
`msisdn` varchar(15) NOT NULL default '',
 
665
`operator_id` int NOT NULL default '0',
 
666
`created` datetime NULL,
 
667
UNIQUE KEY `PK_user` (`msisdn`)
 
668
) ENGINE=InnoDB;
 
669
INSERT INTO t2 VALUES ('1234567890',2,'2005-05-24 13:53:25');
 
670
SELECT content, t2.msisdn FROM t1, t2 WHERE t1.msisdn = '1234567890';
 
671
content msisdn
 
672
킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱킱        1234567890
 
673
11 g    1234567890
 
674
DROP TABLE t1,t2;
 
675
create table t1 (a char(20));
 
676
insert into t1 values ('12'),('킱킲');
 
677
alter table t1 modify a char(2);
 
678
select char_length(a), length(a), a from t1 order by a;
 
679
char_length(a)  length(a)       a
 
680
2       2       12
 
681
2       6       킱킲
 
682
drop table t1;
 
683
select 'andre%' like 'andre킱%' escape '킱';
 
684
'andre%' like 'andre킱%' escape '킱'
 
685
1
 
686
select 'a\\' like 'a\\';
 
687
'a\\' like 'a\\'
 
688
1
 
689
select 'aa\\' like 'a%\\';
 
690
'aa\\' like 'a%\\'
 
691
1
 
692
create table t1 (a char(10), key(a));
 
693
insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test");
 
694
select * from t1 where a like "abc%";
 
695
a
 
696
abc
 
697
abcd
 
698
select * from t1 where a like concat("abc","%");
 
699
a
 
700
abc
 
701
abcd
 
702
select * from t1 where a like "ABC%";
 
703
a
 
704
abc
 
705
abcd
 
706
select * from t1 where a like "test%";
 
707
a
 
708
test
 
709
select * from t1 where a like "te_t";
 
710
a
 
711
test
 
712
select * from t1 where a like "%a%";
 
713
a
 
714
a
 
715
abc
 
716
abcd
 
717
select * from t1 where a like "%abcd%";
 
718
a
 
719
abcd
 
720
select * from t1 where a like "%abc\d%";
 
721
a
 
722
abcd
 
723
drop table t1;
 
724
CREATE TEMPORARY TABLE t1 (
 
725
a varchar(255) NOT NULL default '',
 
726
KEY a (a)
 
727
) ENGINE=MyISAM COLLATE=utf8_general_ci;
 
728
insert into t1 values (0xe880bd);
 
729
insert into t1 values (0x5b);
 
730
select hex(a) from t1;
 
731
hex(a)
 
732
5B
 
733
E880BD
 
734
drop table t1;
 
735
create table t1 (a varchar(255));
 
736
select * from t1 where find_in_set('-1', a);
 
737
a
 
738
drop table t1;
 
739
create table t1 (a int);
 
740
insert into t1 values (48),(49),(50);
 
741
select distinct char(a) from t1;
 
742
char(a)
 
743
0
 
744
1
 
745
2
 
746
drop table t1;
 
747
CREATE TABLE t1 (t TINYTEXT);
 
748
INSERT INTO t1 VALUES(REPEAT('a', 100));
 
749
CREATE TEMPORARY TABLE t2 SELECT COALESCE(t) AS bug FROM t1;
 
750
SELECT LENGTH(bug) FROM t2;
 
751
LENGTH(bug)
 
752
100
 
753
DROP TABLE t2;
 
754
DROP TABLE t1;
 
755
CREATE TABLE t1 (item varchar(255));
 
756
INSERT INTO t1 VALUES ('\\');
 
757
INSERT INTO t1 VALUES ('\\');
 
758
INSERT INTO t1 VALUES ('Cote d\'Ivoire');
 
759
INSERT INTO t1 VALUES ('Cote d\'Ivoire');
 
760
SELECT item FROM t1 ORDER BY item;
 
761
item
 
762
Cote d'Ivoire
 
763
Cote d'Ivoire
 
764
\
 
765
\
 
766
DROP TABLE t1;
 
767
DROP TABLE IF EXISTS t1;
 
768
Warnings:
 
769
Note    1051    Unknown table 't1'
 
770
CREATE TEMPORARY TABLE t1(a VARCHAR(255), KEY(a)) ENGINE=MyISAM;
 
771
INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb');
 
772
INSERT INTO t1 VALUES('uu');
 
773
check table t1;
 
774
Table   Op      Msg_type        Msg_text
 
775
test.t1 check   status  OK
 
776
INSERT INTO t1 VALUES('uU');
 
777
check table t1;
 
778
Table   Op      Msg_type        Msg_text
 
779
test.t1 check   status  OK
 
780
INSERT INTO t1 VALUES('uu');
 
781
check table t1;
 
782
Table   Op      Msg_type        Msg_text
 
783
test.t1 check   status  OK
 
784
INSERT INTO t1 VALUES('uuABC');
 
785
check table t1;
 
786
Table   Op      Msg_type        Msg_text
 
787
test.t1 check   status  OK
 
788
INSERT INTO t1 VALUES('UuABC');
 
789
check table t1;
 
790
Table   Op      Msg_type        Msg_text
 
791
test.t1 check   status  OK
 
792
INSERT INTO t1 VALUES('uuABC');
 
793
check table t1;
 
794
Table   Op      Msg_type        Msg_text
 
795
test.t1 check   status  OK
 
796
alter table t1 add b int;
 
797
INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZÌbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',1);
 
798
INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZÌbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',2);
 
799
delete from t1 where b=1;
 
800
INSERT INTO t1 VALUES('UUABCDEFGHIGKLMNOPRSTUVWXYZÌbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',1);
 
801
check table t1;
 
802
Table   Op      Msg_type        Msg_text
 
803
test.t1 check   status  OK
 
804
INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZÌbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',3);
 
805
INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZÌbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',4);
 
806
delete from t1 where b=3;
 
807
INSERT INTO t1 VALUES('uUABCDEFGHIGKLMNOPRSTUVWXYZÌbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',3);
 
808
check table t1;
 
809
Table   Op      Msg_type        Msg_text
 
810
test.t1 check   status  OK
 
811
drop table t1;
 
812
create table t1 (s1 char(5));
 
813
insert into t1 values
 
814
('a'),('b'),(null),('킁aaaa'),('ü'),('Y');
 
815
create index it1 on t1 (s1);
 
816
select s1 as before_delete_general_ci from t1 where s1 like '킁aaa%';
 
817
before_delete_general_ci
 
818
킁aaaa
 
819
delete from t1 where s1 = 'Y';
 
820
select s1 as after_delete_general_ci from t1 where s1 like '킁aaa%';
 
821
after_delete_general_ci
 
822
킁aaaa
 
823
drop table t1;
 
824
create table t1 (s1 char(5) collate utf8_unicode_ci);
 
825
insert into t1 values
 
826
('a'),('b'),(null),('킁aaaa'),('ü'),('Y');
 
827
create index it1 on t1 (s1);
 
828
select s1 as before_delete_unicode_ci from t1 where s1 like '킁aaa%';
 
829
before_delete_unicode_ci
 
830
킁aaaa
 
831
delete from t1 where s1 = 'Y';
 
832
select s1 as after_delete_unicode_ci from t1 where s1 like '킁aaa%';
 
833
after_delete_unicode_ci
 
834
킁aaaa
 
835
drop table t1;
 
836
create table t1 (s1 char(5) collate utf8_bin);
 
837
insert into t1 values
 
838
('a'),('b'),(null),('킁aaaa'),('ü'),('Y');
 
839
create index it1 on t1 (s1);
 
840
select s1 as before_delete_bin from t1 where s1 like '킁aaa%';
 
841
before_delete_bin
 
842
킁aaaa
 
843
delete from t1 where s1 = 'Y';
 
844
select s1 as after_delete_bin from t1 where s1 like '킁aaa%';
 
845
after_delete_bin
 
846
킁aaaa
 
847
drop table t1;
 
848
CREATE TEMPORARY TABLE t1 (id int PRIMARY KEY,
 
849
a varchar(16) collate utf8_unicode_ci NOT NULL default '',
 
850
b int,
 
851
f varchar(128) default 'XXX',
 
852
INDEX (a(4))
 
853
) ENGINE=MyISAM COLLATE=utf8_unicode_ci;
 
854
INSERT INTO t1(id, a, b) VALUES
 
855
(1, 'cccc', 50), (2, 'cccc', 70), (3, 'cccc', 30),
 
856
(4, 'cccc', 30), (5, 'cccc', 20), (6, 'bbbbbb', 40),
 
857
(7, 'dddd', 30), (8, 'aaaa', 10), (9, 'aaaa', 50),
 
858
(10, 'eeeee', 40), (11, 'bbbbbb', 60);
 
859
SELECT id, a, b FROM t1;
 
860
id      a       b
 
861
1       cccc    50
 
862
2       cccc    70
 
863
3       cccc    30
 
864
4       cccc    30
 
865
5       cccc    20
 
866
6       bbbbbb  40
 
867
7       dddd    30
 
868
8       aaaa    10
 
869
9       aaaa    50
 
870
10      eeeee   40
 
871
11      bbbbbb  60
 
872
SELECT id, a, b FROM t1 WHERE a BETWEEN 'aaaa' AND 'bbbbbb';
 
873
id      a       b
 
874
8       aaaa    10
 
875
9       aaaa    50
 
876
6       bbbbbb  40
 
877
11      bbbbbb  60
 
878
SELECT id, a FROM t1 WHERE a='bbbbbb';
 
879
id      a
 
880
6       bbbbbb
 
881
11      bbbbbb
 
882
SELECT id, a FROM t1 WHERE a='bbbbbb' ORDER BY b;
 
883
id      a
 
884
6       bbbbbb
 
885
11      bbbbbb
 
886
DROP TABLE t1;
 
887
CREATE TEMPORARY TABLE t1 (
 
888
a CHAR(13) DEFAULT '',
 
889
INDEX(a)
 
890
) ENGINE=MyISAM COLLATE=utf8_general_ci;
 
891
INSERT INTO t1 VALUES 
 
892
('KÃli KÃli 2-4'), ('KÃli KÃli 2-4'),
 
893
('KÃli KÃli 2+4'), ('KÃli KÃli 2+4'),
 
894
('KÃli KÃli 2-6'), ('KÃli KÃli 2-6');
 
895
CREATE TABLE t2 SELECT * FROM t1;
 
896
INSERT INTO t1 SELECT * FROM t2;
 
897
DROP TABLE t2;
 
898
SELECT a FROM t1 WHERE a LIKE 'KÃli KÃli 2+4';
 
899
a
 
900
KÃli KÃli 2+4
 
901
KÃli KÃli 2+4
 
902
KÃli KÃli 2+4
 
903
KÃli KÃli 2+4
 
904
EXPLAIN SELECT a FROM t1 WHERE a LIKE 'KÃli KÃli 2+4';
 
905
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
 
906
1       SIMPLE  t1      range   a       a       55      NULL    4       Using where; Using index
 
907
EXPLAIN SELECT a FROM t1 WHERE a = 'KÃli KÃli 2+4';
 
908
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
 
909
1       SIMPLE  t1      ref     a       a       55      const   4       Using where; Using index
 
910
DROP TABLE t1;
 
911
CREATE TEMPORARY TABLE t1 (
 
912
a char(255) DEFAULT '', 
 
913
KEY(a(10))
 
914
) ENGINE=MyISAM COLLATE=utf8_general_ci;
 
915
INSERT INTO t1 VALUES ('KÃli KÃli 2-4');
 
916
SELECT * FROM t1 WHERE a LIKE 'KÃli KÃli 2%';
 
917
a
 
918
KÃli KÃli 2-4
 
919
INSERT INTO t1 VALUES ('KÃli KÃli 2-4');
 
920
SELECT * FROM t1 WHERE a LIKE 'KÃli KÃli 2%';
 
921
a
 
922
KÃli KÃli 2-4
 
923
KÃli KÃli 2-4
 
924
DROP TABLE t1;
 
925
CREATE TEMPORARY TABLE t1 (
 
926
a char(255) DEFAULT ''
 
927
) ENGINE=MyISAM COLLATE=utf8_general_ci;
 
928
INSERT INTO t1 VALUES ('KÃli KÃli 2-4');
 
929
INSERT INTO t1 VALUES ('KÃli KÃli 2-4');
 
930
SELECT * FROM t1 WHERE a LIKE 'KÃli KÃli 2%';
 
931
a
 
932
KÃli KÃli 2-4
 
933
KÃli KÃli 2-4
 
934
ALTER TABLE t1 ADD KEY (a(10));
 
935
SELECT * FROM t1 WHERE a LIKE 'KÃli KÃli 2%';
 
936
a
 
937
KÃli KÃli 2-4
 
938
KÃli KÃli 2-4
 
939
DROP TABLE t1;
 
940
CREATE TEMPORARY TABLE t1 (
 
941
id int NOT NULL default '0',
 
942
tid int NOT NULL default '0',
 
943
val text NOT NULL,
 
944
INDEX idx(tid, val(10))
 
945
) ENGINE=MyISAM;
 
946
INSERT INTO t1 VALUES
 
947
(40988,72,'VOLNÝ ADSL'),(41009,72,'VOLNÝ ADSL'),
 
948
(41032,72,'VOLNÝ ADSL'),(41038,72,'VOLNÝ ADSL'),
 
949
(41063,72,'VOLNÝ ADSL'),(41537,72,'VOLNÝ ADSL Office'),
 
950
(42141,72,'VOLNÝ ADSL'),(42565,72,'VOLNÝ ADSL Combi'),
 
951
(42749,72,'VOLNÝ ADSL'),(44205,72,'VOLNÝ ADSL');
 
952
SELECT * FROM t1 WHERE tid=72 and val LIKE 'VOLNY ADSL';
 
953
id      tid     val
 
954
40988   72      VOLNÝ ADSL
 
955
41009   72      VOLNÝ ADSL
 
956
41032   72      VOLNÝ ADSL
 
957
41038   72      VOLNÝ ADSL
 
958
41063   72      VOLNÝ ADSL
 
959
42141   72      VOLNÝ ADSL
 
960
42749   72      VOLNÝ ADSL
 
961
44205   72      VOLNÝ ADSL
 
962
SELECT * FROM t1 WHERE tid=72 and val LIKE 'VOLNÝ ADSL';
 
963
id      tid     val
 
964
40988   72      VOLNÝ ADSL
 
965
41009   72      VOLNÝ ADSL
 
966
41032   72      VOLNÝ ADSL
 
967
41038   72      VOLNÝ ADSL
 
968
41063   72      VOLNÝ ADSL
 
969
42141   72      VOLNÝ ADSL
 
970
42749   72      VOLNÝ ADSL
 
971
44205   72      VOLNÝ ADSL
 
972
SELECT * FROM t1 WHERE tid=72 and val LIKE '%VOLNÝ ADSL';
 
973
id      tid     val
 
974
40988   72      VOLNÝ ADSL
 
975
41009   72      VOLNÝ ADSL
 
976
41032   72      VOLNÝ ADSL
 
977
41038   72      VOLNÝ ADSL
 
978
41063   72      VOLNÝ ADSL
 
979
42141   72      VOLNÝ ADSL
 
980
42749   72      VOLNÝ ADSL
 
981
44205   72      VOLNÝ ADSL
 
982
ALTER TABLE t1 DROP KEY idx;
 
983
ALTER TABLE t1 ADD KEY idx (tid,val(11));
 
984
SELECT * FROM t1 WHERE tid=72 and val LIKE 'VOLNÝ ADSL';
 
985
id      tid     val
 
986
40988   72      VOLNÝ ADSL
 
987
41009   72      VOLNÝ ADSL
 
988
41032   72      VOLNÝ ADSL
 
989
41038   72      VOLNÝ ADSL
 
990
41063   72      VOLNÝ ADSL
 
991
42141   72      VOLNÝ ADSL
 
992
42749   72      VOLNÝ ADSL
 
993
44205   72      VOLNÝ ADSL
 
994
DROP TABLE t1;
 
995
create table t1(a char(200) collate utf8_unicode_ci NOT NULL default '')
 
996
collate=utf8_unicode_ci;
 
997
insert into t1 values (unhex('65')), (unhex('C3A9')), (unhex('65'));
 
998
explain select distinct a from t1;
 
999
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
 
1000
1       SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    3       Using temporary
 
1001
select distinct a from t1;
 
1002
a
 
1003
e
 
1004
explain select a from t1 group by a;
 
1005
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
 
1006
1       SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    3       Using temporary; Using filesort
 
1007
select a from t1 group by a;
 
1008
a
 
1009
e
 
1010
drop table t1;
 
1011
create table t1(a char(10));
 
1012
insert into t1 values ('123'), ('456');
 
1013
explain
 
1014
select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1;
 
1015
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
 
1016
1       SIMPLE  Y       ALL     NULL    NULL    NULL    NULL    2       Using temporary; Using filesort
 
1017
1       SIMPLE  Z       ALL     NULL    NULL    NULL    NULL    2       Using where; Using join buffer
 
1018
select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1;
 
1019
substr(Z.a,-1)  a
 
1020
3       123
 
1021
6       456
 
1022
drop table t1;
 
1023
CREATE TABLE t1(id varchar(20) NOT NULL);
 
1024
INSERT INTO t1 VALUES ('xxx'), ('aa'), ('yyy'), ('aa');
 
1025
SELECT id FROM t1;
 
1026
id
 
1027
xxx
 
1028
aa
 
1029
yyy
 
1030
aa
 
1031
SELECT DISTINCT id FROM t1;
 
1032
id
 
1033
xxx
 
1034
aa
 
1035
yyy
 
1036
SELECT DISTINCT id FROM t1 ORDER BY id;
 
1037
id
 
1038
aa
 
1039
xxx
 
1040
yyy
 
1041
DROP TABLE t1;
 
1042
select hex(char(195));
 
1043
hex(char(195))
 
1044
C3
 
1045
select hex(char(196));
 
1046
hex(char(196))
 
1047
C4
 
1048
select hex(char(2557));
 
1049
hex(char(2557))
 
1050
09FD
 
1051
create table t1 (a char(1));
 
1052
create table t2 (a char(1));
 
1053
insert into t1 values('a'),('a'),(0xE38182),(0xE38182);
 
1054
insert into t1 values('i'),('i'),(0xE38184),(0xE38184);
 
1055
select * from t1 union distinct select * from t2;
 
1056
a
 
1057
a
 
1058
 
1059
i
 
1060
 
1061
drop table t1,t2;
 
1062
create table t1 (a varchar(10), b int);
 
1063
insert into t1 values ('a',1);
 
1064
select concat(a, if(b>10, 'x' 'x', 'y' 'y')) from t1;
 
1065
concat(a, if(b>10, 'x' 'x', 'y' 'y'))
 
1066
ayy
 
1067
select concat(a, if(b>10, 'x' 'æ', 'y' '킁')) from t1;
 
1068
concat(a, if(b>10, 'x' 'æ', 'y' '킁'))
 
1069
ay킁
 
1070
drop table t1;
 
1071
CREATE TABLE t1 (
 
1072
colA int NOT NULL,
 
1073
colB varchar(255) NOT NULL,
 
1074
PRIMARY KEY  (colA)
 
1075
) ENGINE=InnoDB;
 
1076
INSERT INTO t1 (colA, colB) VALUES (1, 'foo'), (2, 'foo bar');
 
1077
CREATE TABLE t2 (
 
1078
colA int NOT NULL,
 
1079
colB varchar(255) NOT NULL,
 
1080
KEY bad  (colA,colB(3))
 
1081
) ENGINE=InnoDB;
 
1082
INSERT INTO t2 (colA, colB) VALUES (1, 'foo'),(2, 'foo bar');
 
1083
SELECT * FROM t1 JOIN t2 ON t1.colA=t2.colA AND t1.colB=t2.colB
 
1084
WHERE t1.colA < 3;
 
1085
colA    colB    colA    colB
 
1086
1       foo     1       foo
 
1087
2       foo bar 2       foo bar
 
1088
DROP TABLE t1, t2;
 
1089
SELECT '½1234567890' UNION SELECT '1';
 
1090
½1234567890
 
1091
½1234567890
 
1092
1
 
1093
SELECT '½1234567890' UNION SELECT 1;
 
1094
½1234567890
 
1095
½1234567890
 
1096
1
 
1097
SELECT '1' UNION SELECT '킱1234567890';
 
1098
1
 
1099
1
 
1100
 
1101
SELECT 1 UNION SELECT '킱1234567890';
 
1102
1
 
1103
1
 
1104
킱1
 
1105
CREATE TABLE t1 (c VARCHAR(11));
 
1106
CREATE TABLE t2 (b CHAR(1), i INT);
 
1107
INSERT INTO t1 (c) VALUES ('킱1234567890');
 
1108
INSERT INTO t2 (b, i) VALUES ('1', 1);
 
1109
SELECT c FROM t1 UNION SELECT b FROM t2;
 
1110
c
 
1111
킱1234567890
 
1112
1
 
1113
SELECT c FROM t1 UNION SELECT i FROM t2;
 
1114
c
 
1115
킱1234567890
 
1116
1
 
1117
SELECT b FROM t2 UNION SELECT c FROM t1;
 
1118
b
 
1119
1
 
1120
킱1234567890
 
1121
SELECT i FROM t2 UNION SELECT c FROM t1;
 
1122
i
 
1123
1
 
1124
킱1234567890
 
1125
DROP TABLE t1, t2;
 
1126
DROP TABLE IF EXISTS t1;
 
1127
CREATE TABLE t1 (
 
1128
predicted_order int NOT NULL,
 
1129
utf8_encoding VARCHAR(10) NOT NULL
 
1130
);
 
1131
INSERT INTO t1 VALUES (19, x'E0B696'), (30, x'E0B69AE0B798'), (61, x'E0B6AF'), (93, x'E0B799'), (52, x'E0B6A6'), (73, x'E0B6BBE0B78AE2808D'), (3, x'E0B686'), (56, x'E0B6AA'), (55, x'E0B6A9'), (70, x'E0B6B9'), (94, x'E0B79A'), (80, x'E0B785'), (25, x'E0B69AE0B791'), (48, x'E0B6A2'), (13, x'E0B690'), (86, x'E0B793'), (91, x'E0B79F'), (81, x'E0B786'), (79, x'E0B784'), (14, x'E0B691'), (99, x'E0B78A'), (8, x'E0B68B'), (68, x'E0B6B7'), (22, x'E0B69A'), (16, x'E0B693'), (33, x'E0B69AE0B7B3'), (38, x'E0B69AE0B79D'), (21, x'E0B683'), (11, x'E0B68E'), (77, x'E0B782'), (40, x'E0B69AE0B78A'), (101, x'E0B78AE2808DE0B6BB'), (35, x'E0B69AE0B79A'), (1, x'E0B7B4'), (9, x'E0B68C'), (96, x'E0B79C'), (6, x'E0B689'), (95, x'E0B79B'), (88, x'E0B796'), (64, x'E0B6B3'), (26, x'E0B69AE0B792'), (82, x'E0B78F'), (28, x'E0B69AE0B794'), (39, x'E0B69AE0B79E'), (97, x'E0B79D'), (2, x'E0B685'), (75, x'E0B780'), (34, x'E0B69AE0B799'), (69, x'E0B6B8'), (83, x'E0B790'), (18, x'E0B695'), (90, x'E0B7B2'), (17, x'E0B694'), (72, x'E0B6BB'), (66, x'E0B6B5'), (59, x'E0B6AD'), (44, x'E0B69E'), (15, x'E0B692'), (23, x'E0B69AE0B78F'), (65, x'E0B6B4'), (42, x'E0B69C'), (63, x'E0B6B1'), (85, x'E0B792'), (47, x'E0B6A1'), (49, x'E0B6A3'), (92, x'E0B7B3'), (78, x'E0B783'), (36, x'E0B69AE0B79B'), (4, x'E0B687'), (24, x'E0B69AE0B790'), (87, x'E0B794'), (37, x'E0B69AE0B79C'), (32, x'E0B69AE0B79F'), (29, x'E0B69AE0B796'), (43, x'E0B69D'), (62, x'E0B6B0'), (100, x'E0B78AE2808DE0B6BA'), (60, x'E0B6AE'), (45, x'E0B69F'), (12, x'E0B68F'), (46, x'E0B6A0'), (50, x'E0B6A5'), (51, x'E0B6A4'), (5, x'E0B688'), (76, x'E0B781'), (89, x'E0B798'), (74, x'E0B6BD'), (10, x'E0B68D'), (57, x'E0B6AB'), (71, x'E0B6BA'), (58, x'E0B6AC'), (27, x'E0B69AE0B793'), (54, x'E0B6A8'), (84, x'E0B791'), (31, x'E0B69AE0B7B2'), (98, x'E0B79E'), (53, x'E0B6A7'), (41, x'E0B69B'), (67, x'E0B6B6'), (7, x'E0B68A'), (20, x'E0B682');
 
1132
SELECT predicted_order, hex(utf8_encoding) FROM t1 ORDER BY utf8_encoding COLLATE utf8_sinhala_ci;
 
1133
predicted_order hex(utf8_encoding)
 
1134
1       E0B7B4
 
1135
2       E0B685
 
1136
3       E0B686
 
1137
4       E0B687
 
1138
5       E0B688
 
1139
6       E0B689
 
1140
7       E0B68A
 
1141
8       E0B68B
 
1142
9       E0B68C
 
1143
10      E0B68D
 
1144
11      E0B68E
 
1145
12      E0B68F
 
1146
13      E0B690
 
1147
14      E0B691
 
1148
15      E0B692
 
1149
16      E0B693
 
1150
17      E0B694
 
1151
18      E0B695
 
1152
19      E0B696
 
1153
20      E0B682
 
1154
21      E0B683
 
1155
22      E0B69A
 
1156
23      E0B69AE0B78F
 
1157
24      E0B69AE0B790
 
1158
25      E0B69AE0B791
 
1159
26      E0B69AE0B792
 
1160
27      E0B69AE0B793
 
1161
28      E0B69AE0B794
 
1162
29      E0B69AE0B796
 
1163
30      E0B69AE0B798
 
1164
31      E0B69AE0B7B2
 
1165
32      E0B69AE0B79F
 
1166
33      E0B69AE0B7B3
 
1167
34      E0B69AE0B799
 
1168
35      E0B69AE0B79A
 
1169
36      E0B69AE0B79B
 
1170
37      E0B69AE0B79C
 
1171
38      E0B69AE0B79D
 
1172
39      E0B69AE0B79E
 
1173
40      E0B69AE0B78A
 
1174
41      E0B69B
 
1175
42      E0B69C
 
1176
43      E0B69D
 
1177
44      E0B69E
 
1178
45      E0B69F
 
1179
46      E0B6A0
 
1180
47      E0B6A1
 
1181
48      E0B6A2
 
1182
49      E0B6A3
 
1183
50      E0B6A5
 
1184
51      E0B6A4
 
1185
52      E0B6A6
 
1186
53      E0B6A7
 
1187
54      E0B6A8
 
1188
55      E0B6A9
 
1189
56      E0B6AA
 
1190
57      E0B6AB
 
1191
58      E0B6AC
 
1192
59      E0B6AD
 
1193
60      E0B6AE
 
1194
61      E0B6AF
 
1195
62      E0B6B0
 
1196
63      E0B6B1
 
1197
64      E0B6B3
 
1198
65      E0B6B4
 
1199
66      E0B6B5
 
1200
67      E0B6B6
 
1201
68      E0B6B7
 
1202
69      E0B6B8
 
1203
70      E0B6B9
 
1204
71      E0B6BA
 
1205
72      E0B6BB
 
1206
73      E0B6BBE0B78AE2808D
 
1207
74      E0B6BD
 
1208
75      E0B780
 
1209
76      E0B781
 
1210
77      E0B782
 
1211
78      E0B783
 
1212
79      E0B784
 
1213
80      E0B785
 
1214
81      E0B786
 
1215
82      E0B78F
 
1216
83      E0B790
 
1217
84      E0B791
 
1218
85      E0B792
 
1219
86      E0B793
 
1220
87      E0B794
 
1221
88      E0B796
 
1222
89      E0B798
 
1223
90      E0B7B2
 
1224
91      E0B79F
 
1225
92      E0B7B3
 
1226
93      E0B799
 
1227
94      E0B79A
 
1228
95      E0B79B
 
1229
96      E0B79C
 
1230
97      E0B79D
 
1231
98      E0B79E
 
1232
99      E0B78A
 
1233
100     E0B78AE2808DE0B6BA
 
1234
101     E0B78AE2808DE0B6BB
 
1235
DROP TABLE t1;
 
1236
End of 5.1 tests
 
1237
set max_sort_length=5;
 
1238
select @@max_sort_length;
 
1239
@@max_sort_length
 
1240
5
 
1241
create table t1 (a varchar(128) collate utf8_general_ci);
 
1242
insert into t1 values ('a'),('b'),('c');
 
1243
select * from t1 order by a;
 
1244
a
 
1245
a
 
1246
b
 
1247
c
 
1248
alter table t1 modify a varchar(128) collate utf8_bin;
 
1249
select * from t1 order by a;
 
1250
a
 
1251
a
 
1252
b
 
1253
c
 
1254
drop table t1;
 
1255
set max_sort_length=default;
 
1256
DROP TABLE IF EXISTS t1;
 
1257
CREATE TABLE t1 (
 
1258
predicted_order int NOT NULL,
 
1259
utf8_encoding VARCHAR(10) NOT NULL
 
1260
);
 
1261
INSERT INTO t1 VALUES (19, x'E0B696'), (30, x'E0B69AE0B798'), (61, x'E0B6AF'), (93, x'E0B799'), (52, x'E0B6A6'), (73, x'E0B6BBE0B78AE2808D'), (3, x'E0B686'), (56, x'E0B6AA'), (55, x'E0B6A9'), (70, x'E0B6B9'), (94, x'E0B79A'), (80, x'E0B785'), (25, x'E0B69AE0B791'), (48, x'E0B6A2'), (13, x'E0B690'), (86, x'E0B793'), (91, x'E0B79F'), (81, x'E0B786'), (79, x'E0B784'), (14, x'E0B691'), (99, x'E0B78A'), (8, x'E0B68B'), (68, x'E0B6B7'), (22, x'E0B69A'), (16, x'E0B693'), (33, x'E0B69AE0B7B3'), (38, x'E0B69AE0B79D'), (21, x'E0B683'), (11, x'E0B68E'), (77, x'E0B782'), (40, x'E0B69AE0B78A'), (101, x'E0B78AE2808DE0B6BB'), (35, x'E0B69AE0B79A'), (1, x'E0B7B4'), (9, x'E0B68C'), (96, x'E0B79C'), (6, x'E0B689'), (95, x'E0B79B'), (88, x'E0B796'), (64, x'E0B6B3'), (26, x'E0B69AE0B792'), (82, x'E0B78F'), (28, x'E0B69AE0B794'), (39, x'E0B69AE0B79E'), (97, x'E0B79D'), (2, x'E0B685'), (75, x'E0B780'), (34, x'E0B69AE0B799'), (69, x'E0B6B8'), (83, x'E0B790'), (18, x'E0B695'), (90, x'E0B7B2'), (17, x'E0B694'), (72, x'E0B6BB'), (66, x'E0B6B5'), (59, x'E0B6AD'), (44, x'E0B69E'), (15, x'E0B692'), (23, x'E0B69AE0B78F'), (65, x'E0B6B4'), (42, x'E0B69C'), (63, x'E0B6B1'), (85, x'E0B792'), (47, x'E0B6A1'), (49, x'E0B6A3'), (92, x'E0B7B3'), (78, x'E0B783'), (36, x'E0B69AE0B79B'), (4, x'E0B687'), (24, x'E0B69AE0B790'), (87, x'E0B794'), (37, x'E0B69AE0B79C'), (32, x'E0B69AE0B79F'), (29, x'E0B69AE0B796'), (43, x'E0B69D'), (62, x'E0B6B0'), (100, x'E0B78AE2808DE0B6BA'), (60, x'E0B6AE'), (45, x'E0B69F'), (12, x'E0B68F'), (46, x'E0B6A0'), (50, x'E0B6A5'), (51, x'E0B6A4'), (5, x'E0B688'), (76, x'E0B781'), (89, x'E0B798'), (74, x'E0B6BD'), (10, x'E0B68D'), (57, x'E0B6AB'), (71, x'E0B6BA'), (58, x'E0B6AC'), (27, x'E0B69AE0B793'), (54, x'E0B6A8'), (84, x'E0B791'), (31, x'E0B69AE0B7B2'), (98, x'E0B79E'), (53, x'E0B6A7'), (41, x'E0B69B'), (67, x'E0B6B6'), (7, x'E0B68A'), (20, x'E0B682');
 
1262
SELECT predicted_order, hex(utf8_encoding) FROM t1 ORDER BY utf8_encoding COLLATE utf8_sinhala_ci;
 
1263
predicted_order hex(utf8_encoding)
 
1264
1       E0B7B4
 
1265
2       E0B685
 
1266
3       E0B686
 
1267
4       E0B687
 
1268
5       E0B688
 
1269
6       E0B689
 
1270
7       E0B68A
 
1271
8       E0B68B
 
1272
9       E0B68C
 
1273
10      E0B68D
 
1274
11      E0B68E
 
1275
12      E0B68F
 
1276
13      E0B690
 
1277
14      E0B691
 
1278
15      E0B692
 
1279
16      E0B693
 
1280
17      E0B694
 
1281
18      E0B695
 
1282
19      E0B696
 
1283
20      E0B682
 
1284
21      E0B683
 
1285
22      E0B69A
 
1286
23      E0B69AE0B78F
 
1287
24      E0B69AE0B790
 
1288
25      E0B69AE0B791
 
1289
26      E0B69AE0B792
 
1290
27      E0B69AE0B793
 
1291
28      E0B69AE0B794
 
1292
29      E0B69AE0B796
 
1293
30      E0B69AE0B798
 
1294
31      E0B69AE0B7B2
 
1295
32      E0B69AE0B79F
 
1296
33      E0B69AE0B7B3
 
1297
34      E0B69AE0B799
 
1298
35      E0B69AE0B79A
 
1299
36      E0B69AE0B79B
 
1300
37      E0B69AE0B79C
 
1301
38      E0B69AE0B79D
 
1302
39      E0B69AE0B79E
 
1303
40      E0B69AE0B78A
 
1304
41      E0B69B
 
1305
42      E0B69C
 
1306
43      E0B69D
 
1307
44      E0B69E
 
1308
45      E0B69F
 
1309
46      E0B6A0
 
1310
47      E0B6A1
 
1311
48      E0B6A2
 
1312
49      E0B6A3
 
1313
50      E0B6A5
 
1314
51      E0B6A4
 
1315
52      E0B6A6
 
1316
53      E0B6A7
 
1317
54      E0B6A8
 
1318
55      E0B6A9
 
1319
56      E0B6AA
 
1320
57      E0B6AB
 
1321
58      E0B6AC
 
1322
59      E0B6AD
 
1323
60      E0B6AE
 
1324
61      E0B6AF
 
1325
62      E0B6B0
 
1326
63      E0B6B1
 
1327
64      E0B6B3
 
1328
65      E0B6B4
 
1329
66      E0B6B5
 
1330
67      E0B6B6
 
1331
68      E0B6B7
 
1332
69      E0B6B8
 
1333
70      E0B6B9
 
1334
71      E0B6BA
 
1335
72      E0B6BB
 
1336
73      E0B6BBE0B78AE2808D
 
1337
74      E0B6BD
 
1338
75      E0B780
 
1339
76      E0B781
 
1340
77      E0B782
 
1341
78      E0B783
 
1342
79      E0B784
 
1343
80      E0B785
 
1344
81      E0B786
 
1345
82      E0B78F
 
1346
83      E0B790
 
1347
84      E0B791
 
1348
85      E0B792
 
1349
86      E0B793
 
1350
87      E0B794
 
1351
88      E0B796
 
1352
89      E0B798
 
1353
90      E0B7B2
 
1354
91      E0B79F
 
1355
92      E0B7B3
 
1356
93      E0B799
 
1357
94      E0B79A
 
1358
95      E0B79B
 
1359
96      E0B79C
 
1360
97      E0B79D
 
1361
98      E0B79E
 
1362
99      E0B78A
 
1363
100     E0B78AE2808DE0B6BA
 
1364
101     E0B78AE2808DE0B6BB
 
1365
DROP TABLE t1;
 
1366
select CAST('☂ ' as char(1));
 
1367
CAST('☂ ' as char(1))
 
1368
 
1369
Warnings:
 
1370
Warning 1292    Truncated incorrect CHAR(1) value: '☂ '
 
1371
show warnings;
 
1372
Level   Code    Message
 
1373
Warning 1292    Truncated incorrect CHAR(1) value: '☂ '
 
1374
SELECT "☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃";
 
1375
☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃
 
1376
☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃☃