summaryrefslogtreecommitdiff
path: root/mysql-test/r/partition_error.result
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@sun.com>2010-03-11 14:00:36 +0100
committerMattias Jonsson <mattias.jonsson@sun.com>2010-03-11 14:00:36 +0100
commitb183e7c5a2fd0f70ed72d78a9b3380da291bbb19 (patch)
tree8590a09a3c6ca29906488b2e35ef75794b82bce0 /mysql-test/r/partition_error.result
parentee4a3099b3ebf0c9b448e4404665bb0a8638dc3f (diff)
downloadmariadb-git-b183e7c5a2fd0f70ed72d78a9b3380da291bbb19.tar.gz
Bug#42954: SQL MODE 'NO_DIR_IN_CREATE' does not work with subpartitions
There was no check for DATA/INDEX DIRECTORY for subpartitions Added the same check as for partitions. mysql-test/r/partition_error.result: Bug#42954: SQL MODE 'NO_DIR_IN_CREATE' does not work with subpartitions Updated results mysql-test/t/partition_error.test: Bug#42954: SQL MODE 'NO_DIR_IN_CREATE' does not work with subpartitions Added tests sql/partition_info.cc: Bug#42954: SQL MODE 'NO_DIR_IN_CREATE' does not work with subpartitions moved the check for DATA/INDEX DIRECTORY into a function and used it for both partitions as well as subpartitions. (Was not checked at all for subpartitions before)
Diffstat (limited to 'mysql-test/r/partition_error.result')
-rw-r--r--mysql-test/r/partition_error.result70
1 files changed, 70 insertions, 0 deletions
diff --git a/mysql-test/r/partition_error.result b/mysql-test/r/partition_error.result
index b692203823d..c03d5e16a48 100644
--- a/mysql-test/r/partition_error.result
+++ b/mysql-test/r/partition_error.result
@@ -1,4 +1,74 @@
drop table if exists t1;
+#
+# Bug#42954: SQL MODE 'NO_DIR_IN_CREATE' does not work with
+# subpartitions
+SET @org_mode=@@sql_mode;
+SET @@sql_mode='NO_DIR_IN_CREATE';
+SELECT @@sql_mode;
+@@sql_mode
+NO_DIR_IN_CREATE
+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');
+Warnings:
+Warning 1618 <DATA DIRECTORY> option ignored
+Warning 1618 <INDEX DIRECTORY> option ignored
+Warning 1618 <DATA DIRECTORY> option ignored
+Warning 1618 <INDEX DIRECTORY> option ignored
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `id` int(11) DEFAULT NULL,
+ `purchased` date DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (YEAR(purchased))
+SUBPARTITION BY HASH (TO_DAYS(purchased))
+(PARTITION p0 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
+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));
+Warnings:
+Warning 1618 <DATA DIRECTORY> option ignored
+Warning 1618 <INDEX DIRECTORY> option ignored
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `id` int(11) DEFAULT NULL,
+ `purchased` date DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (YEAR(purchased))
+SUBPARTITION BY HASH (TO_DAYS(purchased))
+(PARTITION p0 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION sp0 ENGINE = MyISAM,
+ SUBPARTITION sp1 ENGINE = MyISAM)) */
+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');
+Warnings:
+Warning 1618 <DATA DIRECTORY> option ignored
+Warning 1618 <INDEX DIRECTORY> option ignored
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `id` int(11) DEFAULT NULL,
+ `purchased` date DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (YEAR(purchased))
+(PARTITION p0 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
+DROP TABLE t1;
+SET @@sql_mode= @org_mode;
CREATE TABLE t1 (a INTEGER NOT NULL, PRIMARY KEY (a));
INSERT INTO t1 VALUES (1),(1);
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'