summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/partition_not_windows.result
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/partition_not_windows.result
parentInitial commit. (diff)
downloadmariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz
mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/partition_not_windows.result')
-rw-r--r--mysql-test/main/partition_not_windows.result97
1 files changed, 97 insertions, 0 deletions
diff --git a/mysql-test/main/partition_not_windows.result b/mysql-test/main/partition_not_windows.result
new file mode 100644
index 00000000..1d18ebfb
--- /dev/null
+++ b/mysql-test/main/partition_not_windows.result
@@ -0,0 +1,97 @@
+create table t1 (a int) engine myisam
+partition by range (a)
+subpartition by hash (a)
+(partition p0 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp'
+(SUBPARTITION subpart00, SUBPARTITION subpart01));
+# Checking if file exists before alter
+ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
+(partition p1 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp'
+(SUBPARTITION subpart10, SUBPARTITION subpart11),
+partition p2 VALUES LESS THAN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp'
+(SUBPARTITION subpart20, SUBPARTITION subpart21));
+# Checking if file exists after alter
+drop table t1;
+set @org_mode=@@sql_mode;
+set @@sql_mode='NO_DIR_IN_CREATE';
+select @@sql_mode;
+@@sql_mode
+NO_DIR_IN_CREATE
+create table t1 (i int )
+partition by range (i)
+(
+partition p01 values less than (1000)
+data directory='/not/existing'
+ index directory='/not/existing'
+);
+Warnings:
+Warning 1618 <DATA DIRECTORY> option ignored
+Warning 1618 <INDEX DIRECTORY> option ignored
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `i` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`i`)
+(PARTITION `p01` VALUES LESS THAN (1000) ENGINE = MyISAM)
+DROP TABLE t1, t2;
+set @@sql_mode=@org_mode;
+CREATE TABLE t1(a INT)
+PARTITION BY KEY (a)
+(PARTITION p0 DATA DIRECTORY 'MYSQLD_DATADIR/test');
+ERROR HY000: Incorrect arguments to DATA DIRECTORY
+CREATE TABLE t1(a INT)
+PARTITION BY KEY (a)
+(PARTITION p0 INDEX DIRECTORY 'MYSQLD_DATADIR/test');
+ERROR HY000: Incorrect arguments to INDEX DIRECTORY
+CREATE TABLE ts (id INT, purchased DATE)
+PARTITION BY RANGE(YEAR(purchased))
+SUBPARTITION BY HASH(TO_DAYS(purchased)) (
+PARTITION p0 VALUES LESS THAN (1990) (
+SUBPARTITION s0a
+DATA DIRECTORY = 'MYSQLD_DATADIR/test',
+SUBPARTITION s0b
+DATA DIRECTORY = 'MYSQLD_DATADIR/test'
+));
+ERROR HY000: Incorrect arguments to DATA DIRECTORY
+CREATE TABLE ts (id INT, purchased DATE)
+PARTITION BY RANGE(YEAR(purchased))
+SUBPARTITION BY HASH(TO_DAYS(purchased)) (
+PARTITION p0 VALUES LESS THAN (1990) (
+SUBPARTITION s0a
+INDEX DIRECTORY = 'MYSQLD_DATADIR/test',
+SUBPARTITION s0b
+INDEX DIRECTORY = 'MYSQLD_DATADIR/test'
+));
+ERROR HY000: Incorrect arguments to INDEX DIRECTORY
+DROP TABLE IF EXISTS `example`;
+CREATE TABLE `example` (
+`ID_EXAMPLE` int(10) unsigned NOT NULL AUTO_INCREMENT,
+`DESCRIPTION` varchar(30) NOT NULL,
+`LEVEL` smallint(5) unsigned DEFAULT NULL,
+PRIMARY KEY (`ID_EXAMPLE`)
+) ENGINE = MYISAM
+PARTITION BY HASH(ID_EXAMPLE)(
+PARTITION p0 DATA DIRECTORY = 'MYSQLTEST_VARDIR/p0Data'
+INDEX DIRECTORY = 'MYSQLTEST_VARDIR/p0Index',
+PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/p1Data'
+INDEX DIRECTORY = 'MYSQLTEST_VARDIR/p1Index',
+PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/p2Data'
+INDEX DIRECTORY = 'MYSQLTEST_VARDIR/p2Index',
+PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/p3Data'
+INDEX DIRECTORY = 'MYSQLTEST_VARDIR/p3Index'
+);
+# Checking that MyISAM .MYD and .MYI are in test db and data/idx dir
+DROP TABLE example;
+CREATE TABLE `example` (
+`ID_EXAMPLE` int(10) unsigned NOT NULL AUTO_INCREMENT,
+`DESCRIPTION` varchar(30) NOT NULL,
+`LEVEL` smallint(5) unsigned DEFAULT NULL,
+PRIMARY KEY (`ID_EXAMPLE`)
+) ENGINE = MYISAM
+PARTITION BY HASH(ID_EXAMPLE)(
+PARTITION p0 DATA DIRECTORY = '/not/existent/p0Data',
+PARTITION p1 DATA DIRECTORY = '/not/existent/p1Data',
+PARTITION p2 DATA DIRECTORY = '/not/existent/p2Data',
+PARTITION p3 DATA DIRECTORY = '/not/existent/p3Data'
+);
+ERROR HY000: Can't create/write to file '/not/existent/p0Data/example#P#p0.MYD' (Errcode: 2 "No such file or directory")