summaryrefslogtreecommitdiff
path: root/mysql-test/t/partition.test
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@sun.com>2010-05-25 17:41:11 +0200
committerMattias Jonsson <mattias.jonsson@sun.com>2010-05-25 17:41:11 +0200
commit8db43e66acbc065ee0b63902d31ede42d9afc8e0 (patch)
tree3ee70f23075cab044c169c9472ebe1944f341f15 /mysql-test/t/partition.test
parent2abf030a127556560e1c206132a62ae514123c83 (diff)
parentd347714d939c574520fcb73cef57f331b02fbe53 (diff)
downloadmariadb-git-8db43e66acbc065ee0b63902d31ede42d9afc8e0.tar.gz
merge
Diffstat (limited to 'mysql-test/t/partition.test')
-rw-r--r--mysql-test/t/partition.test22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test
index 4b7be00148f..bcb5d4b5d92 100644
--- a/mysql-test/t/partition.test
+++ b/mysql-test/t/partition.test
@@ -14,6 +14,28 @@
drop table if exists t1, t2;
--enable_warnings
+--echo # Bug#39338: Fieldnames in
+--echo # INFORMATIONSCHEMA.PARTITIONS.PARTITION_EXPRESSION become unescaped
+--echo # NOTE: the partition expression is saved as a string, so changing from
+--echo # normal quotes to ansi quotes does not change the expression, only
+--echo # for partition by KEY.
+CREATE TABLE t1 (
+ ID int(11) NOT NULL,
+ `aaaa,aaaaa` tinyint(3) UNSIGNED NOT NULL DEFAULT '0',
+ ddddddddd int(11) NOT NULL DEFAULT '0',
+ new_field0 varchar(50),
+ PRIMARY KEY(ID, `aaaa,aaaaa`, ddddddddd))
+PARTITION BY RANGE(ID)
+PARTITIONS 3
+SUBPARTITION BY LINEAR KEY(ID,`aaaa,aaaaa`)
+SUBPARTITIONS 2 (
+ PARTITION p01 VALUES LESS THAN(100),
+ PARTITION p11 VALUES LESS THAN(200),
+ PARTITION p21 VALUES LESS THAN MAXVALUE);
+SELECT PARTITION_EXPRESSION, SUBPARTITION_EXPRESSION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
+show create table t1;
+drop table t1;
+
#
# Bug#48276: can't add column if subpartition exists
CREATE TABLE t1 (a INT, b INT)