summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/r/innodb_ctype_ldml.result
blob: 82679961d6826f7b9136f77b81e3a0d4d5619b2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
drop table if exists t1;
In the following tests we change the order of letter "b"
making it equal to letter "a", and check that it works
with all Unicode character sets
set names utf8;
show variables like 'character_sets_dir%';
Variable_name	Value
character_sets_dir	MYSQL_TEST_DIR/std_data/ldml/
show collation like 'utf8mb3_phone_ci';
Collation	Charset	Id	Default	Compiled	Sortlen
utf8mb3_phone_ci	utf8mb3	352			8
CREATE TABLE t1 (
name VARCHAR(64),
phone VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_phone_ci
);
INSERT INTO t1 VALUES ('Svoj','+7 912 800 80 02');
INSERT INTO t1 VALUES ('Hf','+7 (912) 800 80 04');
INSERT INTO t1 VALUES ('Bar','+7-912-800-80-01');
INSERT INTO t1 VALUES ('Ramil','(7912) 800 80 03');
INSERT INTO t1 VALUES ('Sanja','+380 (912) 8008005');
SELECT * FROM t1 ORDER BY phone;
name	phone
Sanja	+380 (912) 8008005
Bar	+7-912-800-80-01
Svoj	+7 912 800 80 02
Ramil	(7912) 800 80 03
Hf	+7 (912) 800 80 04
SELECT * FROM t1 WHERE phone='+7(912)800-80-01';
name	phone
Bar	+7-912-800-80-01
SELECT * FROM t1 WHERE phone='79128008001';
name	phone
Bar	+7-912-800-80-01
SELECT * FROM t1 WHERE phone='7 9 1 2 8 0 0 8 0 0 1';
name	phone
Bar	+7-912-800-80-01
DROP TABLE t1;
show collation like 'utf8mb3_test_ci';
Collation	Charset	Id	Default	Compiled	Sortlen
utf8mb3_test_ci	utf8mb3	353			8
create table t1 (c1 char(1) character set utf8 collate utf8_test_ci);
insert into t1 values ('a');
select * from t1 where c1='b';
c1
a
drop table t1;
show collation like 'ucs2_test_ci';
Collation	Charset	Id	Default	Compiled	Sortlen
ucs2_test_ci	ucs2	358			8
create table t1 (c1 char(1) character set ucs2 collate ucs2_test_ci);
insert into t1 values ('a');
select * from t1 where c1='b';
c1
a
drop table t1;
show collation like 'utf8mb4_test_ci';
Collation	Charset	Id	Default	Compiled	Sortlen
utf8mb4_test_ci	utf8mb4	326			8
create table t1 (c1 char(1) character set utf8mb4 collate utf8mb4_test_ci);
insert into t1 values ('a');
select * from t1 where c1='b';
c1
a
drop table t1;
show collation like 'utf16_test_ci';
Collation	Charset	Id	Default	Compiled	Sortlen
utf16_test_ci	utf16	327			8
create table t1 (c1 char(1) character set utf16 collate utf16_test_ci);
insert into t1 values ('a');
select * from t1 where c1='b';
c1
a
drop table t1;
show collation like 'utf32_test_ci';
Collation	Charset	Id	Default	Compiled	Sortlen
utf32_test_ci	utf32	391			8
create table t1 (c1 char(1) character set utf32 collate utf32_test_ci);
insert into t1 values ('a');
select * from t1 where c1='b';
c1
a
drop table t1;
#
# Bug#45645 Mysql server close all connection and restart using lower function
#
CREATE TABLE t1 (a VARCHAR(10)) CHARACTER SET utf8 COLLATE utf8_test_ci;
INSERT INTO t1 (a) VALUES ('hello!');
SELECT * FROM t1 WHERE LOWER(a)=LOWER('N');
a
DROP TABLE t1;
#
# Bug#51976 LDML collations issue (cyrillic example)
#
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_test_ci);
INSERT INTO t1 (a) VALUES ('Hello');
SELECT a, UPPER(a), LOWER(a) FROM t1;
a	UPPER(a)	LOWER(a)
Hello	HELLO	hello
DROP TABLE t1;
#
# Bug#43827 Server closes connections and restarts
#
CREATE TABLE t1 (c1 VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_test_ci);
INSERT IGNORE INTO t1 SELECT REPEAT('a',11);
Warnings:
Warning	1265	Data truncated for column 'c1' at row 1
DROP TABLE t1;
Vietnamese experimental collation
show collation like 'ucs2_vn_ci';
Collation	Charset	Id	Default	Compiled	Sortlen
ucs2_vn_ci	ucs2	359			8
create table t1 (c1 char(1) character set ucs2 collate ucs2_vn_ci);
insert into t1 values (0x0061),(0x0041),(0x00E0),(0x00C0),(0x1EA3),(0x1EA2),
(0x00E3),(0x00C3),(0x00E1),(0x00C1),(0x1EA1),(0x1EA0);
insert into t1 values (0x0103),(0x0102),(0x1EB1),(0x1EB0),(0x1EB3),(0x1EB2),
(0x1EB5),(0x1EB4),(0x1EAF),(0x1EAE),(0x1EB7),(0x1EB6);
insert into t1 values (0x00E2),(0x00C2),(0x1EA7),(0x1EA6),(0x1EA9),(0x1EA8),
(0x1EAB),(0x1EAA),(0x1EA5),(0x1EA4),(0x1EAD),(0x1EAC);
insert into t1 values ('b'),('B'),('c'),('C');
insert into t1 values ('d'),('D'),(0x0111),(0x0110);
insert into t1 values (0x0065),(0x0045),(0x00E8),(0x00C8),(0x1EBB),(0x1EBA),
(0x1EBD),(0x1EBC),(0x00E9),(0x00C9),(0x1EB9),(0x1EB8);
insert into t1 values (0x00EA),(0x00CA),(0x1EC1),(0x1EC0),(0x1EC3),(0x1EC2),
(0x1EC5),(0x1EC4),(0x1EBF),(0x1EBE),(0x1EC7),(0x1EC6);
insert into t1 values ('g'),('G'),('h'),('H');
insert into t1 values (0x0069),(0x0049),(0x00EC),(0x00CC),(0x1EC9),(0x1EC8),
(0x0129),(0x0128),(0x00ED),(0x00CD),(0x1ECB),(0x1ECA);
insert into t1 values ('k'),('K'),('l'),('L'),('m'),('M');
insert into t1 values (0x006F),(0x004F),(0x00F2),(0x00D2),(0x1ECF),(0x1ECE),
(0x00F5),(0x00D5),(0x00F3),(0x00D3),(0x1ECD),(0x1ECC);
insert into t1 values (0x00F4),(0x00D4),(0x1ED3),(0x1ED2),(0x1ED5),(0x1ED4),
(0x1ED7),(0x1ED6),(0x1ED1),(0x1ED0),(0x1ED9),(0x1ED8);
insert into t1 values (0x01A1),(0x01A0),(0x1EDD),(0x1EDC),(0x1EDF),(0x1EDE),
(0x1EE1),(0x1EE0),(0x1EDB),(0x1EDA),(0x1EE3),(0x1EE2);
insert into t1 values ('p'),('P'),('q'),('Q'),('r'),('R'),('s'),('S'),('t'),('T');
insert into t1 values (0x0075),(0x0055),(0x00F9),(0x00D9),(0x1EE7),(0x1EE6),
(0x0169),(0x0168),(0x00FA),(0x00DA),(0x1EE5),(0x1EE4);
insert into t1 values (0x01B0),(0x01AF),(0x1EEB),(0x1EEA),(0x1EED),(0x1EEC),
(0x1EEF),(0x1EEE),(0x1EE9),(0x1EE8),(0x1EF1),(0x1EF0);
insert into t1 values ('v'),('V'),('x'),('X');
insert into t1 values (0x0079),(0x0059),(0x1EF3),(0x1EF2),(0x1EF7),(0x1EF6),
(0x1EF9),(0x1EF8),(0x00FD),(0x00DD),(0x1EF5),(0x1EF4);
select hex(c1) as h, c1 from t1 order by c1, h;
h	c1
0041	A
0061	a
00C0	À
00C1	Á
00C3	Ã
00E0	à
00E1	á
00E3	ã
1EA0	Ạ
1EA1	ạ
1EA2	Ả
1EA3	ả
0102	Ă
0103	ă
1EAE	Ắ
1EAF	ắ
1EB0	Ằ
1EB1	ằ
1EB2	Ẳ
1EB3	ẳ
1EB4	Ẵ
1EB5	ẵ
1EB6	Ặ
1EB7	ặ
00C2	Â
00E2	â
1EA4	Ấ
1EA5	ấ
1EA6	Ầ
1EA7	ầ
1EA8	Ẩ
1EA9	ẩ
1EAA	Ẫ
1EAB	ẫ
1EAC	Ậ
1EAD	ậ
0042	B
0062	b
0043	C
0063	c
0044	D
0064	d
0110	Đ
0111	đ
0045	E
0065	e
00C8	È
00C9	É
00E8	è
00E9	é
1EB8	Ẹ
1EB9	ẹ
1EBA	Ẻ
1EBB	ẻ
1EBC	Ẽ
1EBD	ẽ
00CA	Ê
00EA	ê
1EBE	Ế
1EBF	ế
1EC0	Ề
1EC1	ề
1EC2	Ể
1EC3	ể
1EC4	Ễ
1EC5	ễ
1EC6	Ệ
1EC7	ệ
0047	G
0067	g
0048	H
0068	h
0049	I
0069	i
00CC	Ì
00CD	Í
00EC	ì
00ED	í
0128	Ĩ
0129	ĩ
1EC8	Ỉ
1EC9	ỉ
1ECA	Ị
1ECB	ị
004B	K
006B	k
004C	L
006C	l
004D	M
006D	m
004F	O
006F	o
00D2	Ò
00D3	Ó
00D5	Õ
00F2	ò
00F3	ó
00F5	õ
1ECC	Ọ
1ECD	ọ
1ECE	Ỏ
1ECF	ỏ
00D4	Ô
00F4	ô
1ED0	Ố
1ED1	ố
1ED2	Ồ
1ED3	ồ
1ED4	Ổ
1ED5	ổ
1ED6	Ỗ
1ED7	ỗ
1ED8	Ộ
1ED9	ộ
01A0	Ơ
01A1	ơ
1EDA	Ớ
1EDB	ớ
1EDC	Ờ
1EDD	ờ
1EDE	Ở
1EDF	ở
1EE0	Ỡ
1EE1	ỡ
1EE2	Ợ
1EE3	ợ
0050	P
0070	p
0051	Q
0071	q
0052	R
0072	r
0053	S
0073	s
0054	T
0074	t
0055	U
0075	u
00D9	Ù
00DA	Ú
00F9	ù
00FA	ú
0168	Ũ
0169	ũ
1EE4	Ụ
1EE5	ụ
1EE6	Ủ
1EE7	ủ
01AF	Ư
01B0	ư
1EE8	Ứ
1EE9	ứ
1EEA	Ừ
1EEB	ừ
1EEC	Ử
1EED	ử
1EEE	Ữ
1EEF	ữ
1EF0	Ự
1EF1	ự
0056	V
0076	v
0058	X
0078	x
0059	Y
0079	y
00DD	Ý
00FD	ý
1EF2	Ỳ
1EF3	ỳ
1EF4	Ỵ
1EF5	ỵ
1EF6	Ỷ
1EF7	ỷ
1EF8	Ỹ
1EF9	ỹ
select group_concat(hex(c1) order by hex(c1)) from t1 group by c1;
group_concat(hex(c1) order by hex(c1))
0041,0061,00C0,00C1,00C3,00E0,00E1,00E3,1EA0,1EA1,1EA2,1EA3
0102,0103,1EAE,1EAF,1EB0,1EB1,1EB2,1EB3,1EB4,1EB5,1EB6,1EB7
00C2,00E2,1EA4,1EA5,1EA6,1EA7,1EA8,1EA9,1EAA,1EAB,1EAC,1EAD
0042,0062
0043,0063
0044,0064
0110,0111
0045,0065,00C8,00C9,00E8,00E9,1EB8,1EB9,1EBA,1EBB,1EBC,1EBD
00CA,00EA,1EBE,1EBF,1EC0,1EC1,1EC2,1EC3,1EC4,1EC5,1EC6,1EC7
0047,0067
0048,0068
0049,0069,00CC,00CD,00EC,00ED,0128,0129,1EC8,1EC9,1ECA,1ECB
004B,006B
004C,006C
004D,006D
004F,006F,00D2,00D3,00D5,00F2,00F3,00F5,1ECC,1ECD,1ECE,1ECF
00D4,00F4,1ED0,1ED1,1ED2,1ED3,1ED4,1ED5,1ED6,1ED7,1ED8,1ED9
01A0,01A1,1EDA,1EDB,1EDC,1EDD,1EDE,1EDF,1EE0,1EE1,1EE2,1EE3
0050,0070
0051,0071
0052,0072
0053,0073
0054,0074
0055,0075,00D9,00DA,00F9,00FA,0168,0169,1EE4,1EE5,1EE6,1EE7
01AF,01B0,1EE8,1EE9,1EEA,1EEB,1EEC,1EED,1EEE,1EEF,1EF0,1EF1
0056,0076
0058,0078
0059,0079,00DD,00FD,1EF2,1EF3,1EF4,1EF5,1EF6,1EF7,1EF8,1EF9
select group_concat(c1 order by hex(c1) SEPARATOR '') from t1 group by c1;
group_concat(c1 order by hex(c1) SEPARATOR '')
AaÀÁÃàáãẠạẢả
ĂăẮắẰằẲẳẴẵẶặ
ÂâẤấẦầẨẩẪẫẬậ
Bb
Cc
Dd
Đđ
EeÈÉèéẸẹẺẻẼẽ
ÊêẾếỀềỂểỄễỆệ
Gg
Hh
IiÌÍìíĨĩỈỉỊị
Kk
Ll
Mm
OoÒÓÕòóõỌọỎỏ
ÔôỐốỒồỔổỖỗỘộ
ƠơỚớỜờỞởỠỡỢợ
Pp
Qq
Rr
Ss
Tt
UuÙÚùúŨũỤụỦủ
ƯưỨứỪừỬửỮữỰự
Vv
Xx
YyÝýỲỳỴỵỶỷỸỹ
drop table t1;
Bug#46448 trailing spaces are not ignored when user collation maps space != 0x20
set names latin1;
show collation like 'latin1_test';
Collation	Charset	Id	Default	Compiled	Sortlen
latin1_test	latin1	331			1
select "foo" = "foo " collate latin1_test;
"foo" = "foo " collate latin1_test
1
The following tests check that two-byte collation IDs work
select * from information_schema.collations where id>256 and is_compiled<>'Yes' order by id;
COLLATION_NAME	CHARACTER_SET_NAME	ID	IS_DEFAULT	IS_COMPILED	SORTLEN
ascii2_general_nopad_ci	ascii2	318			1
ascii2_bin2	ascii2	319			1
ascii2_general_ci	ascii2	320	Yes		1
ascii2_bin	ascii2	321			1
ascii2_general_inherited_ci	ascii2	322			1
ascii2_general_inherited2_ci	ascii2	323			1
ascii2_badly_inherited_ci	ascii2	324			1
ascii2_nopad_bin	ascii2	325			1
utf8mb4_test_ci	utf8mb4	326			8
utf16_test_ci	utf16	327			8
utf8mb4_test_400_ci	utf8mb4	328			8
utf8mb4_test_520_nopad_ci	utf8mb4	329			8
latin1_test	latin1	331			1
latin1_test2	latin1	332			1
latin1_test2_cs	latin1	333			1
latin1_swedish_nopad2_ci	latin1	334			1
utf8mb3_bengali_standard_ci	utf8mb3	336			8
utf8mb3_bengali_traditional_ci	utf8mb3	337			8
utf8mb3_implicit_weights_ci	utf8mb3	338			8
utf8mb3_phone_ci	utf8mb3	352			8
utf8mb3_test_ci	utf8mb3	353			8
utf8mb3_5624_1	utf8mb3	354			8
utf8mb3_5624_2	utf8mb3	355			8
utf8mb3_5624_3	utf8mb3	356			8
utf8mb3_5624_4	utf8mb3	357			8
ucs2_test_ci	ucs2	358			8
ucs2_vn_ci	ucs2	359			8
ucs2_5624_1	ucs2	360			8
utf8mb3_5624_5	utf8mb3	368			8
utf8mb3_5624_5_bad	utf8mb3	369			8
utf8mb3_czech_test_w2	utf8mb3	370			4
utf8mb3_czech_test_nopad_w2	utf8mb3	371			4
utf8mb3_czech_test_bad_w2	utf8mb3	372			4
utf32_test_ci	utf32	391			8
utf8mb3_maxuserid_ci	utf8mb3	2047			8
show collation like '%test%';
Collation	Charset	Id	Default	Compiled	Sortlen
latin1_test	latin1	331			1
latin1_test2	latin1	332			1
latin1_test2_cs	latin1	333			1
utf8mb3_test_ci	utf8mb3	353			8
utf8mb3_czech_test_w2	utf8mb3	370			4
utf8mb3_czech_test_nopad_w2	utf8mb3	371			4
utf8mb3_czech_test_bad_w2	utf8mb3	372			4
ucs2_test_ci	ucs2	358			8
utf8mb4_test_ci	utf8mb4	326			8
utf8mb4_test_400_ci	utf8mb4	328			8
utf8mb4_test_520_nopad_ci	utf8mb4	329			8
utf16_test_ci	utf16	327			8
utf32_test_ci	utf32	391			8
show collation like 'ucs2_vn_ci';
Collation	Charset	Id	Default	Compiled	Sortlen
ucs2_vn_ci	ucs2	359			8
create table t1 (c1 char(1) character set ucs2 collate ucs2_vn_ci);
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `c1` char(1) CHARACTER SET ucs2 COLLATE ucs2_vn_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
insert into t1 values (0x0061);
set @@character_set_results=NULL;
select * from t1;
Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
def	test	t1	t1	c1	c1	254	2	2	Y	0	0	359
c1