mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug 1552:
TIS620 to Unicode and Unicode to TIS620 conversion check.
This commit is contained in:
4
mysql-test/include/have_tis620.inc
Normal file
4
mysql-test/include/have_tis620.inc
Normal file
@ -0,0 +1,4 @@
|
||||
-- require r/have_tis620.require
|
||||
disable_query_log;
|
||||
show collation like "tis620_thai_ci";
|
||||
enable_query_log;
|
113
mysql-test/r/ctype_tis620.result
Normal file
113
mysql-test/r/ctype_tis620.result
Normal file
@ -0,0 +1,113 @@
|
||||
drop table if exists t1;
|
||||
SET @pl0= _tis620 0x000102030405060708090A0B0C0D0E0F;
|
||||
SET @pl1= _tis620 0x101112131415161718191A1B1C1D1E1F;
|
||||
SET @pl2= _tis620 0x202122232425262728292A2B2C2D2E2F;
|
||||
SET @pl3= _tis620 0x303132333435363738393A3B3C3D3E3F;
|
||||
SET @pl4= _tis620 0x404142434445464748494A4B4C4D4E4F;
|
||||
SET @pl5= _tis620 0x505152535455565758595A5B5C5D5E5F;
|
||||
SET @pl6= _tis620 0x606162636465666768696A6B6C6D6E6F;
|
||||
SET @pl7= _tis620 0x707172737475767778797A7B7C7D7E7F;
|
||||
SET @pl8= _tis620 0x808182838485868788898A8B8C8D8E8F;
|
||||
SET @pl9= _tis620 0x909192939495969798999A9B9C9D9E9F;
|
||||
SET @plA= _tis620 0xA0A1A2A3A4A5A6A7A8A9AAABACADAEAF;
|
||||
SET @plB= _tis620 0xB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF;
|
||||
SET @plC= _tis620 0xC0C1C2C3C4C5C6C7C8C9CACBCCCDCECF;
|
||||
SET @plD= _tis620 0xD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF;
|
||||
SET @plE= _tis620 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF;
|
||||
SET @plF= _tis620 0xF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF;
|
||||
SELECT hex(@u0:=convert(@pl0 using utf8));
|
||||
hex(@u0:=convert(@pl0 using utf8))
|
||||
000102030405060708090A0B0C0D0E0F
|
||||
SELECT hex(@u1:=convert(@pl1 using utf8));
|
||||
hex(@u1:=convert(@pl1 using utf8))
|
||||
101112131415161718191A1B1C1D1E1F
|
||||
SELECT hex(@u2:=convert(@pl2 using utf8));
|
||||
hex(@u2:=convert(@pl2 using utf8))
|
||||
202122232425262728292A2B2C2D2E2F
|
||||
SELECT hex(@u3:=convert(@pl3 using utf8));
|
||||
hex(@u3:=convert(@pl3 using utf8))
|
||||
303132333435363738393A3B3C3D3E3F
|
||||
SELECT hex(@u4:=convert(@pl4 using utf8));
|
||||
hex(@u4:=convert(@pl4 using utf8))
|
||||
404142434445464748494A4B4C4D4E4F
|
||||
SELECT hex(@u5:=convert(@pl5 using utf8));
|
||||
hex(@u5:=convert(@pl5 using utf8))
|
||||
505152535455565758595A5B5C5D5E5F
|
||||
SELECT hex(@u6:=convert(@pl6 using utf8));
|
||||
hex(@u6:=convert(@pl6 using utf8))
|
||||
606162636465666768696A6B6C6D6E6F
|
||||
SELECT hex(@u7:=convert(@pl7 using utf8));
|
||||
hex(@u7:=convert(@pl7 using utf8))
|
||||
707172737475767778797A7B7C7D7E7F
|
||||
SELECT hex(@u8:=convert(@pl8 using utf8));
|
||||
hex(@u8:=convert(@pl8 using utf8))
|
||||
C280C281C282C283C284C285C286C287C288C289C28AC28BC28CC28DC28EC28F
|
||||
SELECT hex(@u9:=convert(@pl9 using utf8));
|
||||
hex(@u9:=convert(@pl9 using utf8))
|
||||
C290C291C292C293C294C295C296C297C298C299C29AC29BC29CC29DC29EC29F
|
||||
SELECT hex(@uA:=convert(@plA using utf8));
|
||||
hex(@uA:=convert(@plA using utf8))
|
||||
EFBFBDE0B881E0B882E0B883E0B884E0B885E0B886E0B887E0B888E0B889E0B88AE0B88BE0B88CE0B88DE0B88EE0B88F
|
||||
SELECT hex(@uB:=convert(@plB using utf8));
|
||||
hex(@uB:=convert(@plB using utf8))
|
||||
E0B890E0B891E0B892E0B893E0B894E0B895E0B896E0B897E0B898E0B899E0B89AE0B89BE0B89CE0B89DE0B89EE0B89F
|
||||
SELECT hex(@uC:=convert(@plC using utf8));
|
||||
hex(@uC:=convert(@plC using utf8))
|
||||
E0B8A0E0B8A1E0B8A2E0B8A3E0B8A4E0B8A5E0B8A6E0B8A7E0B8A8E0B8A9E0B8AAE0B8ABE0B8ACE0B8ADE0B8AEE0B8AF
|
||||
SELECT hex(@uD:=convert(@plD using utf8));
|
||||
hex(@uD:=convert(@plD using utf8))
|
||||
E0B8B0E0B8B1E0B8B2E0B8B3E0B8B4E0B8B5E0B8B6E0B8B7E0B8B8E0B8B9E0B8BAEFBFBDEFBFBDEFBFBDEFBFBDE0B8BF
|
||||
SELECT hex(@uE:=convert(@plE using utf8));
|
||||
hex(@uE:=convert(@plE using utf8))
|
||||
E0B980E0B981E0B982E0B983E0B984E0B985E0B986E0B987E0B988E0B989E0B98AE0B98BE0B98CE0B98DE0B98EE0B98F
|
||||
SELECT hex(@uF:=convert(@plF using utf8));
|
||||
hex(@uF:=convert(@plF using utf8))
|
||||
E0B990E0B991E0B992E0B993E0B994E0B995E0B996E0B997E0B998E0B999E0B99AE0B99BEFBFBDEFBFBDEFBFBDEFBFBD
|
||||
SELECT hex(convert(@u0 USING tis620));
|
||||
hex(convert(@u0 USING tis620))
|
||||
000102030405060708090A0B0C0D0E0F
|
||||
SELECT hex(convert(@u1 USING tis620));
|
||||
hex(convert(@u1 USING tis620))
|
||||
101112131415161718191A1B1C1D1E1F
|
||||
SELECT hex(convert(@u2 USING tis620));
|
||||
hex(convert(@u2 USING tis620))
|
||||
202122232425262728292A2B2C2D2E2F
|
||||
SELECT hex(convert(@u3 USING tis620));
|
||||
hex(convert(@u3 USING tis620))
|
||||
303132333435363738393A3B3C3D3E3F
|
||||
SELECT hex(convert(@u4 USING tis620));
|
||||
hex(convert(@u4 USING tis620))
|
||||
404142434445464748494A4B4C4D4E4F
|
||||
SELECT hex(convert(@u5 USING tis620));
|
||||
hex(convert(@u5 USING tis620))
|
||||
505152535455565758595A5B5C5D5E5F
|
||||
SELECT hex(convert(@u6 USING tis620));
|
||||
hex(convert(@u6 USING tis620))
|
||||
606162636465666768696A6B6C6D6E6F
|
||||
SELECT hex(convert(@u7 USING tis620));
|
||||
hex(convert(@u7 USING tis620))
|
||||
707172737475767778797A7B7C7D7E7F
|
||||
SELECT hex(convert(@u8 USING tis620));
|
||||
hex(convert(@u8 USING tis620))
|
||||
808182838485868788898A8B8C8D8E8F
|
||||
SELECT hex(convert(@u9 USING tis620));
|
||||
hex(convert(@u9 USING tis620))
|
||||
909192939495969798999A9B9C9D9E9F
|
||||
SELECT hex(convert(@uA USING tis620));
|
||||
hex(convert(@uA USING tis620))
|
||||
FFA1A2A3A4A5A6A7A8A9AAABACADAEAF
|
||||
SELECT hex(convert(@uB USING tis620));
|
||||
hex(convert(@uB USING tis620))
|
||||
B0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF
|
||||
SELECT hex(convert(@uC USING tis620));
|
||||
hex(convert(@uC USING tis620))
|
||||
C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF
|
||||
SELECT hex(convert(@uD USING tis620));
|
||||
hex(convert(@uD USING tis620))
|
||||
D0D1D2D3D4D5D6D7D8D9DAFFFFFFFFDF
|
||||
SELECT hex(convert(@uE USING tis620));
|
||||
hex(convert(@uE USING tis620))
|
||||
E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF
|
||||
SELECT hex(convert(@uF USING tis620));
|
||||
hex(convert(@uF USING tis620))
|
||||
F0F1F2F3F4F5F6F7F8F9FAFBFFFFFFFF
|
2
mysql-test/r/have_tis620.require
Normal file
2
mysql-test/r/have_tis620.require
Normal file
@ -0,0 +1,2 @@
|
||||
Collation Charset Id Default Compiled Sortlen
|
||||
tis620_thai_ci tis620 18 Yes Yes 4
|
64
mysql-test/t/ctype_tis620.test
Normal file
64
mysql-test/t/ctype_tis620.test
Normal file
@ -0,0 +1,64 @@
|
||||
-- source include/have_tis620.inc
|
||||
|
||||
#
|
||||
# Tests with the big5 character set
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# Bug 1552: tis620 <-> unicode conversion crashed
|
||||
# Check tis620 -> utf8 -> tis620 round trip conversion
|
||||
#
|
||||
|
||||
SET @pl0= _tis620 0x000102030405060708090A0B0C0D0E0F;
|
||||
SET @pl1= _tis620 0x101112131415161718191A1B1C1D1E1F;
|
||||
SET @pl2= _tis620 0x202122232425262728292A2B2C2D2E2F;
|
||||
SET @pl3= _tis620 0x303132333435363738393A3B3C3D3E3F;
|
||||
SET @pl4= _tis620 0x404142434445464748494A4B4C4D4E4F;
|
||||
SET @pl5= _tis620 0x505152535455565758595A5B5C5D5E5F;
|
||||
SET @pl6= _tis620 0x606162636465666768696A6B6C6D6E6F;
|
||||
SET @pl7= _tis620 0x707172737475767778797A7B7C7D7E7F;
|
||||
SET @pl8= _tis620 0x808182838485868788898A8B8C8D8E8F;
|
||||
SET @pl9= _tis620 0x909192939495969798999A9B9C9D9E9F;
|
||||
SET @plA= _tis620 0xA0A1A2A3A4A5A6A7A8A9AAABACADAEAF;
|
||||
SET @plB= _tis620 0xB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF;
|
||||
SET @plC= _tis620 0xC0C1C2C3C4C5C6C7C8C9CACBCCCDCECF;
|
||||
SET @plD= _tis620 0xD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF;
|
||||
SET @plE= _tis620 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF;
|
||||
SET @plF= _tis620 0xF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF;
|
||||
|
||||
SELECT hex(@u0:=convert(@pl0 using utf8));
|
||||
SELECT hex(@u1:=convert(@pl1 using utf8));
|
||||
SELECT hex(@u2:=convert(@pl2 using utf8));
|
||||
SELECT hex(@u3:=convert(@pl3 using utf8));
|
||||
SELECT hex(@u4:=convert(@pl4 using utf8));
|
||||
SELECT hex(@u5:=convert(@pl5 using utf8));
|
||||
SELECT hex(@u6:=convert(@pl6 using utf8));
|
||||
SELECT hex(@u7:=convert(@pl7 using utf8));
|
||||
SELECT hex(@u8:=convert(@pl8 using utf8));
|
||||
SELECT hex(@u9:=convert(@pl9 using utf8));
|
||||
SELECT hex(@uA:=convert(@plA using utf8));
|
||||
SELECT hex(@uB:=convert(@plB using utf8));
|
||||
SELECT hex(@uC:=convert(@plC using utf8));
|
||||
SELECT hex(@uD:=convert(@plD using utf8));
|
||||
SELECT hex(@uE:=convert(@plE using utf8));
|
||||
SELECT hex(@uF:=convert(@plF using utf8));
|
||||
|
||||
SELECT hex(convert(@u0 USING tis620));
|
||||
SELECT hex(convert(@u1 USING tis620));
|
||||
SELECT hex(convert(@u2 USING tis620));
|
||||
SELECT hex(convert(@u3 USING tis620));
|
||||
SELECT hex(convert(@u4 USING tis620));
|
||||
SELECT hex(convert(@u5 USING tis620));
|
||||
SELECT hex(convert(@u6 USING tis620));
|
||||
SELECT hex(convert(@u7 USING tis620));
|
||||
SELECT hex(convert(@u8 USING tis620));
|
||||
SELECT hex(convert(@u9 USING tis620));
|
||||
SELECT hex(convert(@uA USING tis620));
|
||||
SELECT hex(convert(@uB USING tis620));
|
||||
SELECT hex(convert(@uC USING tis620));
|
||||
SELECT hex(convert(@uD USING tis620));
|
||||
SELECT hex(convert(@uE USING tis620));
|
||||
SELECT hex(convert(@uF USING tis620));
|
Reference in New Issue
Block a user