1
-- source include/have_big5.inc
4
# Tests with the big5 character set
7
drop table if exists t1;
10
SET @test_character_set= 'big5';
11
SET @test_collation= 'big5_chinese_ci';
12
-- source include/ctype_common.inc
15
SET collation_connection='big5_chinese_ci';
16
-- source include/ctype_filesort.inc
17
-- source include/ctype_innodb_like.inc
18
-- source include/ctype_like_escape.inc
19
-- source include/ctype_like_range_f1f2.inc
20
SET collation_connection='big5_bin';
21
-- source include/ctype_filesort.inc
22
-- source include/ctype_innodb_like.inc
23
-- source include/ctype_like_escape.inc
24
-- source include/ctype_like_range_f1f2.inc
27
# Bugs#9357: TEXT columns break string with special word in BIG5 charset.
30
CREATE TABLE t1 (a text) character set big5;
31
INSERT INTO t1 VALUES ('��');
36
# BUG#12075 - FULLTEXT non-functional for big5 strings
38
CREATE TABLE t1 (a CHAR(50) CHARACTER SET big5 NOT NULL, FULLTEXT(a));
39
INSERT INTO t1 VALUES(0xA741ADCCA66EB6DC20A7DAADCCABDCA66E);
40
SELECT HEX(a) FROM t1 WHERE MATCH(a) AGAINST (0xA741ADCCA66EB6DC IN BOOLEAN MODE);
44
# Bug#12476 Some big5 codes are still missing.
47
create table t1 (a char character set big5);
48
insert into t1 values (0xF9D6),(0xF9D7),(0xF9D8),(0xF9D9);
49
insert into t1 values (0xF9DA),(0xF9DB),(0xF9DC);
51
select hex(a) a, hex(@u:=convert(a using utf8)) b,
52
hex(convert(@u using big5)) c from t1 order by a;
53
# Check that there is no "illegal mix of collations" error with Unicode.
54
alter table t1 convert to character set utf8;
55
select hex(a) from t1 where a = _big5 0xF9DC;
59
# Bugs#15375: Unassigned multibyte codes are broken
60
# into parts when converting to Unicode.
61
# This query should return 0x003F0041. I.e. it should
62
# scan unassigned double-byte character 0xC840, convert
63
# it as QUESTION MARK 0x003F and then scan the next
64
# character, which is a single byte character 0x41.
66
select hex(convert(_big5 0xC84041 using ucs2));
68
--echo End of 4.1 tests
71
# Bug#26711 "binary content 0x00 sometimes becomes 0x5C 0x00 after dump/load"
74
create table t1 (a blob);
75
insert into t1 values (0xEE00);
76
select * into outfile 'test/t1.txt' from t1;
78
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
79
--eval select hex(load_file('$MYSQLTEST_VARDIR/master-data/test/t1.txt'));
80
load data infile 't1.txt' into table t1;
81
select hex(a) from t1;
82
--exec rm $MYSQLTEST_VARDIR/master-data/test/t1.txt
85
--echo End of 5.0 tests
89
--source include/weight_string.inc
90
--source include/weight_string_l1.inc
91
--source include/weight_string_A1A1.inc
93
set collation_connection=big5_bin;
94
--source include/weight_string.inc
95
--source include/weight_string_l1.inc
96
--source include/weight_string_A1A1.inc