diff options
author | Alexander Barkov <bar@mariadb.com> | 2021-09-08 11:42:42 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2021-09-13 08:03:25 +0400 |
commit | 0629711db43ec489a360d8f689b72fac66a2470b (patch) | |
tree | ca6e5515ff30c819c0cf305f24f981f0a26e18c8 /mysql-test/main | |
parent | 4be366111b5bca25643574737b6a0ee17c05cce3 (diff) | |
download | mariadb-git-0629711db43ec489a360d8f689b72fac66a2470b.tar.gz |
MDEV-26572 Improve simple multibyte collation performance on the ASCII rangebb-10.7-bar-MDEV-26572
Diffstat (limited to 'mysql-test/main')
-rw-r--r-- | mysql-test/main/ctype_big5.result | 194 | ||||
-rw-r--r-- | mysql-test/main/ctype_big5.test | 1 | ||||
-rw-r--r-- | mysql-test/main/ctype_cp932.result | 275 | ||||
-rw-r--r-- | mysql-test/main/ctype_cp932.test | 9 | ||||
-rw-r--r-- | mysql-test/main/ctype_eucjpms.result | 275 | ||||
-rw-r--r-- | mysql-test/main/ctype_eucjpms.test | 8 | ||||
-rw-r--r-- | mysql-test/main/ctype_euckr.result | 270 | ||||
-rw-r--r-- | mysql-test/main/ctype_euckr.test | 2 | ||||
-rw-r--r-- | mysql-test/main/ctype_gb2312.result | 194 | ||||
-rw-r--r-- | mysql-test/main/ctype_gb2312.test | 1 | ||||
-rw-r--r-- | mysql-test/main/ctype_gbk.result | 194 | ||||
-rw-r--r-- | mysql-test/main/ctype_gbk.test | 1 | ||||
-rw-r--r-- | mysql-test/main/ctype_sjis.result | 270 | ||||
-rw-r--r-- | mysql-test/main/ctype_sjis.test | 2 | ||||
-rw-r--r-- | mysql-test/main/ctype_tis620.result | 46 | ||||
-rw-r--r-- | mysql-test/main/ctype_ujis.result | 276 | ||||
-rw-r--r-- | mysql-test/main/ctype_ujis.test | 10 |
17 files changed, 2016 insertions, 12 deletions
diff --git a/mysql-test/main/ctype_big5.result b/mysql-test/main/ctype_big5.result index 66d4bb54023..2bea9cd2619 100644 --- a/mysql-test/main/ctype_big5.result +++ b/mysql-test/main/ctype_big5.result @@ -246,14 +246,53 @@ DROP TABLE t1; drop table if exists t1; create table t1 select repeat('a',10) as c1; delete from t1; +insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F); +insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F); 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) +create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1; +select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1'; +column_name collation_name +c1 big5_chinese_ci +name big5_chinese_ci +SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1; +GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) +<00> 00 +<01> 01 +<02> 02 +<03> 03 +<04> 04 +<05> 05 +<06> 06 +<07> 07 +<08> 08 +<09> 09 +<0A> 0A +<0B> 0B +<0C> 0C +<0D> 0D +<0E> 0E +<0F> 0F +<10> 10 +<11> 11 +<12> 12 +<13> 13 +<14> 14 +<15> 15 +<16> 16 +<17> 17 +<18> 18 +<19> 19 +<1A> 1A +<1B> 1B +<1C> 1C +<1D> 1D +<1E> 1E +<1F> 1F 20 ! 21 " 22 @@ -321,8 +360,9 @@ _ 5F { 7B | 7C } 7D - 7F +<7F> 7F drop table t1; +drop view v1; SELECT strcmp('a','a '), strcmp('a ','a'); strcmp('a','a ') strcmp('a ','a') 0 0 @@ -479,6 +519,154 @@ a hex(b) c 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 (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F); +insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F); +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); +create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1; +select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1'; +column_name collation_name +c1 big5_bin +name big5_bin +SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1; +GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) +<00> 00 +<01> 01 +<02> 02 +<03> 03 +<04> 04 +<05> 05 +<06> 06 +<07> 07 +<08> 08 +<09> 09 +<0A> 0A +<0B> 0B +<0C> 0C +<0D> 0D +<0E> 0E +<0F> 0F +<10> 10 +<11> 11 +<12> 12 +<13> 13 +<14> 14 +<15> 15 +<16> 16 +<17> 17 +<18> 18 +<19> 19 +<1A> 1A +<1B> 1B +<1C> 1C +<1D> 1D +<1E> 1E +<1F> 1F + 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 +A 41 +B 42 +C 43 +D 44 +E 45 +F 46 +G 47 +H 48 +I 49 +J 4A +K 4B +L 4C +M 4D +N 4E +O 4F +P 50 +Q 51 +R 52 +S 53 +T 54 +U 55 +V 56 +W 57 +X 58 +Y 59 +Z 5A +[ 5B +\ 5C +] 5D +^ 5E +_ 5F +` 60 +a 61 +b 62 +c 63 +d 64 +e 65 +f 66 +g 67 +h 68 +i 69 +j 6A +k 6B +l 6C +m 6D +n 6E +o 6F +p 70 +q 71 +r 72 +s 73 +t 74 +u 75 +v 76 +w 77 +x 78 +y 79 +z 7A +{ 7B +| 7C +} 7D +~ 7E +<7F> 7F +drop table t1; +drop view v1; SELECT strcmp('a','a '), strcmp('a ','a'); strcmp('a','a ') strcmp('a ','a') 0 0 diff --git a/mysql-test/main/ctype_big5.test b/mysql-test/main/ctype_big5.test index 41991258886..385f1c21439 100644 --- a/mysql-test/main/ctype_big5.test +++ b/mysql-test/main/ctype_big5.test @@ -24,6 +24,7 @@ SET collation_connection='big5_bin'; -- source include/ctype_innodb_like.inc -- source include/ctype_like_escape.inc -- source include/ctype_like_range_f1f2.inc +-- source include/ctype_ascii_order.inc -- source include/ctype_pad_space.inc # diff --git a/mysql-test/main/ctype_cp932.result b/mysql-test/main/ctype_cp932.result index 952130cf11c..ff1dd814970 100644 --- a/mysql-test/main/ctype_cp932.result +++ b/mysql-test/main/ctype_cp932.result @@ -598,6 +598,281 @@ SET DEFAULT_STORAGE_ENGINE=Default; # End of 10.2 tests # # +# General tests +# +SET NAMES cp932; +drop table if exists t1; +create table t1 select repeat('a',10) as c1; +delete from t1; +insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F); +insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F); +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); +create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1; +select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1'; +column_name collation_name +c1 cp932_japanese_ci +name cp932_japanese_ci +SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1; +GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) +<00> 00 +<01> 01 +<02> 02 +<03> 03 +<04> 04 +<05> 05 +<06> 06 +<07> 07 +<08> 08 +<09> 09 +<0A> 0A +<0B> 0B +<0C> 0C +<0D> 0D +<0E> 0E +<0F> 0F +<10> 10 +<11> 11 +<12> 12 +<13> 13 +<14> 14 +<15> 15 +<16> 16 +<17> 17 +<18> 18 +<19> 19 +<1A> 1A +<1B> 1B +<1C> 1C +<1D> 1D +<1E> 1E +<1F> 1F + 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 +Ee 45,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 +Zz 5A,7A +[ 5B +\ 5C +] 5D +^ 5E +_ 5F +` 60 +{ 7B +| 7C +} 7D +~ 7E +<7F> 7F +drop table t1; +drop view v1; +SET NAMES cp932 COLLATE cp932_bin; +drop table if exists t1; +create table t1 select repeat('a',10) as c1; +delete from t1; +insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F); +insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F); +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); +create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1; +select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1'; +column_name collation_name +c1 cp932_bin +name cp932_bin +SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1; +GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) +<00> 00 +<01> 01 +<02> 02 +<03> 03 +<04> 04 +<05> 05 +<06> 06 +<07> 07 +<08> 08 +<09> 09 +<0A> 0A +<0B> 0B +<0C> 0C +<0D> 0D +<0E> 0E +<0F> 0F +<10> 10 +<11> 11 +<12> 12 +<13> 13 +<14> 14 +<15> 15 +<16> 16 +<17> 17 +<18> 18 +<19> 19 +<1A> 1A +<1B> 1B +<1C> 1C +<1D> 1D +<1E> 1E +<1F> 1F + 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 +A 41 +B 42 +C 43 +D 44 +E 45 +F 46 +G 47 +H 48 +I 49 +J 4A +K 4B +L 4C +M 4D +N 4E +O 4F +P 50 +Q 51 +R 52 +S 53 +T 54 +U 55 +V 56 +W 57 +X 58 +Y 59 +Z 5A +[ 5B +\ 5C +] 5D +^ 5E +_ 5F +` 60 +a 61 +b 62 +c 63 +d 64 +e 65 +f 66 +g 67 +h 68 +i 69 +j 6A +k 6B +l 6C +m 6D +n 6E +o 6F +p 70 +q 71 +r 72 +s 73 +t 74 +u 75 +v 76 +w 77 +x 78 +y 79 +z 7A +{ 7B +| 7C +} 7D +~ 7E +<7F> 7F +drop table t1; +drop view v1; +# # Start of 10.5 tests # # diff --git a/mysql-test/main/ctype_cp932.test b/mysql-test/main/ctype_cp932.test index 0f5ff437d33..2ccbe8f1582 100644 --- a/mysql-test/main/ctype_cp932.test +++ b/mysql-test/main/ctype_cp932.test @@ -50,6 +50,15 @@ let $coll_pad='cp932_bin'; --echo # +--echo # General tests +--echo # +SET NAMES cp932; +-- source include/ctype_ascii_order.inc +SET NAMES cp932 COLLATE cp932_bin; +-- source include/ctype_ascii_order.inc + + +--echo # --echo # Start of 10.5 tests --echo # diff --git a/mysql-test/main/ctype_eucjpms.result b/mysql-test/main/ctype_eucjpms.result index db445838102..a7688be6ad0 100644 --- a/mysql-test/main/ctype_eucjpms.result +++ b/mysql-test/main/ctype_eucjpms.result @@ -2,6 +2,281 @@ drop table if exists t1; drop table if exists t2; drop table if exists t3; drop table if exists t4; +# +# General tests +# +SET NAMES eucjpms; +drop table if exists t1; +create table t1 select repeat('a',10) as c1; +delete from t1; +insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F); +insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F); +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); +create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1; +select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1'; +column_name collation_name +c1 eucjpms_japanese_ci +name eucjpms_japanese_ci +SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1; +GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) +<00> 00 +<01> 01 +<02> 02 +<03> 03 +<04> 04 +<05> 05 +<06> 06 +<07> 07 +<08> 08 +<09> 09 +<0A> 0A +<0B> 0B +<0C> 0C +<0D> 0D +<0E> 0E +<0F> 0F +<10> 10 +<11> 11 +<12> 12 +<13> 13 +<14> 14 +<15> 15 +<16> 16 +<17> 17 +<18> 18 +<19> 19 +<1A> 1A +<1B> 1B +<1C> 1C +<1D> 1D +<1E> 1E +<1F> 1F + 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 +Ee 45,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 +Zz 5A,7A +[ 5B +\ 5C +] 5D +^ 5E +_ 5F +` 60 +{ 7B +| 7C +} 7D +~ 7E +<7F> 7F +drop table t1; +drop view v1; +SET NAMES eucjpms COLLATE eucjpms_bin; +drop table if exists t1; +create table t1 select repeat('a',10) as c1; +delete from t1; +insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F); +insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F); +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); +create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1; +select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1'; +column_name collation_name +c1 eucjpms_bin +name eucjpms_bin +SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1; +GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) +<00> 00 +<01> 01 +<02> 02 +<03> 03 +<04> 04 +<05> 05 +<06> 06 +<07> 07 +<08> 08 +<09> 09 +<0A> 0A +<0B> 0B +<0C> 0C +<0D> 0D +<0E> 0E +<0F> 0F +<10> 10 +<11> 11 +<12> 12 +<13> 13 +<14> 14 +<15> 15 +<16> 16 +<17> 17 +<18> 18 +<19> 19 +<1A> 1A +<1B> 1B +<1C> 1C +<1D> 1D +<1E> 1E +<1F> 1F + 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 +A 41 +B 42 +C 43 +D 44 +E 45 +F 46 +G 47 +H 48 +I 49 +J 4A +K 4B +L 4C +M 4D +N 4E +O 4F +P 50 +Q 51 +R 52 +S 53 +T 54 +U 55 +V 56 +W 57 +X 58 +Y 59 +Z 5A +[ 5B +\ 5C +] 5D +^ 5E +_ 5F +` 60 +a 61 +b 62 +c 63 +d 64 +e 65 +f 66 +g 67 +h 68 +i 69 +j 6A +k 6B +l 6C +m 6D +n 6E +o 6F +p 70 +q 71 +r 72 +s 73 +t 74 +u 75 +v 76 +w 77 +x 78 +y 79 +z 7A +{ 7B +| 7C +} 7D +~ 7E +<7F> 7F +drop table t1; +drop view v1; set names eucjpms; set character_set_database = eucjpms; CREATE TABLE t1(c1 CHAR(1)) DEFAULT CHARACTER SET = eucjpms; diff --git a/mysql-test/main/ctype_eucjpms.test b/mysql-test/main/ctype_eucjpms.test index 6af72270853..393534182dc 100644 --- a/mysql-test/main/ctype_eucjpms.test +++ b/mysql-test/main/ctype_eucjpms.test @@ -8,6 +8,14 @@ drop table if exists t3; drop table if exists t4; --enable_warnings +--echo # +--echo # General tests +--echo # +SET NAMES eucjpms; +-- source include/ctype_ascii_order.inc +SET NAMES eucjpms COLLATE eucjpms_bin; +-- source include/ctype_ascii_order.inc + set names eucjpms; set character_set_database = eucjpms; diff --git a/mysql-test/main/ctype_euckr.result b/mysql-test/main/ctype_euckr.result index 37b7e86543f..f349b9c25e0 100644 --- a/mysql-test/main/ctype_euckr.result +++ b/mysql-test/main/ctype_euckr.result @@ -243,6 +243,128 @@ a hex(b) c 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 (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F); +insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F); +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); +create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1; +select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1'; +column_name collation_name +c1 euckr_korean_ci +name euckr_korean_ci +SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1; +GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) +<00> 00 +<01> 01 +<02> 02 +<03> 03 +<04> 04 +<05> 05 +<06> 06 +<07> 07 +<08> 08 +<09> 09 +<0A> 0A +<0B> 0B +<0C> 0C +<0D> 0D +<0E> 0E +<0F> 0F +<10> 10 +<11> 11 +<12> 12 +<13> 13 +<14> 14 +<15> 15 +<16> 16 +<17> 17 +<18> 18 +<19> 19 +<1A> 1A +<1B> 1B +<1C> 1C +<1D> 1D +<1E> 1E +<1F> 1F + 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 +Ee 45,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 +Zz 5A,7A +[ 5B +\ 5C +] 5D +^ 5E +_ 5F +` 60 +{ 7B +| 7C +} 7D +~ 7E +<7F> 7F +drop table t1; +drop view v1; SET collation_connection='euckr_bin'; create table t1 select repeat('a',4000) a; delete from t1; @@ -384,6 +506,154 @@ a hex(b) c 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 (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F); +insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F); +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); +create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1; +select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1'; +column_name collation_name +c1 euckr_bin +name euckr_bin +SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1; +GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) +<00> 00 +<01> 01 +<02> 02 +<03> 03 +<04> 04 +<05> 05 +<06> 06 +<07> 07 +<08> 08 +<09> 09 +<0A> 0A +<0B> 0B +<0C> 0C +<0D> 0D +<0E> 0E +<0F> 0F +<10> 10 +<11> 11 +<12> 12 +<13> 13 +<14> 14 +<15> 15 +<16> 16 +<17> 17 +<18> 18 +<19> 19 +<1A> 1A +<1B> 1B +<1C> 1C +<1D> 1D +<1E> 1E +<1F> 1F + 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 +A 41 +B 42 +C 43 +D 44 +E 45 +F 46 +G 47 +H 48 +I 49 +J 4A +K 4B +L 4C +M 4D +N 4E +O 4F +P 50 +Q 51 +R 52 +S 53 +T 54 +U 55 +V 56 +W 57 +X 58 +Y 59 +Z 5A +[ 5B +\ 5C +] 5D +^ 5E +_ 5F +` 60 +a 61 +b 62 +c 63 +d 64 +e 65 +f 66 +g 67 +h 68 +i 69 +j 6A +k 6B +l 6C +m 6D +n 6E +o 6F +p 70 +q 71 +r 72 +s 73 +t 74 +u 75 +v 76 +w 77 +x 78 +y 79 +z 7A +{ 7B +| 7C +} 7D +~ 7E +<7F> 7F +drop table t1; +drop view v1; SET NAMES euckr; CREATE TABLE t1 (a text) character set euckr; INSERT INTO t1 VALUES (0xA2E6),(0xFEF7); diff --git a/mysql-test/main/ctype_euckr.test b/mysql-test/main/ctype_euckr.test index 1154047fdb0..e4f07081dba 100644 --- a/mysql-test/main/ctype_euckr.test +++ b/mysql-test/main/ctype_euckr.test @@ -17,11 +17,13 @@ SET collation_connection='euckr_korean_ci'; -- source include/ctype_innodb_like.inc -- source include/ctype_like_escape.inc -- source include/ctype_like_range_f1f2.inc +-- source include/ctype_ascii_order.inc SET collation_connection='euckr_bin'; -- source include/ctype_filesort.inc -- source include/ctype_innodb_like.inc -- source include/ctype_like_escape.inc -- source include/ctype_like_range_f1f2.inc +-- source include/ctype_ascii_order.inc # # Bug#15377 Valid multibyte sequences are truncated on INSERT diff --git a/mysql-test/main/ctype_gb2312.result b/mysql-test/main/ctype_gb2312.result index 42a837b37e1..cdfe6370784 100644 --- a/mysql-test/main/ctype_gb2312.result +++ b/mysql-test/main/ctype_gb2312.result @@ -246,14 +246,53 @@ DROP TABLE t1; drop table if exists t1; create table t1 select repeat('a',10) as c1; delete from t1; +insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F); +insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F); 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) +create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1; +select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1'; +column_name collation_name +c1 gb2312_chinese_ci +name gb2312_chinese_ci +SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1; +GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) +<00> 00 +<01> 01 +<02> 02 +<03> 03 +<04> 04 +<05> 05 +<06> 06 +<07> 07 +<08> 08 +<09> 09 +<0A> 0A +<0B> 0B +<0C> 0C +<0D> 0D +<0E> 0E +<0F> 0F +<10> 10 +<11> 11 +<12> 12 +<13> 13 +<14> 14 +<15> 15 +<16> 16 +<17> 17 +<18> 18 +<19> 19 +<1A> 1A +<1B> 1B +<1C> 1C +<1D> 1D +<1E> 1E +<1F> 1F 20 ! 21 " 22 @@ -322,8 +361,9 @@ _ 5F { 7B | 7C } 7D - 7F +<7F> 7F drop table t1; +drop view v1; SET collation_connection='gb2312_bin'; create table t1 select repeat('a',4000) a; delete from t1; @@ -465,6 +505,154 @@ a hex(b) c 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 (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F); +insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F); +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); +create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1; +select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1'; +column_name collation_name +c1 gb2312_bin +name gb2312_bin +SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1; +GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) +<00> 00 +<01> 01 +<02> 02 +<03> 03 +<04> 04 +<05> 05 +<06> 06 +<07> 07 +<08> 08 +<09> 09 +<0A> 0A +<0B> 0B +<0C> 0C +<0D> 0D +<0E> 0E +<0F> 0F +<10> 10 +<11> 11 +<12> 12 +<13> 13 +<14> 14 +<15> 15 +<16> 16 +<17> 17 +<18> 18 +<19> 19 +<1A> 1A +<1B> 1B +<1C> 1C +<1D> 1D +<1E> 1E +<1F> 1F + 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 +A 41 +B 42 +C 43 +D 44 +E 45 +F 46 +G 47 +H 48 +I 49 +J 4A +K 4B +L 4C +M 4D +N 4E +O 4F +P 50 +Q 51 +R 52 +S 53 +T 54 +U 55 +V 56 +W 57 +X 58 +Y 59 +Z 5A +[ 5B +\ 5C +] 5D +^ 5E +_ 5F +` 60 +a 61 +b 62 +c 63 +d 64 +e 65 +f 66 +g 67 +h 68 +i 69 +j 6A +k 6B +l 6C +m 6D +n 6E +o 6F +p 70 +q 71 +r 72 +s 73 +t 74 +u 75 +v 76 +w 77 +x 78 +y 79 +z 7A +{ 7B +| 7C +} 7D +~ 7E +<7F> 7F +drop table t1; +drop view v1; SET NAMES gb2312; CREATE TABLE t1 (a text) character set gb2312; INSERT INTO t1 VALUES (0xA2A1),(0xD7FE); diff --git a/mysql-test/main/ctype_gb2312.test b/mysql-test/main/ctype_gb2312.test index 07460116ade..6224b8c1cf1 100644 --- a/mysql-test/main/ctype_gb2312.test +++ b/mysql-test/main/ctype_gb2312.test @@ -23,6 +23,7 @@ SET collation_connection='gb2312_bin'; -- source include/ctype_innodb_like.inc -- source include/ctype_like_escape.inc -- source include/ctype_like_range_f1f2.inc +-- source include/ctype_ascii_order.inc # # Bug#15377 Valid multibyte sequences are truncated on INSERT diff --git a/mysql-test/main/ctype_gbk.result b/mysql-test/main/ctype_gbk.result index 23ca646da9a..39c31882387 100644 --- a/mysql-test/main/ctype_gbk.result +++ b/mysql-test/main/ctype_gbk.result @@ -246,14 +246,53 @@ DROP TABLE t1; drop table if exists t1; create table t1 select repeat('a',10) as c1; delete from t1; +insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F); +insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F); 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) +create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1; +select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1'; +column_name collation_name +c1 gbk_chinese_ci +name gbk_chinese_ci +SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1; +GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) +<00> 00 +<01> 01 +<02> 02 +<03> 03 +<04> 04 +<05> 05 +<06> 06 +<07> 07 +<08> 08 +<09> 09 +<0A> 0A +<0B> 0B +<0C> 0C +<0D> 0D +<0E> 0E +<0F> 0F +<10> 10 +<11> 11 +<12> 12 +<13> 13 +<14> 14 +<15> 15 +<16> 16 +<17> 17 +<18> 18 +<19> 19 +<1A> 1A +<1B> 1B +<1C> 1C +<1D> 1D +<1E> 1E +<1F> 1F 20 ! 21 " 22 @@ -322,8 +361,9 @@ _ 5F { 7B | 7C } 7D - 7F +<7F> 7F drop table t1; +drop view v1; SET collation_connection='gbk_bin'; create table t1 select repeat('a',4000) a; delete from t1; @@ -465,6 +505,154 @@ a hex(b) c 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 (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F); +insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F); +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); +create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1; +select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1'; +column_name collation_name +c1 gbk_bin +name gbk_bin +SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1; +GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) +<00> 00 +<01> 01 +<02> 02 +<03> 03 +<04> 04 +<05> 05 +<06> 06 +<07> 07 +<08> 08 +<09> 09 +<0A> 0A +<0B> 0B +<0C> 0C +<0D> 0D +<0E> 0E +<0F> 0F +<10> 10 +<11> 11 +<12> 12 +<13> 13 +<14> 14 +<15> 15 +<16> 16 +<17> 17 +<18> 18 +<19> 19 +<1A> 1A +<1B> 1B +<1C> 1C +<1D> 1D +<1E> 1E +<1F> 1F + 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 +A 41 +B 42 +C 43 +D 44 +E 45 +F 46 +G 47 +H 48 +I 49 +J 4A +K 4B +L 4C +M 4D +N 4E +O 4F +P 50 +Q 51 +R 52 +S 53 +T 54 +U 55 +V 56 +W 57 +X 58 +Y 59 +Z 5A +[ 5B +\ 5C +] 5D +^ 5E +_ 5F +` 60 +a 61 +b 62 +c 63 +d 64 +e 65 +f 66 +g 67 +h 68 +i 69 +j 6A +k 6B +l 6C +m 6D +n 6E +o 6F +p 70 +q 71 +r 72 +s 73 +t 74 +u 75 +v 76 +w 77 +x 78 +y 79 +z 7A +{ 7B +| 7C +} 7D +~ 7E +<7F> 7F +drop table t1; +drop view v1; SET NAMES gbk; CREATE TABLE t1 (a text) character set gbk; INSERT INTO t1 VALUES (0xA3A0),(0xA1A1); diff --git a/mysql-test/main/ctype_gbk.test b/mysql-test/main/ctype_gbk.test index d68b78f847c..808bea53e42 100644 --- a/mysql-test/main/ctype_gbk.test +++ b/mysql-test/main/ctype_gbk.test @@ -23,6 +23,7 @@ SET collation_connection='gbk_bin'; -- source include/ctype_innodb_like.inc -- source include/ctype_like_escape.inc -- source include/ctype_like_range_f1f2.inc +-- source include/ctype_ascii_order.inc # # Bug#11987 mysql will truncate the text when diff --git a/mysql-test/main/ctype_sjis.result b/mysql-test/main/ctype_sjis.result index 36411914e86..8f21e87c507 100644 --- a/mysql-test/main/ctype_sjis.result +++ b/mysql-test/main/ctype_sjis.result @@ -231,6 +231,128 @@ SELECT HEX(subject),HEX(pattern),STR_TO_DATE(subject, pattern) FROM t1; HEX(subject) HEX(pattern) STR_TO_DATE(subject, pattern) 323030318180303181803031 25598180256D81802564 2001-01-01 00:00:00.000000 DROP TABLE t1; +drop table if exists t1; +create table t1 select repeat('a',10) as c1; +delete from t1; +insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F); +insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F); +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); +create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1; +select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1'; +column_name collation_name +c1 sjis_japanese_ci +name sjis_japanese_ci +SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1; +GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) +<00> 00 +<01> 01 +<02> 02 +<03> 03 +<04> 04 +<05> 05 +<06> 06 +<07> 07 +<08> 08 +<09> 09 +<0A> 0A +<0B> 0B +<0C> 0C +<0D> 0D +<0E> 0E +<0F> 0F +<10> 10 +<11> 11 +<12> 12 +<13> 13 +<14> 14 +<15> 15 +<16> 16 +<17> 17 +<18> 18 +<19> 19 +<1A> 1A +<1B> 1B +<1C> 1C +<1D> 1D +<1E> 1E +<1F> 1F + 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 +Ee 45,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 +Zz 5A,7A +[ 5B +\ 5C +] 5D +^ 5E +_ 5F +` 60 +{ 7B +| 7C +} 7D +~ 7E +<7F> 7F +drop table t1; +drop view v1; SET collation_connection='sjis_bin'; create table t1 select repeat('a',4000) a; delete from t1; @@ -372,6 +494,154 @@ a hex(b) c 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 (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F); +insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F); +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); +create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1; +select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1'; +column_name collation_name +c1 sjis_bin +name sjis_bin +SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1; +GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) +<00> 00 +<01> 01 +<02> 02 +<03> 03 +<04> 04 +<05> 05 +<06> 06 +<07> 07 +<08> 08 +<09> 09 +<0A> 0A +<0B> 0B +<0C> 0C +<0D> 0D +<0E> 0E +<0F> 0F +<10> 10 +<11> 11 +<12> 12 +<13> 13 +<14> 14 +<15> 15 +<16> 16 +<17> 17 +<18> 18 +<19> 19 +<1A> 1A +<1B> 1B +<1C> 1C +<1D> 1D +<1E> 1E +<1F> 1F + 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 +A 41 +B 42 +C 43 +D 44 +E 45 +F 46 +G 47 +H 48 +I 49 +J 4A +K 4B +L 4C +M 4D +N 4E +O 4F +P 50 +Q 51 +R 52 +S 53 +T 54 +U 55 +V 56 +W 57 +X 58 +Y 59 +Z 5A +[ 5B +\ 5C +] 5D +^ 5E +_ 5F +` 60 +a 61 +b 62 +c 63 +d 64 +e 65 +f 66 +g 67 +h 68 +i 69 +j 6A +k 6B +l 6C +m 6D +n 6E +o 6F +p 70 +q 71 +r 72 +s 73 +t 74 +u 75 +v 76 +w 77 +x 78 +y 79 +z 7A +{ 7B +| 7C +} 7D +~ 7E +<7F> 7F +drop table t1; +drop view v1; SET NAMES sjis; SELECT HEX('@\') FROM DUAL; HEX('@\') diff --git a/mysql-test/main/ctype_sjis.test b/mysql-test/main/ctype_sjis.test index 8ca423bb7c1..d255b6267fd 100644 --- a/mysql-test/main/ctype_sjis.test +++ b/mysql-test/main/ctype_sjis.test @@ -70,11 +70,13 @@ SET collation_connection='sjis_japanese_ci'; -- source include/ctype_like_escape.inc -- source include/ctype_like_range_f1f2.inc -- source include/ctype_str_to_date.inc +-- source include/ctype_ascii_order.inc SET collation_connection='sjis_bin'; -- source include/ctype_filesort.inc -- source include/ctype_innodb_like.inc -- source include/ctype_like_escape.inc -- source include/ctype_like_range_f1f2.inc +-- source include/ctype_ascii_order.inc # Check parsing of string literals in SJIS with multibyte characters that # have an embedded \ in them. (Bug #8303) diff --git a/mysql-test/main/ctype_tis620.result b/mysql-test/main/ctype_tis620.result index 7e0c255c756..ff1d5927651 100644 --- a/mysql-test/main/ctype_tis620.result +++ b/mysql-test/main/ctype_tis620.result @@ -3042,15 +3042,54 @@ SELECT '\%b' LIKE '%\%'; drop table if exists t1; create table t1 select repeat('a',10) as c1; delete from t1; +insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F); +insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F); 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) +create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1; +select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1'; +column_name collation_name +c1 tis620_thai_ci +name tis620_thai_ci +SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1; +GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) +<01> 01 +<02> 02 +<03> 03 +<04> 04 +<05> 05 +<06> 06 +<07> 07 +<08> 08 +<09> 09 +<0A> 0A +<0B> 0B +<0C> 0C +<0D> 0D +<0E> 0E +<0F> 0F +<10> 10 +<11> 11 +<12> 12 +<13> 13 +<14> 14 +<15> 15 +<16> 16 +<17> 17 +<18> 18 +<19> 19 +<1A> 1A +<1B> 1B +<1C> 1C +<1D> 1D +<1E> 1E +<1F> 1F 20 +<00> 00 ! 21 " 22 # 23 @@ -3119,8 +3158,9 @@ Zz 5A,7A | 7C } 7D ~ 7E - 7F +<7F> 7F drop table t1; +drop view v1; # # MDEV-7149 Constant condition propagation erroneously applied for LIKE # diff --git a/mysql-test/main/ctype_ujis.result b/mysql-test/main/ctype_ujis.result index 8895770191d..bebe962fca4 100644 --- a/mysql-test/main/ctype_ujis.result +++ b/mysql-test/main/ctype_ujis.result @@ -1,5 +1,281 @@ drop table if exists t1; set names ujis; +# +# General tests +# +SET NAMES ujis; +drop table if exists t1; +create table t1 select repeat('a',10) as c1; +delete from t1; +insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F); +insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F); +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); +create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1; +select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1'; +column_name collation_name +c1 ujis_japanese_ci +name ujis_japanese_ci +SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1; +GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) +<00> 00 +<01> 01 +<02> 02 +<03> 03 +<04> 04 +<05> 05 +<06> 06 +<07> 07 +<08> 08 +<09> 09 +<0A> 0A +<0B> 0B +<0C> 0C +<0D> 0D +<0E> 0E +<0F> 0F +<10> 10 +<11> 11 +<12> 12 +<13> 13 +<14> 14 +<15> 15 +<16> 16 +<17> 17 +<18> 18 +<19> 19 +<1A> 1A +<1B> 1B +<1C> 1C +<1D> 1D +<1E> 1E +<1F> 1F + 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 +Ee 45,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 +Zz 5A,7A +[ 5B +\ 5C +] 5D +^ 5E +_ 5F +` 60 +{ 7B +| 7C +} 7D +~ 7E +<7F> 7F +drop table t1; +drop view v1; +SET NAMES ujis COLLATE ujis_bin; +drop table if exists t1; +create table t1 select repeat('a',10) as c1; +delete from t1; +insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F); +insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F); +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); +create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1; +select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1'; +column_name collation_name +c1 ujis_bin +name ujis_bin +SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1; +GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) +<00> 00 +<01> 01 +<02> 02 +<03> 03 +<04> 04 +<05> 05 +<06> 06 +<07> 07 +<08> 08 +<09> 09 +<0A> 0A +<0B> 0B +<0C> 0C +<0D> 0D +<0E> 0E +<0F> 0F +<10> 10 +<11> 11 +<12> 12 +<13> 13 +<14> 14 +<15> 15 +<16> 16 +<17> 17 +<18> 18 +<19> 19 +<1A> 1A +<1B> 1B +<1C> 1C +<1D> 1D +<1E> 1E +<1F> 1F + 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 +A 41 +B 42 +C 43 +D 44 +E 45 +F 46 +G 47 +H 48 +I 49 +J 4A +K 4B +L 4C +M 4D +N 4E +O 4F +P 50 +Q 51 +R 52 +S 53 +T 54 +U 55 +V 56 +W 57 +X 58 +Y 59 +Z 5A +[ 5B +\ 5C +] 5D +^ 5E +_ 5F +` 60 +a 61 +b 62 +c 63 +d 64 +e 65 +f 66 +g 67 +h 68 +i 69 +j 6A +k 6B +l 6C +m 6D +n 6E +o 6F +p 70 +q 71 +r 72 +s 73 +t 74 +u 75 +v 76 +w 77 +x 78 +y 79 +z 7A +{ 7B +| 7C +} 7D +~ 7E +<7F> 7F +drop table t1; +drop view v1; +SET NAMES ujis; create table t1 (c text character set ujis); insert into t1 values (0xa4a2),(0xa4a3); select hex(left(c,1)) from t1 group by c; diff --git a/mysql-test/main/ctype_ujis.test b/mysql-test/main/ctype_ujis.test index 72a609edf39..7b77232738b 100644 --- a/mysql-test/main/ctype_ujis.test +++ b/mysql-test/main/ctype_ujis.test @@ -9,10 +9,20 @@ drop table if exists t1; set names ujis; +--echo # +--echo # General tests +--echo # + +SET NAMES ujis; +-- source include/ctype_ascii_order.inc +SET NAMES ujis COLLATE ujis_bin; +-- source include/ctype_ascii_order.inc + # # Test problem with LEFT() # +SET NAMES ujis; create table t1 (c text character set ujis); insert into t1 values (0xa4a2),(0xa4a3); select hex(left(c,1)) from t1 group by c; |