1-- source include/have_ucs2.inc
2
3call mtr.add_suppression("'ucs2' can not be used as client character set");
4
5#
6# MySQL Bug#15276: MySQL ignores collation-server
7#
8show variables like 'collation_server';
9
10#
11# Bug#18004 Connecting crashes server when default charset is UCS2
12#
13show variables like "%character_set_ser%";
14--disable_warnings
15DROP TABLE IF EXISTS t1;
16--enable_warnings
17create table t1 (a int);
18drop table t1;
19
20--echo End of 4.1 tests
21
22#
23# Bug #28925 GROUP_CONCAT inserts wrong separators for a ucs2 column
24# Check that GROUP_CONCAT works fine with --default-character-set=ucs2
25#
26create table t1 (a char(1) character set latin1);
27insert into t1 values ('a'),('b'),('c');
28select hex(group_concat(a)) from t1;
29drop table t1;
30#
31# Bug #27643: query failed : 1114 (The table '' is full)
32#
33# Check that HASH indexes ignore trailing spaces when comparing
34# strings with the ucs2_bin collation
35
36CREATE TABLE t1(col1 VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL,
37                col2 VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL,
38                UNIQUE KEY key1 USING HASH (col1, col2)) ENGINE=MEMORY;
39INSERT INTO t1 VALUES('A', 'A'), ('B', 'B'), ('C', 'C');
40--error ER_DUP_ENTRY
41INSERT INTO t1 VALUES('A ', 'A ');
42DROP TABLE t1;
43
44#
45# Bug#32705 - myisam corruption: Key in wrong position
46#             at page 1024 with ucs2_bin
47#
48CREATE TABLE t1 (
49  c1 CHAR(255) CHARACTER SET UCS2 COLLATE UCS2_BIN NOT NULL,
50  KEY(c1)
51  ) ENGINE=MyISAM;
52INSERT INTO t1 VALUES ('marshall\'s');
53INSERT INTO t1 VALUES ('marsh');
54CHECK TABLE t1 EXTENDED;
55DROP TABLE t1;
56
57--echo End of 5.0 tests
58