summaryrefslogtreecommitdiff
path: root/mysql-test/t/partition_error.test
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@sun.com>2010-05-25 17:26:48 +0200
committerMattias Jonsson <mattias.jonsson@sun.com>2010-05-25 17:26:48 +0200
commite596ae0795f89c316106808b744cfbe749940b74 (patch)
treefb01d3d95d876af5d2f15e600cf36bc3eaf735df /mysql-test/t/partition_error.test
parent6ed71b7d1ed00fb3d433b4cab2ba1fdf22426642 (diff)
parent90c200a216506ed5309d2bc4a20385875eb7d1a8 (diff)
downloadmariadb-git-e596ae0795f89c316106808b744cfbe749940b74.tar.gz
merge
Diffstat (limited to 'mysql-test/t/partition_error.test')
-rw-r--r--mysql-test/t/partition_error.test35
1 files changed, 34 insertions, 1 deletions
diff --git a/mysql-test/t/partition_error.test b/mysql-test/t/partition_error.test
index bfa1206fe2d..d1b152c8799 100644
--- a/mysql-test/t/partition_error.test
+++ b/mysql-test/t/partition_error.test
@@ -7,7 +7,40 @@
--disable_warnings
drop table if exists t1;
--enable_warnings
-
+
+--echo #
+--echo # Bug#42954: SQL MODE 'NO_DIR_IN_CREATE' does not work with
+--echo # subpartitions
+SET @org_mode=@@sql_mode;
+SET @@sql_mode='NO_DIR_IN_CREATE';
+SELECT @@sql_mode;
+CREATE TABLE t1 (id INT, purchased DATE)
+PARTITION BY RANGE(YEAR(purchased))
+SUBPARTITION BY HASH(TO_DAYS(purchased))
+(PARTITION p0 VALUES LESS THAN MAXVALUE
+ DATA DIRECTORY = '/tmp/not-existing'
+ INDEX DIRECTORY = '/tmp/not-existing');
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+CREATE TABLE t1 (id INT, purchased DATE)
+PARTITION BY RANGE(YEAR(purchased))
+SUBPARTITION BY HASH(TO_DAYS(purchased)) SUBPARTITIONS 2
+(PARTITION p0 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION sp0
+ DATA DIRECTORY = '/tmp/not-existing'
+ INDEX DIRECTORY = '/tmp/not-existing',
+ SUBPARTITION sp1));
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+CREATE TABLE t1 (id INT, purchased DATE)
+PARTITION BY RANGE(YEAR(purchased))
+(PARTITION p0 VALUES LESS THAN MAXVALUE
+ DATA DIRECTORY = '/tmp/not-existing'
+ INDEX DIRECTORY = '/tmp/not-existing');
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+SET @@sql_mode= @org_mode;
+
--echo #
--echo # Bug#50392: insert_id is not reset for partitioned tables
--echo # auto_increment on duplicate entry