/
ctype_big5.result
5391 lines (5389 loc) · 152 KB
/
ctype_big5.result
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
drop table if exists t1;
SET @test_character_set= 'big5';
SET @test_collation= 'big5_chinese_ci';
SET @safe_character_set_server= @@character_set_server;
SET @safe_collation_server= @@collation_server;
SET @safe_character_set_client= @@character_set_client;
SET @safe_character_set_results= @@character_set_results;
SET character_set_server= @test_character_set;
SET collation_server= @test_collation;
CREATE DATABASE d1;
USE d1;
CREATE TABLE t1 (c CHAR(10), KEY(c));
SHOW FULL COLUMNS FROM t1;
Field Type Collation Null Key Default Extra Privileges Comment
c char(10) big5_chinese_ci YES MUL NULL
INSERT INTO t1 VALUES ('aaa'),('aaaa'),('aaaaa');
SELECT c as want3results FROM t1 WHERE c LIKE 'aaa%';
want3results
aaa
aaaa
aaaaa
DROP TABLE t1;
CREATE TABLE t1 (c1 varchar(15), KEY c1 (c1(2)));
SHOW FULL COLUMNS FROM t1;
Field Type Collation Null Key Default Extra Privileges Comment
c1 varchar(15) big5_chinese_ci YES MUL NULL
INSERT INTO t1 VALUES ('location'),('loberge'),('lotre'),('boabab');
SELECT c1 as want3results from t1 where c1 like 'l%';
want3results
location
loberge
lotre
SELECT c1 as want3results from t1 where c1 like 'lo%';
want3results
location
loberge
lotre
SELECT c1 as want1result from t1 where c1 like 'loc%';
want1result
location
SELECT c1 as want1result from t1 where c1 like 'loca%';
want1result
location
SELECT c1 as want1result from t1 where c1 like 'locat%';
want1result
location
SELECT c1 as want1result from t1 where c1 like 'locati%';
want1result
location
SELECT c1 as want1result from t1 where c1 like 'locatio%';
want1result
location
SELECT c1 as want1result from t1 where c1 like 'location%';
want1result
location
DROP TABLE t1;
create table t1 (a set('a') not null);
insert ignore into t1 values (),();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
select cast(a as char(1)) from t1;
cast(a as char(1))
select a sounds like a from t1;
a sounds like a
1
1
select 1 from t1 order by cast(a as char(1));
1
1
1
drop table t1;
#
# MDEV-6134 SUBSTRING_INDEX returns wrong result for 8bit character sets when delimiter is not found
#
SET character_set_client=latin1;
SET character_set_connection= @test_character_set;
SET collation_connection= @test_collation;
SELECT COLLATION('.'), SUBSTRING_INDEX('.wwwmysqlcom', '.', -2) AS c1;
COLLATION('.') c1
big5_chinese_ci .wwwmysqlcom
set names utf8;
create table t1 (
name varchar(10),
level smallint unsigned);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`name` varchar(10) DEFAULT NULL,
`level` smallint(5) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=big5 COLLATE=big5_chinese_ci
insert into t1 values ('string',1);
select concat(name,space(level)), concat(name, repeat(' ',level)) from t1;
concat(name,space(level)) concat(name, repeat(' ',level))
string string
drop table t1;
DROP DATABASE d1;
USE test;
SET character_set_server= @safe_character_set_server;
SET collation_server= @safe_collation_server;
SET character_set_client= @safe_character_set_client;
SET character_set_results= @safe_character_set_results;
SET NAMES big5;
SET collation_connection='big5_chinese_ci';
create table t1 select repeat('a',4000) a;
delete from t1;
insert into t1 values ('a'), ('a '), ('a\t');
select collation(a),hex(a) from t1 order by a;
collation(a) hex(a)
big5_chinese_ci 6109
big5_chinese_ci 61
big5_chinese_ci 6120
drop table t1;
#
# MDEV-5453 Assertion `src' fails in my_strnxfrm_unicode on GROUP BY MID(..) WITH ROLLUP
#
SELECT @@collation_connection;
@@collation_connection
big5_chinese_ci
CREATE TABLE t1 (i INT) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1),(2);
SELECT * FROM t1 GROUP BY MID(CURRENT_USER,0) WITH ROLLUP;
i
1
1
SELECT * FROM t1 GROUP BY MID('test',0) WITH ROLLUP;
i
1
1
DROP TABLE t1;
#
# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations
#
SELECT @@collation_connection;
@@collation_connection
big5_chinese_ci
CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0;
INSERT INTO t1 (a) VALUES ("a");
INSERT INTO t1 (a) VALUES ("b");
INSERT INTO t1 (a) VALUES ("c");
INSERT INTO t1 (a) VALUES ("d");
INSERT INTO t1 (a) VALUES ("e");
INSERT INTO t1 (a) VALUES ("f");
INSERT INTO t1 (a) VALUES ("g");
INSERT INTO t1 (a) VALUES ("h");
INSERT INTO t1 (a) VALUES ("i");
INSERT INTO t1 (a) VALUES ("j");
INSERT INTO t1 (a) VALUES ("k");
INSERT INTO t1 (a) VALUES ("l");
INSERT INTO t1 (a) VALUES ("m");
SELECT * FROM t1 ORDER BY LOWER(a);
a
a
b
c
d
e
f
g
h
i
j
k
l
m
SELECT * FROM t1 ORDER BY LOWER(a) DESC;
a
m
l
k
j
i
h
g
f
e
d
c
b
a
DROP TABLE t1;
create table t1 engine=innodb select repeat('a',50) as c1;
alter table t1 add index(c1(5));
insert into t1 values ('abcdefg'),('abcde100'),('abcde110'),('abcde111');
select collation(c1) from t1 limit 1;
collation(c1)
big5_chinese_ci
select c1 from t1 where c1 like 'abcdef%' order by c1;
c1
abcdefg
select c1 from t1 where c1 like 'abcde1%' order by c1;
c1
abcde100
abcde110
abcde111
select c1 from t1 where c1 like 'abcde11%' order by c1;
c1
abcde110
abcde111
select c1 from t1 where c1 like 'abcde111%' order by c1;
c1
abcde111
drop table t1;
select @@collation_connection;
@@collation_connection
big5_chinese_ci
create table t1 ROW_FORMAT=DYNAMIC select repeat('a',50) as c1 ;
insert into t1 values('abcdef');
insert into t1 values('_bcdef');
insert into t1 values('a_cdef');
insert into t1 values('ab_def');
insert into t1 values('abc_ef');
insert into t1 values('abcd_f');
insert into t1 values('abcde_');
select c1 as c1u from t1 where c1 like 'ab\_def';
c1u
ab_def
select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h
ab_def
drop table t1;
SELECT @@collation_connection;
@@collation_connection
big5_chinese_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
hex(concat(repeat(0xF1F2, 10), '%'))
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
3 rows expected
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
a hex(b) c
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
DROP TABLE t1;
drop table if exists t1;
create table t1 select repeat('a',10) as c1;
delete from t1;
insert into t1 values (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27),(0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
insert into t1 values (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37),(0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
insert into t1 values (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47),(0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
insert into t1 values (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57),(0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
insert into t1 values (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67),(0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
insert into t1 values (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77),(0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
SELECT GROUP_CONCAT(c1 ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM t1 GROUP BY c1;
GROUP_CONCAT(c1 ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1)
20
! 21
" 22
# 23
$ 24
% 25
& 26
' 27
( 28
) 29
* 2A
+ 2B
, 2C
- 2D
. 2E
/ 2F
0 30
1 31
2 32
3 33
4 34
5 35
6 36
7 37
8 38
9 39
: 3A
; 3B
< 3C
= 3D
> 3E
? 3F
@ 40
Aa 41,61
Bb 42,62
Cc 43,63
Dd 44,64
E`e 45,60,65
Ff 46,66
Gg 47,67
Hh 48,68
Ii 49,69
Jj 4A,6A
Kk 4B,6B
Ll 4C,6C
Mm 4D,6D
Nn 4E,6E
Oo 4F,6F
Pp 50,70
Qq 51,71
Rr 52,72
Ss 53,73
Tt 54,74
Uu 55,75
Vv 56,76
Ww 57,77
Xx 58,78
Yy~ 59,79,7E
Zz 5A,7A
] 5D
[ 5B
\ 5C
^ 5E
_ 5F
{ 7B
| 7C
} 7D
7F
drop table t1;
SELECT strcmp('a','a '), strcmp('a ','a');
strcmp('a','a ') strcmp('a ','a')
0 0
SELECT strcmp('a\0','a' ), strcmp('a','a\0');
strcmp('a\0','a' ) strcmp('a','a\0')
-1 1
SELECT strcmp('a\0','a '), strcmp('a ','a\0');
strcmp('a\0','a ') strcmp('a ','a\0')
-1 1
SELECT strcmp('a\t','a' ), strcmp('a', 'a\t');
strcmp('a\t','a' ) strcmp('a', 'a\t')
-1 1
SELECT strcmp('a\t','a '), strcmp('a ', 'a\t');
strcmp('a\t','a ') strcmp('a ', 'a\t')
-1 1
SET collation_connection='big5_bin';
create table t1 select repeat('a',4000) a;
delete from t1;
insert into t1 values ('a'), ('a '), ('a\t');
select collation(a),hex(a) from t1 order by a;
collation(a) hex(a)
big5_bin 6109
big5_bin 61
big5_bin 6120
drop table t1;
#
# MDEV-5453 Assertion `src' fails in my_strnxfrm_unicode on GROUP BY MID(..) WITH ROLLUP
#
SELECT @@collation_connection;
@@collation_connection
big5_bin
CREATE TABLE t1 (i INT) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1),(2);
SELECT * FROM t1 GROUP BY MID(CURRENT_USER,0) WITH ROLLUP;
i
1
1
SELECT * FROM t1 GROUP BY MID('test',0) WITH ROLLUP;
i
1
1
DROP TABLE t1;
#
# MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations
#
SELECT @@collation_connection;
@@collation_connection
big5_bin
CREATE TABLE t1 ENGINE=MEMORY AS SELECT REPEAT('a',5) AS a LIMIT 0;
INSERT INTO t1 (a) VALUES ("a");
INSERT INTO t1 (a) VALUES ("b");
INSERT INTO t1 (a) VALUES ("c");
INSERT INTO t1 (a) VALUES ("d");
INSERT INTO t1 (a) VALUES ("e");
INSERT INTO t1 (a) VALUES ("f");
INSERT INTO t1 (a) VALUES ("g");
INSERT INTO t1 (a) VALUES ("h");
INSERT INTO t1 (a) VALUES ("i");
INSERT INTO t1 (a) VALUES ("j");
INSERT INTO t1 (a) VALUES ("k");
INSERT INTO t1 (a) VALUES ("l");
INSERT INTO t1 (a) VALUES ("m");
SELECT * FROM t1 ORDER BY LOWER(a);
a
a
b
c
d
e
f
g
h
i
j
k
l
m
SELECT * FROM t1 ORDER BY LOWER(a) DESC;
a
m
l
k
j
i
h
g
f
e
d
c
b
a
DROP TABLE t1;
create table t1 engine=innodb select repeat('a',50) as c1;
alter table t1 add index(c1(5));
insert into t1 values ('abcdefg'),('abcde100'),('abcde110'),('abcde111');
select collation(c1) from t1 limit 1;
collation(c1)
big5_bin
select c1 from t1 where c1 like 'abcdef%' order by c1;
c1
abcdefg
select c1 from t1 where c1 like 'abcde1%' order by c1;
c1
abcde100
abcde110
abcde111
select c1 from t1 where c1 like 'abcde11%' order by c1;
c1
abcde110
abcde111
select c1 from t1 where c1 like 'abcde111%' order by c1;
c1
abcde111
drop table t1;
select @@collation_connection;
@@collation_connection
big5_bin
create table t1 ROW_FORMAT=DYNAMIC select repeat('a',50) as c1 ;
insert into t1 values('abcdef');
insert into t1 values('_bcdef');
insert into t1 values('a_cdef');
insert into t1 values('ab_def');
insert into t1 values('abc_ef');
insert into t1 values('abcd_f');
insert into t1 values('abcde_');
select c1 as c1u from t1 where c1 like 'ab\_def';
c1u
ab_def
select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h
ab_def
drop table t1;
SELECT @@collation_connection;
@@collation_connection
big5_bin
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
hex(concat(repeat(0xF1F2, 10), '%'))
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
3 rows expected
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
a hex(b) c
2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
DROP TABLE t1;
SELECT strcmp('a','a '), strcmp('a ','a');
strcmp('a','a ') strcmp('a ','a')
0 0
SELECT strcmp('a\0','a' ), strcmp('a','a\0');
strcmp('a\0','a' ) strcmp('a','a\0')
-1 1
SELECT strcmp('a\0','a '), strcmp('a ','a\0');
strcmp('a\0','a ') strcmp('a ','a\0')
-1 1
SELECT strcmp('a\t','a' ), strcmp('a', 'a\t');
strcmp('a\t','a' ) strcmp('a', 'a\t')
-1 1
SELECT strcmp('a\t','a '), strcmp('a ', 'a\t');
strcmp('a\t','a ') strcmp('a ', 'a\t')
-1 1
SET NAMES big5;
CREATE TABLE t1 (a text) character set big5;
INSERT INTO t1 VALUES ('ùØ');
SELECT * FROM t1;
a
ùØ
DROP TABLE t1;
CREATE TABLE t1 (a CHAR(50) CHARACTER SET big5 NOT NULL, FULLTEXT(a));
INSERT INTO t1 VALUES(0xA741ADCCA66EB6DC20A7DAADCCABDCA66E);
SELECT HEX(a) FROM t1 WHERE MATCH(a) AGAINST (0xA741ADCCA66EB6DC IN BOOLEAN MODE);
HEX(a)
A741ADCCA66EB6DC20A7DAADCCABDCA66E
DROP TABLE t1;
set names big5;
create table t1 (a char character set big5);
insert into t1 values (0xF9D6),(0xF9D7),(0xF9D8),(0xF9D9);
insert into t1 values (0xF9DA),(0xF9DB),(0xF9DC);
select hex(a) a, hex(@u:=convert(a using utf8)) b,
hex(convert(@u using big5)) c from t1 order by a;
a b c
F9D6 E7A281 F9D6
F9D7 E98AB9 F9D7
F9D8 E8A38F F9D8
F9D9 E5A2BB F9D9
F9DA E68192 F9DA
F9DB E7B2A7 F9DB
F9DC E5ABBA F9DC
alter table t1 convert to character set utf8;
select hex(a) from t1 where a = _big5 0xF9DC;
hex(a)
E5ABBA
drop table t1;
select hex(convert(_big5 0xC84041 using ucs2));
hex(convert(_big5 0xC84041 using ucs2))
003F0041
Warnings:
Warning 1977 Cannot convert 'big5' character 0xC840 to 'ucs2'
End of 4.1 tests
set names big5;
create table t1 (a blob);
insert into t1 values (0xEE00);
select * into outfile 'test/t1.txt' from t1;
delete from t1;
select hex(load_file('MYSQLD_DATADIR/test/t1.txt')) as lf;
lf
5CEE5C300A
load data infile 't1.txt' into table t1;
select hex(a) from t1;
hex(a)
EE00
drop table t1;
# End of 5.0 tests
#
# Start of 5.5 tests
#
#
# Testing WL#4583 Case conversion in Asian character sets
#
SET NAMES utf8;
SET collation_connection=big5_chinese_ci;
CREATE TABLE t1 (b VARCHAR(2));
INSERT INTO t1 VALUES ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7');
INSERT INTO t1 VALUES ('8'),('9'),('A'),('B'),('C'),('D'),('E'),('F');
CREATE TEMPORARY TABLE head AS SELECT concat(b1.b, b2.b) AS head FROM t1 b1, t1 b2;
CREATE TEMPORARY TABLE tail AS SELECT concat(b1.b, b2.b) AS tail FROM t1 b1, t1 b2;
DROP TABLE t1;
CREATE TABLE t1 AS
SELECT concat(head, tail) AS code, ' ' AS a
FROM head, tail
WHERE (head BETWEEN '80' AND 'FF') AND (tail BETWEEN '20' AND 'FF')
ORDER BY head, tail;
DROP TEMPORARY TABLE head, tail;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`code` varchar(8) DEFAULT NULL,
`a` varchar(1) CHARACTER SET big5 COLLATE big5_chinese_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
SELECT COUNT(*) FROM t1;
COUNT(*)
28672
UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code;
Warnings:
Warning 1366 Incorrect string value: '\x80 ' for column `test`.`t1`.`a` at row 1
Warning 1366 Incorrect string value: '\x80!' for column `test`.`t1`.`a` at row 2
Warning 1366 Incorrect string value: '\x80"' for column `test`.`t1`.`a` at row 3
Warning 1366 Incorrect string value: '\x80#' for column `test`.`t1`.`a` at row 4
Warning 1366 Incorrect string value: '\x80$' for column `test`.`t1`.`a` at row 5
Warning 1366 Incorrect string value: '\x80%' for column `test`.`t1`.`a` at row 6
Warning 1366 Incorrect string value: '\x80&' for column `test`.`t1`.`a` at row 7
Warning 1366 Incorrect string value: '\x80'' for column `test`.`t1`.`a` at row 8
Warning 1366 Incorrect string value: '\x80(' for column `test`.`t1`.`a` at row 9
Warning 1366 Incorrect string value: '\x80)' for column `test`.`t1`.`a` at row 10
Warning 1366 Incorrect string value: '\x80*' for column `test`.`t1`.`a` at row 11
Warning 1366 Incorrect string value: '\x80+' for column `test`.`t1`.`a` at row 12
Warning 1366 Incorrect string value: '\x80,' for column `test`.`t1`.`a` at row 13
Warning 1366 Incorrect string value: '\x80-' for column `test`.`t1`.`a` at row 14
Warning 1366 Incorrect string value: '\x80.' for column `test`.`t1`.`a` at row 15
Warning 1366 Incorrect string value: '\x80/' for column `test`.`t1`.`a` at row 16
Warning 1366 Incorrect string value: '\x800' for column `test`.`t1`.`a` at row 17
Warning 1366 Incorrect string value: '\x801' for column `test`.`t1`.`a` at row 18
Warning 1366 Incorrect string value: '\x802' for column `test`.`t1`.`a` at row 19
Warning 1366 Incorrect string value: '\x803' for column `test`.`t1`.`a` at row 20
Warning 1366 Incorrect string value: '\x804' for column `test`.`t1`.`a` at row 21
Warning 1366 Incorrect string value: '\x805' for column `test`.`t1`.`a` at row 22
Warning 1366 Incorrect string value: '\x806' for column `test`.`t1`.`a` at row 23
Warning 1366 Incorrect string value: '\x807' for column `test`.`t1`.`a` at row 24
Warning 1366 Incorrect string value: '\x808' for column `test`.`t1`.`a` at row 25
Warning 1366 Incorrect string value: '\x809' for column `test`.`t1`.`a` at row 26
Warning 1366 Incorrect string value: '\x80:' for column `test`.`t1`.`a` at row 27
Warning 1366 Incorrect string value: '\x80;' for column `test`.`t1`.`a` at row 28
Warning 1366 Incorrect string value: '\x80<' for column `test`.`t1`.`a` at row 29
Warning 1366 Incorrect string value: '\x80=' for column `test`.`t1`.`a` at row 30
Warning 1366 Incorrect string value: '\x80>' for column `test`.`t1`.`a` at row 31
Warning 1366 Incorrect string value: '\x80?' for column `test`.`t1`.`a` at row 32
Warning 1366 Incorrect string value: '\x80@' for column `test`.`t1`.`a` at row 33
Warning 1366 Incorrect string value: '\x80A' for column `test`.`t1`.`a` at row 34
Warning 1366 Incorrect string value: '\x80B' for column `test`.`t1`.`a` at row 35
Warning 1366 Incorrect string value: '\x80C' for column `test`.`t1`.`a` at row 36
Warning 1366 Incorrect string value: '\x80D' for column `test`.`t1`.`a` at row 37
Warning 1366 Incorrect string value: '\x80E' for column `test`.`t1`.`a` at row 38
Warning 1366 Incorrect string value: '\x80F' for column `test`.`t1`.`a` at row 39
Warning 1366 Incorrect string value: '\x80G' for column `test`.`t1`.`a` at row 40
Warning 1366 Incorrect string value: '\x80H' for column `test`.`t1`.`a` at row 41
Warning 1366 Incorrect string value: '\x80I' for column `test`.`t1`.`a` at row 42
Warning 1366 Incorrect string value: '\x80J' for column `test`.`t1`.`a` at row 43
Warning 1366 Incorrect string value: '\x80K' for column `test`.`t1`.`a` at row 44
Warning 1366 Incorrect string value: '\x80L' for column `test`.`t1`.`a` at row 45
Warning 1366 Incorrect string value: '\x80M' for column `test`.`t1`.`a` at row 46
Warning 1366 Incorrect string value: '\x80N' for column `test`.`t1`.`a` at row 47
Warning 1366 Incorrect string value: '\x80O' for column `test`.`t1`.`a` at row 48
Warning 1366 Incorrect string value: '\x80P' for column `test`.`t1`.`a` at row 49
Warning 1366 Incorrect string value: '\x80Q' for column `test`.`t1`.`a` at row 50
Warning 1366 Incorrect string value: '\x80R' for column `test`.`t1`.`a` at row 51
Warning 1366 Incorrect string value: '\x80S' for column `test`.`t1`.`a` at row 52
Warning 1366 Incorrect string value: '\x80T' for column `test`.`t1`.`a` at row 53
Warning 1366 Incorrect string value: '\x80U' for column `test`.`t1`.`a` at row 54
Warning 1366 Incorrect string value: '\x80V' for column `test`.`t1`.`a` at row 55
Warning 1366 Incorrect string value: '\x80W' for column `test`.`t1`.`a` at row 56
Warning 1366 Incorrect string value: '\x80X' for column `test`.`t1`.`a` at row 57
Warning 1366 Incorrect string value: '\x80Y' for column `test`.`t1`.`a` at row 58
Warning 1366 Incorrect string value: '\x80Z' for column `test`.`t1`.`a` at row 59
Warning 1366 Incorrect string value: '\x80[' for column `test`.`t1`.`a` at row 60
Warning 1366 Incorrect string value: '\x80\' for column `test`.`t1`.`a` at row 61
Warning 1366 Incorrect string value: '\x80]' for column `test`.`t1`.`a` at row 62
Warning 1366 Incorrect string value: '\x80^' for column `test`.`t1`.`a` at row 63
Warning 1366 Incorrect string value: '\x80_' for column `test`.`t1`.`a` at row 64
SELECT COUNT(*) FROM t1 WHERE a<>'?';
COUNT(*)
13973
SELECT code, hex(upper(a)), hex(lower(a)),a, upper(a), lower(a) FROM t1 WHERE hex(a)<>hex(upper(a)) OR hex(a)<>hex(lower(a));
code hex(upper(a)) hex(lower(a)) a upper(a) lower(a)
A2CF A2CF A2E9 A A ï½
A2D0 A2D0 A2EA ï¼¢ ï¼¢ ï½
A2D1 A2D1 A2EB ï¼£ ï¼£ ï½
A2D2 A2D2 A2EC D D ï½
A2D3 A2D3 A2ED ï¼¥ ï¼¥ ï½
A2D4 A2D4 A2EE F F ï½
A2D5 A2D5 A2EF G G ï½
A2D6 A2D6 A2F0 H H ï½
A2D7 A2D7 A2F1 I I ï½
A2D8 A2D8 A2F2 J J ï½
A2D9 A2D9 A2F3 K K ï½
A2DA A2DA A2F4 L L ï½
A2DB A2DB A2F5 ï¼ ï¼ ï½
A2DC A2DC A2F6 ï¼® ï¼® ï½
A2DD A2DD A2F7 O O ï½
A2DE A2DE A2F8 ï¼° ï¼° ï½
A2DF A2DF A2F9 ï¼± ï¼± ï½
A2E0 A2E0 A2FA ï¼² ï¼² ï½
A2E1 A2E1 A2FB ï¼³ ï¼³ ï½
A2E2 A2E2 A2FC ï¼´ ï¼´ ï½
A2E3 A2E3 A2FD ï¼µ ï¼µ ï½
A2E4 A2E4 A2FE V V ï½
A2E5 A2E5 A340 ï¼· ï¼· ï½
A2E6 A2E6 A341 X X ï½
A2E7 A2E7 A342 ï¼¹ ï¼¹ ï½
A2E8 A2E8 A343 Z Z ï½
A2E9 A2CF A2E9 ï½ ï¼¡ ï½
A2EA A2D0 A2EA ï½ ï¼¢ ï½
A2EB A2D1 A2EB ï½ ï¼£ ï½
A2EC A2D2 A2EC ï½ ï¼¤ ï½
A2ED A2D3 A2ED ï½
ï¼¥ ï½
A2EE A2D4 A2EE ï½ ï¼¦ ï½
A2EF A2D5 A2EF ï½ ï¼§ ï½
A2F0 A2D6 A2F0 ï½ ï¼¨ ï½
A2F1 A2D7 A2F1 ï½ ï¼© ï½
A2F2 A2D8 A2F2 ï½ ï¼ª ï½
A2F3 A2D9 A2F3 ï½ ï¼« ï½
A2F4 A2DA A2F4 ï½ ï¼¬ ï½
A2F5 A2DB A2F5 ï½ ï¼ ï½
A2F6 A2DC A2F6 ï½ ï¼® ï½
A2F7 A2DD A2F7 ï½ ï¼¯ ï½
A2F8 A2DE A2F8 ï½ ï¼° ï½
A2F9 A2DF A2F9 ï½ ï¼± ï½
A2FA A2E0 A2FA ï½ ï¼² ï½
A2FB A2E1 A2FB ï½ ï¼³ ï½
A2FC A2E2 A2FC ï½ ï¼´ ï½
A2FD A2E3 A2FD ï½ ï¼µ ï½
A2FE A2E4 A2FE ï½ ï¼¶ ï½
A340 A2E5 A340 ï½ ï¼· ï½
A341 A2E6 A341 ï½ ï¼¸ ï½
A342 A2E7 A342 ï½ ï¼¹ ï½
A343 A2E8 A343 ï½ ï¼º ï½
A344 A344 A35C ΠΠα
A345 A345 A35D ΠΠβ
A346 A346 A35E ΠΠγ
A347 A347 A35F ΠΠδ
A348 A348 A360 ΠΠε
A349 A349 A361 ΠΠζ
A34A A34A A362 ΠΠη
A34B A34B A363 ΠΠθ
A34C A34C A364 ΠΠι
A34D A34D A365 ΠΠκ
A34E A34E A366 ΠΠλ
A34F A34F A367 ΠΠμ
A350 A350 A368 ΠΠν
A351 A351 A369 ΠΠξ
A352 A352 A36A ΠΠο
A353 A353 A36B Î Î Ï
A354 A354 A36C Ρ Ρ Ï
A355 A355 A36D Σ Σ Ï
A356 A356 A36E Τ Τ Ï
A357 A357 A36F Î¥ Î¥ Ï
A358 A358 A370 Φ Φ Ï
A359 A359 A371 Χ Χ Ï
A35A A35A A372 Ψ Ψ Ï
A35B A35B A373 Ω Ω Ï
A35C A344 A35C α Πα
A35D A345 A35D β Πβ
A35E A346 A35E γ Πγ
A35F A347 A35F δ Πδ
A360 A348 A360 ε Πε
A361 A349 A361 ζ Πζ
A362 A34A A362 η Πη
A363 A34B A363 θ Πθ
A364 A34C A364 ι Πι
A365 A34D A365 κ Πκ
A366 A34E A366 λ Πλ
A367 A34F A367 μ Πμ
A368 A350 A368 ν Πν
A369 A351 A369 ξ Πξ
A36A A352 A36A ο Πο
A36B A353 A36B Ï Î Ï
A36C A354 A36C Ï Î¡ Ï
A36D A355 A36D Ï Î£ Ï
A36E A356 A36E Ï Î¤ Ï
A36F A357 A36F Ï
Î¥ Ï
A370 A358 A370 Ï Î¦ Ï
A371 A359 A371 Ï Î§ Ï
A372 A35A A372 Ï Î¨ Ï
A373 A35B A373 Ï Î© Ï
C7B1 C7B1 C7CC РРд
C7B2 C7B2 C7CD РРе
C7B3 C7B3 C7CE Ð Ð Ñ
C7B4 C7B4 C7CF РРж
C7B5 C7B5 C7D0 РРз
C7B6 C7B6 C7D1 РРи
C7B7 C7B7 C7D2 РРй
C7B8 C7B8 C7D3 РРк
C7B9 C7B9 C7D4 РРл
C7BA C7BA C7D5 РРм
C7BB C7BB C7DC У У Ñ
C7BC C7BC C7DD Ф Ф Ñ
C7BD C7BD C7DE Ð¥ Ð¥ Ñ
C7BE C7BE C7DF Ц Ц Ñ
C7BF C7BF C7E0 Ч Ч Ñ
C7C0 C7C0 C7E1 Ш Ш Ñ
C7C1 C7C1 C7E2 Щ Щ Ñ
C7C2 C7C2 C7E3 Ъ Ъ Ñ
C7C3 C7C3 C7E4 Ы Ы Ñ
C7C4 C7C4 C7E5 Ь Ь Ñ
C7C5 C7C5 C7E6 Ð Ð Ñ
C7C6 C7C6 C7E7 Ю Ю Ñ
C7C7 C7C7 C7E8 Я Я Ñ
C7CC C7B1 C7CC д Рд
C7CD C7B2 C7CD е Ре
C7CE C7B3 C7CE Ñ Ð Ñ
C7CF C7B4 C7CF ж Рж
C7D0 C7B5 C7D0 з Рз
C7D1 C7B6 C7D1 и Ри
C7D2 C7B7 C7D2 й Рй
C7D3 C7B8 C7D3 к Рк
C7D4 C7B9 C7D4 л Рл
C7D5 C7BA C7D5 м Рм
C7DC C7BB C7DC Ñ Ð£ Ñ
C7DD C7BC C7DD Ñ Ð¤ Ñ
C7DE C7BD C7DE Ñ
Ð¥ Ñ
C7DF C7BE C7DF Ñ Ð¦ Ñ
C7E0 C7BF C7E0 Ñ Ð§ Ñ
C7E1 C7C0 C7E1 Ñ Ð¨ Ñ
C7E2 C7C1 C7E2 Ñ Ð© Ñ
C7E3 C7C2 C7E3 Ñ Ðª Ñ
C7E4 C7C3 C7E4 Ñ Ð« Ñ
C7E5 C7C4 C7E5 Ñ Ð¬ Ñ
C7E6 C7C5 C7E6 Ñ Ð Ñ
C7E7 C7C6 C7E7 Ñ Ð® Ñ
C7E8 C7C7 C7E8 Ñ Ð¯ Ñ
SELECT * FROM t1
WHERE HEX(CAST(LOWER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(LOWER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
code a
A2B9 â
A2BA â
¡
A2BB â
¢
A2BC â
£
A2BD â
¤
A2BE â
¥
A2BF â
¦
A2C0 â
§
A2C1 â
¨
A2C2 â
©
Warnings:
Warning 1977 Cannot convert 'big5' character 0xA3C0 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C0 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C6 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C6 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C8 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C8 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CA to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CA to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CC to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CC to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CE to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CE to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D0 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D0 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D6 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D6 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D8 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D8 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DA to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DA to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DC to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DC to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DE to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DE to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DF to 'utf8'
SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
code a
C7C8 а
C7C9 б
C7CA в
C7CB г
C7D6 н
C7D7 о
C7D8 п
C7D9 Ñ
C7DA Ñ
C7DB Ñ
Warnings:
Warning 1977 Cannot convert 'big5' character 0xA3C0 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C0 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C6 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C6 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C8 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C8 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CA to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CA to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CC to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CC to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CE to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CE to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D0 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D0 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D1 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D6 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D6 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D8 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D8 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DA to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DA to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DC to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DC to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DE to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DE to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DF to 'utf8'
DROP TABLE t1;
#
# End of 5.5 tests
#
#
# Start of 5.6 tests
#
#
# WL#3664 WEIGHT_STRING
#
set names big5;
select @@collation_connection;
@@collation_connection
big5_chinese_ci
CREATE TABLE t1 AS SELECT 'a' AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1) CHARACTER SET big5 COLLATE big5_chinese_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`ws` varbinary(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
SELECT HEX(WEIGHT_STRING(a)) FROM t1;
HEX(WEIGHT_STRING(a))
41
SELECT HEX(ws) FROM t2;
HEX(ws)
41
DROP TABLE t2;
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(5) CHARACTER SET big5 COLLATE big5_chinese_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`ws` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
SELECT HEX(WEIGHT_STRING(a)) FROM t1;
HEX(WEIGHT_STRING(a))