diff options
Diffstat (limited to 'mysql-test/main/partition_utf8-debug.test')
-rw-r--r-- | mysql-test/main/partition_utf8-debug.test | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/mysql-test/main/partition_utf8-debug.test b/mysql-test/main/partition_utf8-debug.test new file mode 100644 index 00000000..c321c944 --- /dev/null +++ b/mysql-test/main/partition_utf8-debug.test @@ -0,0 +1,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 # |