summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/partition_utf8-debug.test
blob: c321c944676760fbb066354ff6680aefdc99f72a (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
--source include/have_partition.inc
--source include/have_debug_sync.inc

--echo #
--echo # Start of 10.5 tests
--echo #

--echo #
--echo # MDEV-20856 Bad values in metadata views for partitions on VARBINARY
--echo #

SET NAMES utf8;
SET @save_dbug = @@debug_dbug;
SET SESSION debug_dbug="+d,generate_partition_syntax_for_frm";


--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
CREATE OR REPLACE TABLE t1 (a VARCHAR(10)) CHARACTER SET latin1
  PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (_utf8'Ṡ'));

--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
CREATE OR REPLACE TABLE t1 (a VARCHAR(10)) CHARACTER SET latin1
  PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN ('Ṡ'));

CREATE OR REPLACE TABLE t1 (a VARCHAR(10)) CHARACTER SET latin1
  PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (_latin1 0xDF));
SELECT PARTITION_DESCRIPTION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
DROP TABLE t1;

CREATE OR REPLACE TABLE t1 (a VARCHAR(10)) CHARACTER SET latin1
  PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (_utf8'ß'));
SELECT PARTITION_DESCRIPTION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
DROP TABLE t1;

CREATE OR REPLACE TABLE t1 (a VARCHAR(10)) CHARACTER SET latin1
  PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN ('ß'));
DROP TABLE t1;

CREATE OR REPLACE TABLE t1 (a VARCHAR(10)) CHARACTER SET utf8
  PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (_utf8'ß'));
SELECT PARTITION_DESCRIPTION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
DROP TABLE t1;

CREATE OR REPLACE TABLE t1 (a VARCHAR(10)) CHARACTER SET utf8
  PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN ('ß'));
SELECT PARTITION_DESCRIPTION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
DROP TABLE t1;


CREATE OR REPLACE TABLE t1 (a VARBINARY(10)) CHARACTER SET utf8
  PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (0xFF));
SELECT PARTITION_DESCRIPTION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
DROP TABLE t1;


CREATE OR REPLACE TABLE t1 (a DATE) CHARACTER SET utf8
  PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (FROM_DAYS(NULL)));
SELECT PARTITION_DESCRIPTION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
DROP TABLE t1;

CREATE OR REPLACE TABLE t1 (a DATE) CHARACTER SET utf8
  PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (FROM_DAYS(100)));
SELECT PARTITION_DESCRIPTION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
DROP TABLE t1;


SET debug_dbug=@save_dbug;

--echo #
--echo # End of 10.5 tests
--echo #