summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/partition_charset.result
blob: d9e496c475eadc63e916f11fb3c8860e924ad592 (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
drop table if exists t1;
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;
s1
1
3
flush tables;
set names latin1;
select * from t1;
s1
1
3
drop table t1;
create table t1 (a varchar(1), primary key (a))
partition by list (ascii(a))
(partition p1 values in (65));
ERROR HY000: This partition function is not allowed
#
# Start of 10.9 tests
#
#
# MDEV-30805 SIGSEGV in my_convert and UBSAN: member access within null pointer of type 'const struct MY_CHARSET_HANDLER' in my_convert
#
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;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` char(1) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
 PARTITION BY RANGE  COLUMNS(`a`)
(PARTITION `p0` VALUES LESS THAN ('a') ENGINE = MyISAM)
DROP TABLE t1;
#
# MDEV-30681 SIGFPE / UBSAN runtime error: division by zero in String::needs_conversion on ALTER
#
CREATE TABLE t1 (a BINARY (10)) PARTITION BY LIST COLUMNS (a) (PARTITION p VALUES IN (0xFF));
SELECT COLUMN_TYPE, COLLATION_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1';
COLUMN_TYPE	COLLATION_NAME
binary(10)	NULL
ALTER TABLE t1 CHANGE COLUMN a a CHAR(10) BINARY;
SELECT COLUMN_TYPE, COLLATION_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1';
COLUMN_TYPE	COLLATION_NAME
char(10)	latin1_bin
DROP TABLE t1;
#
# End of 10.9 tests
#