summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorunknown <mattiasj@witty.>2008-01-04 12:06:20 +0100
committerunknown <mattiasj@witty.>2008-01-04 12:06:20 +0100
commitfa01e8845b6b75c0d5f1f564ff5705a2c3735468 (patch)
treedad0aaa9db2d58c8456adf51fde3754234319ea0 /mysql-test/t
parent51cb4ffcc1eb43aad9581c3f846f63b214f179ea (diff)
downloadmariadb-git-fa01e8845b6b75c0d5f1f564ff5705a2c3735468.tar.gz
Bug#30459 Partitioning across disks failing on Windows
Problem was that there are no support for symlinked files on Windows for mysqld. So we fail when trying to create them. Solution: Ignore the DATA/INDEX DIRECTORY clause for partitions and push a warning. (Just like a MyISAM table) mysql-test/r/partition.result: Bug#30459 Partitioning across disks failing on Windows Moved symlink specific tests to partition_symlink result file mysql-test/r/partition_symlink.result: Bug#30459 Partitioning across disks failing on Windows Moved symlink specific tests from partition.test result file mysql-test/r/partition_windows.result: Bug#30459 Partitioning across disks failing on Windows result file mysql-test/t/partition.test: Bug#30459 Partitioning across disks failing on Windows Moved symlink specific tests to partition_symlink test file mysql-test/t/partition_symlink.test: Bug#30459 Partitioning across disks failing on Windows Moved symlink specific tests from partition.test test file mysql-test/t/partition_windows.test: Bug#30459 Partitioning across disks failing on Windows test file
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/partition.test47
-rw-r--r--mysql-test/t/partition_symlink.test50
-rw-r--r--mysql-test/t/partition_windows.test37
3 files changed, 73 insertions, 61 deletions
diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test
index 23d6c5f8865..183b348d473 100644
--- a/mysql-test/t/partition.test
+++ b/mysql-test/t/partition.test
@@ -79,24 +79,6 @@ partition by key(a)
partitions 1e+300;
#
-# Bug 21350: Data Directory problems
-#
--- error ER_WRONG_TABLE_NAME
-create table t1 (a int)
-partition by key (a)
-(partition p0 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data');
-
-#
-# Insert a test that manages to create the first partition and fails with
-# the second, ensure that we clean up afterwards in a proper manner.
-#
---error ER_WRONG_TABLE_NAME
-create table t1 (a int)
-partition by key (a)
-(partition p0,
- partition p1 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data');
-
-#
# Bug 19309 Partitions: Crash if double procedural alter
#
create table t1 (a int)
@@ -1399,35 +1381,6 @@ SELECT t2.id FROM t2 WHERE t2.id IN (SELECT id FROM t1 WHERE status = 'Verified'
drop table t1, t2;
#
-# Bug #24633 SQL MODE "NO_DIR_IN_CREATE" does not work with partitioned tables
-#
-
-disable_query_log;
-eval create table t2 (i int )
-partition by range (i)
-(
- partition p01 values less than (1000)
- data directory="$MYSQLTEST_VARDIR/master-data/test/"
- index directory="$MYSQLTEST_VARDIR/master-data/test/"
-);
-enable_query_log;
-
-set @org_mode=@@sql_mode;
-set @@sql_mode='NO_DIR_IN_CREATE';
-select @@sql_mode;
-create table t1 (i int )
-partition by range (i)
-(
- partition p01 values less than (1000)
- data directory='/not/existing'
- index directory='/not/existing'
-);
-
-show create table t2;
-DROP TABLE t1, t2;
-set @@sql_mode=@org_mode;
-
-#
# Bug #27123 partition + on duplicate key update + varchar = Can't find record in <table>
#
create table t1 (c1 varchar(255),c2 tinyint,primary key(c1))
diff --git a/mysql-test/t/partition_symlink.test b/mysql-test/t/partition_symlink.test
index ab779ec2b68..ec809a34090 100644
--- a/mysql-test/t/partition_symlink.test
+++ b/mysql-test/t/partition_symlink.test
@@ -2,7 +2,9 @@
# (DATA/INDEX DIR requires symlinks)
-- source include/have_partition.inc
-- source include/have_symlink.inc
-# remove the not_windows line after fixing bug#30459
+# remove the not_windows line after fixing bug#33687
+# symlinks must also work for files, not only directories
+# as in --skip-symbolic-links
-- source include/not_windows.inc
-- disable_warnings
DROP TABLE IF EXISTS t1;
@@ -118,4 +120,50 @@ connection default;
DROP USER mysqltest_1@localhost;
disconnect con1;
+#
+# Bug #24633 SQL MODE "NO_DIR_IN_CREATE" does not work with partitioned tables
+#
+
+disable_query_log;
+eval create table t2 (i int )
+partition by range (i)
+(
+ partition p01 values less than (1000)
+ data directory="$MYSQLTEST_VARDIR/master-data/test/"
+ index directory="$MYSQLTEST_VARDIR/master-data/test/"
+);
+enable_query_log;
+
+set @org_mode=@@sql_mode;
+set @@sql_mode='NO_DIR_IN_CREATE';
+select @@sql_mode;
+create table t1 (i int )
+partition by range (i)
+(
+ partition p01 values less than (1000)
+ data directory='/not/existing'
+ index directory='/not/existing'
+);
+
+show create table t2;
+DROP TABLE t1, t2;
+set @@sql_mode=@org_mode;
+
+#
+# Bug 21350: Data Directory problems
+#
+-- error ER_WRONG_TABLE_NAME
+create table t1 (a int)
+partition by key (a)
+(partition p0 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data');
+
+#
+# Insert a test that manages to create the first partition and fails with
+# the second, ensure that we clean up afterwards in a proper manner.
+#
+--error ER_WRONG_TABLE_NAME
+create table t1 (a int)
+partition by key (a)
+(partition p0,
+ partition p1 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data');
diff --git a/mysql-test/t/partition_windows.test b/mysql-test/t/partition_windows.test
index a0723feac44..d42a7383c99 100644
--- a/mysql-test/t/partition_windows.test
+++ b/mysql-test/t/partition_windows.test
@@ -7,23 +7,34 @@
#
# Bug 25141: Crash Server on Partitioning command
#
+# Bug#30459: Partitioning across disks failing on Windows
+# updated this test, since symlinked files are not supported on Windows
+# (not the same as symlinked directories that have a special hack
+# on windows). This test is not dependent on have_symlink.
--disable_warnings
-DROP TABLE IF EXISTS `example`;
+DROP TABLE IF EXISTS t1;
--enable_warnings
---disable_abort_on_error
-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`)
+CREATE TABLE t1 (
+ c1 int(10) unsigned NOT NULL AUTO_INCREMENT,
+ c2 varchar(30) NOT NULL,
+ c3 smallint(5) unsigned DEFAULT NULL,
+ PRIMARY KEY (c1)
) ENGINE = MYISAM
-PARTITION BY HASH(ID_EXAMPLE)(
-PARTITION p0 DATA DIRECTORY = 'C:/build/5.1/data/partitiontest/p0Data',
-PARTITION p1 DATA DIRECTORY = 'C:/build/5.1/data/partitiontest/p1Data',
-PARTITION p2 DATA DIRECTORY = 'C:/build/5.1/data/partitiontest/p2Data',
-PARTITION p3 DATA DIRECTORY = 'C:/build/5.1/data/partitiontest/p3Data'
+PARTITION BY HASH(c1)(
+ PARTITION p0
+ DATA DIRECTORY = 'C:/mysqltest/p0Data'
+ INDEX DIRECTORY = 'D:/mysqltest/p0Index',
+ PARTITION p1,
+ PARTITION p2
+ DATA DIRECTORY = 'E:/mysqltest/p2Data'
+ INDEX DIRECTORY = 'F:/mysqltest/p2Index'
);
---enable_abort_on_error
+INSERT INTO t1 VALUES (NULL, "first", 1);
+INSERT INTO t1 VALUES (NULL, "second", 2);
+INSERT INTO t1 VALUES (NULL, "third", 3);
+ALTER TABLE t1 ADD PARTITION (PARTITION p3 DATA DIRECTORY = 'G:/mysqltest/p3Data' INDEX DIRECTORY = 'H:/mysqltest/p3Index');
+INSERT INTO t1 VALUES (NULL, "last", 4);
+DROP TABLE t1;