drop table if exists t1;
In the following tests we change the order of letter "b"
making it equal to letter "a", and check that it works
with all Unicode character sets
set names utf8;
show variables like 'character_sets_dir%';
Variable_name	Value
character_sets_dir	MYSQL_TEST_DIR/std_data/
show collation like 'utf8_test_ci';
Collation	Charset	Id	Default	Compiled	Sortlen
utf8_test_ci	utf8	353			8
create table t1 (c1 char(1) character set utf8 collate utf8_test_ci)
engine=innodb;
ERROR HY000: In InnoDB, charset-collation codes must be below 256. Unsupported code 353.
show warnings;
Level	Code	Message
Error	1005	In InnoDB, charset-collation codes must be below 256. Unsupported code 353.
Error	1005	Can't create table 'test.t1' (errno: 1005)
show collation like 'ucs2_test_ci';
Collation	Charset	Id	Default	Compiled	Sortlen
ucs2_test_ci	ucs2	358			8
create table t1 (c1 char(1) character set ucs2 collate ucs2_test_ci)
engine=innodb;
ERROR HY000: In InnoDB, charset-collation codes must be below 256. Unsupported code 358.
show warnings;
Level	Code	Message
Error	1005	In InnoDB, charset-collation codes must be below 256. Unsupported code 358.
Error	1005	Can't create table 'test.t1' (errno: 1005)
show collation like 'utf16_test_ci';
Collation	Charset	Id	Default	Compiled	Sortlen
utf16_test_ci	utf16	327			8
create table t1 (c1 char(1) character set utf16 collate utf16_test_ci)
engine=innodb;
ERROR HY000: In InnoDB, charset-collation codes must be below 256. Unsupported code 327.
show warnings;
Level	Code	Message
Error	1005	In InnoDB, charset-collation codes must be below 256. Unsupported code 327.
Error	1005	Can't create table 'test.t1' (errno: 1005)
show collation like 'utf32_test_ci';
Collation	Charset	Id	Default	Compiled	Sortlen
utf32_test_ci	utf32	391			8
create table t1 (c1 char(1) character set utf32 collate utf32_test_ci)
engine=innodb;
ERROR HY000: In InnoDB, charset-collation codes must be below 256. Unsupported code 391.
show warnings;
Level	Code	Message
Error	1005	In InnoDB, charset-collation codes must be below 256. Unsupported code 391.
Error	1005	Can't create table 'test.t1' (errno: 1005)
Vietnamese experimental collation
show collation like 'ucs2_vn_ci';
Collation	Charset	Id	Default	Compiled	Sortlen
ucs2_vn_ci	ucs2	359			8
create table t1 (c1 char(1) character set ucs2 collate ucs2_vn_ci)
engine=innodb;
ERROR HY000: In InnoDB, charset-collation codes must be below 256. Unsupported code 359.
show warnings;
Level	Code	Message
Error	1005	In InnoDB, charset-collation codes must be below 256. Unsupported code 359.
Error	1005	Can't create table 'test.t1' (errno: 1005)
The following tests check that two-byte collation IDs work
select * from information_schema.collations where id>256 order by id;
COLLATION_NAME	CHARACTER_SET_NAME	ID	IS_DEFAULT	IS_COMPILED	SORTLEN
utf16_test_ci	utf16	327			8
utf8_phone_ci	utf8	352			8
utf8_test_ci	utf8	353			8
ucs2_test_ci	ucs2	358			8
ucs2_vn_ci	ucs2	359			8
utf32_test_ci	utf32	391			8
utf8_maxuserid_ci	utf8	2047			8
show collation like '%test%';
Collation	Charset	Id	Default	Compiled	Sortlen
ucs2_test_ci	ucs2	358			8
utf8_test_ci	utf8	353			8
utf16_test_ci	utf16	327			8
utf32_test_ci	utf32	391			8
show collation like 'ucs2_vn_ci';
Collation	Charset	Id	Default	Compiled	Sortlen
ucs2_vn_ci	ucs2	359			8
create table t1 (c1 char(1) character set ucs2 collate ucs2_vn_ci)
engine=innodb;
ERROR HY000: In InnoDB, charset-collation codes must be below 256. Unsupported code 359.
show warnings;
Level	Code	Message
Error	1005	In InnoDB, charset-collation codes must be below 256. Unsupported code 359.
Error	1005	Can't create table 'test.t1' (errno: 1005)
