summaryrefslogtreecommitdiff
path: root/mysql-test/main/ctype_ucs2_def.test
blob: e297fa5ccf10b85eaf1112d53705dac919933a07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
-- source include/have_ucs2.inc

call mtr.add_suppression("'ucs2' can not be used as client character set");

#
# MySQL Bug#15276: MySQL ignores collation-server
#
show variables like 'collation_server';

#
# Bug#18004 Connecting crashes server when default charset is UCS2
#
show variables like "%character_set_ser%";
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
create table t1 (a int);
drop table t1;

--echo End of 4.1 tests

#
# Bug #28925 GROUP_CONCAT inserts wrong separators for a ucs2 column
# Check that GROUP_CONCAT works fine with --default-character-set=ucs2
#
create table t1 (a char(1) character set latin1);
insert into t1 values ('a'),('b'),('c');
select hex(group_concat(a)) from t1;
drop table t1;
#
# Bug #27643: query failed : 1114 (The table '' is full)
#
# Check that HASH indexes ignore trailing spaces when comparing 
# strings with the ucs2_bin collation

CREATE TABLE t1(col1 VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL, 
                col2 VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL, 
                UNIQUE KEY key1 USING HASH (col1, col2)) ENGINE=MEMORY;
INSERT INTO t1 VALUES('A', 'A'), ('B', 'B'), ('C', 'C');
--error ER_DUP_ENTRY
INSERT INTO t1 VALUES('A ', 'A ');
DROP TABLE t1;

#
# Bug#32705 - myisam corruption: Key in wrong position
#             at page 1024 with ucs2_bin
#
CREATE TABLE t1 (
  c1 CHAR(255) CHARACTER SET UCS2 COLLATE UCS2_BIN NOT NULL,
  KEY(c1)
  ) ENGINE=MyISAM;
INSERT INTO t1 VALUES ('marshall\'s');
INSERT INTO t1 VALUES ('marsh');
CHECK TABLE t1 EXTENDED;
DROP TABLE t1;

--echo End of 5.0 tests