summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@sun.com>2009-02-18 20:05:39 +0100
committerMattias Jonsson <mattias.jonsson@sun.com>2009-02-18 20:05:39 +0100
commit1d8c5065b2394079238d19cc28e382691c88e175 (patch)
tree26e19bbea9d5545c0f595d37f47ebad75141e49c /mysql-test/t
parentc9245922d6dc5a7dedca24c160c0ae791d55aa69 (diff)
downloadmariadb-git-1d8c5065b2394079238d19cc28e382691c88e175.tar.gz
Bug#39338: Fieldnames in INFORMATIONSCHEMA.PARTITIONS.PARTITION_EXPRESSION
become unescaped Problem was only with the print out of the KEY partitioning list of fields, it did not include quotes, even if it was needed. Fixed by always add quotes if needed.
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/partition.test23
1 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test
index 6a12e4a4d12..aaf2ee7d4bd 100644
--- a/mysql-test/t/partition.test
+++ b/mysql-test/t/partition.test
@@ -15,6 +15,29 @@ drop table if exists t1, t2;
--enable_warnings
#
+# Bug#39338: Fieldnames in INFORMATIONSCHEMA.PARTITIONS.PARTITION_EXPRESSION
+# become unescaped
+# NOTE: the partition expression is saved as a string, so changing from
+# normal quotes to ansi quotes does not change the expression, only
+# 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#40954: Crash if range search and order by.
#
CREATE TABLE t1 (