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 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;
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
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;
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;
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	
3	F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2	
4	F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2	
DROP TABLE t1;
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;
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;
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	
3	F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2	
4	F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2	
DROP TABLE t1;
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
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'));;
hex(load_file('MYSQLD_DATADIR/test/t1.txt'))
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 NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT COUNT(*) FROM t1;
COUNT(*)
28672
UPDATE t1 SET a=unhex(code) ORDER BY code;
Warnings:
Warning	1366	Incorrect string value: '\x80 ' for column 'a' at row 1
Warning	1366	Incorrect string value: '\x80!' for column 'a' at row 2
Warning	1366	Incorrect string value: '\x80"' for column 'a' at row 3
Warning	1366	Incorrect string value: '\x80#' for column 'a' at row 4
Warning	1366	Incorrect string value: '\x80$' for column 'a' at row 5
Warning	1366	Incorrect string value: '\x80%' for column 'a' at row 6
Warning	1366	Incorrect string value: '\x80&' for column 'a' at row 7
Warning	1366	Incorrect string value: '\x80'' for column 'a' at row 8
Warning	1366	Incorrect string value: '\x80(' for column 'a' at row 9
Warning	1366	Incorrect string value: '\x80)' for column 'a' at row 10
Warning	1366	Incorrect string value: '\x80*' for column 'a' at row 11
Warning	1366	Incorrect string value: '\x80+' for column 'a' at row 12
Warning	1366	Incorrect string value: '\x80,' for column 'a' at row 13
Warning	1366	Incorrect string value: '\x80-' for column 'a' at row 14
Warning	1366	Incorrect string value: '\x80.' for column 'a' at row 15
Warning	1366	Incorrect string value: '\x80/' for column 'a' at row 16
Warning	1366	Incorrect string value: '\x800' for column 'a' at row 17
Warning	1366	Incorrect string value: '\x801' for column 'a' at row 18
Warning	1366	Incorrect string value: '\x802' for column 'a' at row 19
Warning	1366	Incorrect string value: '\x803' for column 'a' at row 20
Warning	1366	Incorrect string value: '\x804' for column 'a' at row 21
Warning	1366	Incorrect string value: '\x805' for column 'a' at row 22
Warning	1366	Incorrect string value: '\x806' for column 'a' at row 23
Warning	1366	Incorrect string value: '\x807' for column 'a' at row 24
Warning	1366	Incorrect string value: '\x808' for column 'a' at row 25
Warning	1366	Incorrect string value: '\x809' for column 'a' at row 26
Warning	1366	Incorrect string value: '\x80:' for column 'a' at row 27
Warning	1366	Incorrect string value: '\x80;' for column 'a' at row 28
Warning	1366	Incorrect string value: '\x80<' for column 'a' at row 29
Warning	1366	Incorrect string value: '\x80=' for column 'a' at row 30
Warning	1366	Incorrect string value: '\x80>' for column 'a' at row 31
Warning	1366	Incorrect string value: '\x80?' for column 'a' at row 32
Warning	1366	Incorrect string value: '\x80@' for column 'a' at row 33
Warning	1366	Incorrect string value: '\x80A' for column 'a' at row 34
Warning	1366	Incorrect string value: '\x80B' for column 'a' at row 35
Warning	1366	Incorrect string value: '\x80C' for column 'a' at row 36
Warning	1366	Incorrect string value: '\x80D' for column 'a' at row 37
Warning	1366	Incorrect string value: '\x80E' for column 'a' at row 38
Warning	1366	Incorrect string value: '\x80F' for column 'a' at row 39
Warning	1366	Incorrect string value: '\x80G' for column 'a' at row 40
Warning	1366	Incorrect string value: '\x80H' for column 'a' at row 41
Warning	1366	Incorrect string value: '\x80I' for column 'a' at row 42
Warning	1366	Incorrect string value: '\x80J' for column 'a' at row 43
Warning	1366	Incorrect string value: '\x80K' for column 'a' at row 44
Warning	1366	Incorrect string value: '\x80L' for column 'a' at row 45
Warning	1366	Incorrect string value: '\x80M' for column 'a' at row 46
Warning	1366	Incorrect string value: '\x80N' for column 'a' at row 47
Warning	1366	Incorrect string value: '\x80O' for column 'a' at row 48
Warning	1366	Incorrect string value: '\x80P' for column 'a' at row 49
Warning	1366	Incorrect string value: '\x80Q' for column 'a' at row 50
Warning	1366	Incorrect string value: '\x80R' for column 'a' at row 51
Warning	1366	Incorrect string value: '\x80S' for column 'a' at row 52
Warning	1366	Incorrect string value: '\x80T' for column 'a' at row 53
Warning	1366	Incorrect string value: '\x80U' for column 'a' at row 54
Warning	1366	Incorrect string value: '\x80V' for column 'a' at row 55
Warning	1366	Incorrect string value: '\x80W' for column 'a' at row 56
Warning	1366	Incorrect string value: '\x80X' for column 'a' at row 57
Warning	1366	Incorrect string value: '\x80Y' for column 'a' at row 58
Warning	1366	Incorrect string value: '\x80Z' for column 'a' at row 59
Warning	1366	Incorrect string value: '\x80[' for column 'a' at row 60
Warning	1366	Incorrect string value: '\x80\' for column 'a' at row 61
Warning	1366	Incorrect string value: '\x80]'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	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	У	У	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