summaryrefslogtreecommitdiff
path: root/mysql-test/main/partition_charset.test
blob: b8a17ce4fcaa1ff0b12f5dff5ec0bcddd4a85b1b (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
#
# Test for character set related things in combination
# with the partition storage engine
# 
-- source include/have_partition.inc

--disable_warnings
drop table if exists t1;
--enable_warnings

set names utf8;
create table t1 (s1 int)
  partition by list (s1)
    (partition c values in (1),
     partition Ç values in (3));
insert into t1 values (1),(3);
select * from t1;
flush tables;
set names latin1;
select * from t1;
drop table t1;

-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
create table t1 (a varchar(1), primary key (a))
partition by list (ascii(a))
(partition p1 values in (65));
#insert into t1 values ('A');
#replace into t1 values ('A');
#drop table t1;

--echo #
--echo # Start of 10.9 tests
--echo #

--echo #
--echo # MDEV-30805 SIGSEGV in my_convert and UBSAN: member access within null pointer of type 'const struct MY_CHARSET_HANDLER' in my_convert
--echo #

CREATE TABLE t1 (a CHAR CHARACTER SET ucs2)
  PARTITION BY RANGE COLUMNS (a)
  (PARTITION p0 VALUES LESS THAN ('a'));
ALTER TABLE t1 CHANGE COLUMN a a CHAR BINARY;
SHOW CREATE TABLE t1;
DROP TABLE t1;

--echo #
--echo # End of 10.9 tests
--echo #