ctype_tis620.test
上传用户:romrleung
上传日期:2022-05-23
资源大小:18897k
文件大小:64k
- -- 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));
- SET NAMES tis620;
- CREATE TABLE t1 (
- recid int(11) NOT NULL auto_increment,
- dyninfo text,
- PRIMARY KEY (recid)
- ) ENGINE=MyISAM CHARACTER SET tis620;
- show create table t1;
- INSERT INTO t1 VALUES (1,'color="STB,NPG"rnengine="J30A13"rnframe="MRHCG1640YP4"rngrade="V6"rnmodel="ACCORD"rnmodelcode="CG164YEN"rntype="VT6"rn');
- INSERT INTO t1 VALUES (2,'color="HTM,NPG,DEG,RGS"rnengine="F23A5YP1"rnframe="MRHCF8640YP3"rngrade="EXi AT"rnmodel="ACCORD"rnmodelcode="CF864YE"rntype="EXA"rn');
- SELECT DISTINCT
- (IF( LOCATE( 'year="', dyninfo ) = 1,
- SUBSTRING( dyninfo, 6+1, LOCATE('"r',dyninfo) - 6 -1),
- IF( LOCATE( 'nyear="', dyninfo ),
- SUBSTRING( dyninfo, LOCATE( 'nyear="', dyninfo ) + 7,
- LOCATE( '"r', SUBSTRING( dyninfo, LOCATE( 'nyear="', dyninfo ) +7 )) - 1), '' ))) AS year
- FROM t1
- HAVING year != '' ORDER BY year;
- DROP TABLE t1;
- DROP TABLE IF EXISTS t1;
- CREATE TABLE t1
- (
- name varchar(50) NOT NULL default '',
- excelorder int(11) NOT NULL default '0',
- neworder int(11) NOT NULL default '0'
- ) ENGINE=MyISAM DEFAULT CHARSET=tis620;
- INSERT INTO `t1` VALUES ('+45 BRETT',4,1),('+55 BRETT',5,2),('+56 BRETT',6,3),('-.55 BRETT',2,4),('-45 BRETT',8,5),('-55 BRETT',13,6),('.-55 BRETT',3,7),('.55 BRETT',1,8),('45 BRETT',7,9),('5 5 BRETT3',9,10),('5 5 BRETT2',10,11),('5 5 BRETT1',11,12),('5-5 BRETT',14,13),('55 BRETT',12,14),('55+ BRETT',17,15),('55- BRETT',15,16),('55. BRETT',16,17),('