summaryrefslogtreecommitdiff
path: root/mysql-test/suite/parts/inc
diff options
context:
space:
mode:
authorunknown <mattiasj@witty.>2008-03-17 16:18:02 +0100
committerunknown <mattiasj@witty.>2008-03-17 16:18:02 +0100
commit7a22a8a965dbfb3e406f9c9d3ff6427c3ac18084 (patch)
tree7b9d1f2e9b66e950687cc42c41a8e2f9eb174536 /mysql-test/suite/parts/inc
parent166357b552fe777bc509ffcaeafeeeb5f0e3deed (diff)
downloadmariadb-git-7a22a8a965dbfb3e406f9c9d3ff6427c3ac18084.tar.gz
Bug#35306: partition_basic_symlink test failures
Have changed the DATA/INDEX dir to not be a database dir. (and made some changes for better result files.) mysql-test/suite/parts/inc/partition_basic_symlink.inc: Bug#35306: partition_basic_symlink test failures after bug 32167 it is not allowed with DATA/INDEX DIR in any database directory. remade the inc-files to make better use of each other (less duplicate tests) mysql-test/suite/parts/inc/partition_directory.inc: Removed disable/enable_query_log for better result files mysql-test/suite/parts/inc/partition_layout_check1.inc: changed DATA/INDEX DIR mysql-test/suite/parts/inc/partition_layout_check2.inc: added check with_directories mysql-test/suite/parts/inc/partition_methods1.inc: Removed disable/enable_query_log for better result files mysql-test/suite/parts/inc/partition_methods2.inc: Removed disable/enable_query_log for better result files Added with_directories for testing of DATA/INDEX DIR mysql-test/suite/parts/r/partition_basic_innodb.result: Updated test result due to test case changes mysql-test/suite/parts/r/partition_basic_myisam.result: Updated test result due to test case changes mysql-test/suite/parts/r/partition_basic_symlink_innodb.result: Updated test result due to test case changes mysql-test/suite/parts/r/partition_basic_symlink_myisam.result: Updated test result due to test case changes mysql-test/suite/parts/t/disabled.def: Bug#35306: parts.partition_basic_symlink test failures Enable the test again since the have been fixed mysql-test/suite/parts/t/partition_basic_innodb.test: Added check for table files. mysql-test/suite/parts/t/partition_basic_myisam.test: removing dependency of symlink (test exists now in parts.partition_basic_symlink_myisam) mysql-test/suite/parts/t/partition_basic_symlink_innodb.test: Bug#35306: partition_basic_symlink test failures Removed old test (since DATA/INDEX DIRECTORY is not supported in InnoDB) and replaced it with a simple test that altering a partitioned innodb with DATA/INDEX DIR to MyISAM, would use the DATA/INDEX DIR.
Diffstat (limited to 'mysql-test/suite/parts/inc')
-rw-r--r--mysql-test/suite/parts/inc/partition_basic_symlink.inc159
-rw-r--r--mysql-test/suite/parts/inc/partition_directory.inc71
-rw-r--r--mysql-test/suite/parts/inc/partition_layout_check1.inc3
-rw-r--r--mysql-test/suite/parts/inc/partition_layout_check2.inc5
-rw-r--r--mysql-test/suite/parts/inc/partition_methods1.inc164
-rw-r--r--mysql-test/suite/parts/inc/partition_methods2.inc199
6 files changed, 339 insertions, 262 deletions
diff --git a/mysql-test/suite/parts/inc/partition_basic_symlink.inc b/mysql-test/suite/parts/inc/partition_basic_symlink.inc
index 22a61477388..94d48fcaf15 100644
--- a/mysql-test/suite/parts/inc/partition_basic_symlink.inc
+++ b/mysql-test/suite/parts/inc/partition_basic_symlink.inc
@@ -16,144 +16,29 @@
--enable_abort_on_error
--echo
---echo #========================================================================
---echo # Check partitioning methods on just created tables
---echo # The tables should be defined without/with PRIMARY KEY and
---echo # UNIQUE INDEXes.
---echo # Every test round has to check
---echo # PARTITION BY HASH/KEY/LIST/RANGE
---echo # PARTITION BY RANGE/LIST ... SUBPARTITION BY HASH/KEY ...
---echo #========================================================================
---echo #------------------------------------------------------------------------
---echo # 1 Tables without PRIMARY KEY or UNIQUE INDEXes
---echo #------------------------------------------------------------------------
---echo # 1.1 The partitioning function contains one column.
-let $unique= ;
---source suite/parts/inc/partition_methods1.inc
-#
- --echo # 1.1.1 with DATA DIECTORY/INDEX DIRECTORY
- #
- --disable_query_log
- # DATA DIRECTORY
- # Make directory for partition data
- --exec mkdir $MYSQLTEST_VARDIR/master-data/test/data || true
- eval SET @data_dir = 'DATA DIRECTORY =
- ''''$MYSQLTEST_VARDIR/master-data/test/data''''';
- let $data_directory = `select @data_dir`;
-
- #INDEX DIRECTORY
- # Make directory for partition index
- --exec mkdir $MYSQLTEST_VARDIR/master-data/test/index || true
- eval SET @indx_dir = 'INDEX DIRECTORY =
- ''''$MYSQLTEST_VARDIR/master-data/test/index''''';
- let $index_directory = `select @indx_dir`;
-
- let $with_directories= 1;
- --source suite/parts/inc/partition_methods1.inc
- --source suite/parts/inc/partition_directory.inc
- let $with_directories= 0;
- --enable_query_log
- #
---echo # 1.2 The partitioning function contains two columns.
let $unique= ;
---source suite/parts/inc/partition_methods2.inc
-#
---echo #------------------------------------------------------------------------
---echo # 2 Tables with PRIMARY KEY and/or UNIQUE INDEXes
---echo # The partitioning function contains one column.
---echo #------------------------------------------------------------------------
-if ($more_pk_ui_tests)
-{
- if ($do_pk_tests)
- {
- --echo # 2.1 PRIMARY KEY consisting of one column
- let $unique= , PRIMARY KEY(f_int1);
- --source suite/parts/inc/partition_methods1.inc
- }
- --echo # 2.2 UNIQUE INDEX consisting of one column
- let $unique= , UNIQUE INDEX uidx1 (f_int1);
- --source suite/parts/inc/partition_methods1.inc
-
- --echo # 2.2.1 with DATA DIECTORY/INDEX DIRECTORY
- #
- --disable_query_log
- # DATA DIRECTORY
- # Make directory for partition data
- --exec mkdir $MYSQLTEST_VARDIR/master-data/test/data || true
- eval SET @data_dir = 'DATA DIRECTORY =
- ''''$MYSQLTEST_VARDIR/master-data/test/data''''';
- let $data_directory = `select @data_dir`;
- #INDEX DIRECTORY
- # Make directory for partition index
- --exec mkdir $MYSQLTEST_VARDIR/master-data/test/index || true
- eval SET @indx_dir = 'INDEX DIRECTORY =
- ''''$MYSQLTEST_VARDIR/master-data/test/index''''';
- let $index_directory = `select @indx_dir`;
+# DATA DIRECTORY
+# Make directory for partition data
+let $data_dir_path= $MYSQLTEST_VARDIR/mysql-test-data-dir;
+--mkdir $data_dir_path
+let $data_directory= DATA DIRECTORY = '$data_dir_path';
- let $with_directories= TRUE;
- --source suite/parts/inc/partition_methods1.inc
- let $with_directories= FALSE;
- --enable_query_log
- #
- if ($do_pk_tests)
- {
- --echo # 2.3 PRIMARY KEY consisting of two columns
- let $unique= , PRIMARY KEY(f_int1,f_int2);
- --source suite/parts/inc/partition_methods1.inc
- let $unique= , PRIMARY KEY(f_int2,f_int1);
- --source suite/parts/inc/partition_methods1.inc
- }
- #
- --echo # 2.4 UNIQUE INDEX consisting of two columns
- let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2);
- --source suite/parts/inc/partition_methods1.inc
- let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1);
- --source suite/parts/inc/partition_methods1.inc
- #
-}
---echo # 2.5 PRIMARY KEY + UNIQUE INDEX consisting of two columns
-if ($do_pk_tests)
-{
- let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1);
- --source suite/parts/inc/partition_methods1.inc
- let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2);
- --source suite/parts/inc/partition_methods1.inc
-}
-let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1);
---source suite/parts/inc/partition_methods1.inc
+#INDEX DIRECTORY
+# Make directory for partition index
+let $idx_dir_path= $MYSQLTEST_VARDIR/mysql-test-idx-dir;
+--mkdir $idx_dir_path
+let $index_directory= INDEX DIRECTORY = '$idx_dir_path';
---echo #------------------------------------------------------------------------
---echo # 3 Tables with PRIMARY KEY and/or UNIQUE INDEXes
---echo # The partitioning function contains two columns.
---echo #------------------------------------------------------------------------
-#
-if ($more_pk_ui_tests)
-{
- if ($do_pk_tests)
- {
- --echo # 3.1 PRIMARY KEY consisting of two columns
- let $unique= , PRIMARY KEY(f_int1,f_int2);
- --source suite/parts/inc/partition_methods2.inc
-
- let $unique= , PRIMARY KEY(f_int2,f_int1);
- --source suite/parts/inc/partition_methods2.inc
- }
- #
- --echo # 3.2 UNIQUE INDEX consisting of two columns
- let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2);
- --source suite/parts/inc/partition_methods2.inc
- let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1);
- --source suite/parts/inc/partition_methods2.inc
-}
-#
---echo # 3.3 PRIMARY KEY and UNIQUE INDEX consisting of two columns
-if ($do_pk_tests)
-{
- let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1);
- --source suite/parts/inc/partition_methods2.inc
- let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2);
- --source suite/parts/inc/partition_methods2.inc
-}
-let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1);
---source suite/parts/inc/partition_methods2.inc
+let $with_directories= 1;
+--echo #========================================================================
+--echo # 0.5 use partition_basic with DATA/INDEX DIRECTORY
+--echo #========================================================================
+--source suite/parts/inc/partition_basic.inc
+--echo #========================================================================
+--echo # 5 use partition_directory with DATA/INDEX DIRECTORY
+--echo #========================================================================
+--source suite/parts/inc/partition_directory.inc
+--rmdir $data_dir_path
+--rmdir $idx_dir_path
+let $with_directories= 0;
diff --git a/mysql-test/suite/parts/inc/partition_directory.inc b/mysql-test/suite/parts/inc/partition_directory.inc
index 5acdf13a8f9..f63a1952594 100644
--- a/mysql-test/suite/parts/inc/partition_directory.inc
+++ b/mysql-test/suite/parts/inc/partition_directory.inc
@@ -29,41 +29,35 @@ let $partitioning= ;
if ($with_partitioning)
{
let $partitioning= PARTITION BY HASH(f_int1) PARTITIONS 2;
---disable_query_log
if ($with_directories)
{
-eval SET @aux =
-'PARTITION BY HASH(f_int1) PARTITIONS 2
+let $partitioning=
+PARTITION BY HASH(f_int1) PARTITIONS 2
(PARTITION p1
$index_directory,
PARTITION p2
-$index_directory)';
-let $partitioning= `SELECT @aux`;
+$index_directory);
}
}
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (
$column_list
$unique
)
$partitioning;
---enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY KEY
---disable_query_log
if ($with_partitioning)
{
-eval SET @aux =
-'PARTITION BY KEY(f_int1) PARTITIONS 5';
-let $partitioning= `SELECT @aux`;
+let $partitioning= PARTITION BY KEY(f_int1) PARTITIONS 5;
if ($with_directories)
{
---disable_query_log
-eval SET @aux =
-'PARTITION BY HASH(f_int1) PARTITIONS 5
+let $partitioning=
+PARTITION BY HASH(f_int1) PARTITIONS 5
(PARTITION p1
$data_directory,
PARTITION p2
@@ -73,27 +67,25 @@ $data_directory
$index_directory,
PARTITION p4,
PARTITION p5
-$index_directory)';
-let $partitioning= `SELECT @aux`;
+$index_directory);
}
}
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (
$column_list
$unique
)
$partitioning;
---enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY LIST
---disable_query_log
if ($with_partitioning)
{
-eval SET @aux =
-'PARTITION BY LIST(MOD(f_int1,4))
+let $partitioning=
+PARTITION BY LIST(MOD(f_int1,4))
(PARTITION part_3 VALUES IN (-3)
$index_directory,
PARTITION part_2 VALUES IN (-2)
@@ -109,25 +101,23 @@ $index_directory,
PARTITION part2 VALUES IN (2)
$data_directory,
PARTITION part3 VALUES IN (3)
-$data_directory $index_directory)';
-let $partitioning= `SELECT @aux`;
+$data_directory $index_directory);
}
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (
$column_list
$unique
)
$partitioning;
---enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY RANGE
---disable_query_log
if ($with_partitioning)
{
-eval SET @aux = 'PARTITION BY RANGE(f_int1)
+let $partitioning= PARTITION BY RANGE(f_int1)
(PARTITION parta VALUES LESS THAN (0)
$index_directory,
PARTITION partb VALUES LESS THAN ($max_row_div4)
@@ -139,26 +129,24 @@ PARTITION partd VALUES LESS THAN ($max_row_div2 + $max_row_div4),
PARTITION parte VALUES LESS THAN ($max_row)
$data_directory,
PARTITION partf VALUES LESS THAN $MAX_VALUE
-$index_directory)';
-let $partitioning= `SELECT @aux`;
+$index_directory);
}
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (
$column_list
$unique
)
$partitioning;
---enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY HASH
---disable_query_log
if ($with_partitioning)
{
-eval SET @aux =
-'PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2
+let $partitioning=
+PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2
(PARTITION parta VALUES LESS THAN (0)
$index_directory,
PARTITION partb VALUES LESS THAN ($max_row_div4)
@@ -166,25 +154,23 @@ $data_directory,
PARTITION partc VALUES LESS THAN ($max_row_div2),
PARTITION partd VALUES LESS THAN $MAX_VALUE
$data_directory
-$index_directory)';
-let $partitioning= `SELECT @aux`;
+$index_directory);
}
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (
$column_list
$unique
)
$partitioning;
---enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
---disable_query_log
if ($with_partitioning)
{
-eval SET @aux = 'PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1)
+let $partitioning= PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1)
(PARTITION part1 VALUES LESS THAN (0)
$data_directory
(SUBPARTITION subpart11, SUBPARTITION subpart12),
@@ -196,26 +182,24 @@ $data_directory
$index_directory
(SUBPARTITION subpart31, SUBPARTITION subpart32),
PARTITION part4 VALUES LESS THAN $MAX_VALUE
-(SUBPARTITION subpart41, SUBPARTITION subpart42))';
-let $partitioning= `SELECT @aux`;
+(SUBPARTITION subpart41, SUBPARTITION subpart42));
}
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (
$column_list
$unique
)
$partitioning;
---enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH
---disable_query_log
if ($with_partitioning)
{
-eval SET @aux =
-'PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1)
+let $partitioning=
+PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1)
(PARTITION part1 VALUES IN (0)
$index_directory
(SUBPARTITION sp11
@@ -239,15 +223,14 @@ eval SET @aux =
$index_directory,
SUBPARTITION sp42
$data_directory
- $index_directory))';
-let $partitioning= `SELECT @aux`;
+ $index_directory));
}
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (
$column_list
$unique
)
$partitioning;
---enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
DROP TABLE t1;
diff --git a/mysql-test/suite/parts/inc/partition_layout_check1.inc b/mysql-test/suite/parts/inc/partition_layout_check1.inc
index 6fa8df25496..b953d858adb 100644
--- a/mysql-test/suite/parts/inc/partition_layout_check1.inc
+++ b/mysql-test/suite/parts/inc/partition_layout_check1.inc
@@ -38,7 +38,8 @@ if ($do_file_tests)
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1* > $MYSQLTEST_VARDIR/master-data/test/tmp2 2>&1 || true
if ($with_directories)
{
---exec ls $MYSQLTEST_VARDIR/tmp/t1* >> $MYSQLTEST_VARDIR/master-data/test/tmp2 2>&1 || true
+--exec ls $MYSQLTEST_VARDIR/mysql-test-data-dir/t1* >> $MYSQLTEST_VARDIR/master-data/test/tmp2 2>&1 || true
+--exec ls $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1* >> $MYSQLTEST_VARDIR/master-data/test/tmp2 2>&1 || true
}
eval SET @aux = CONCAT('load_file(''$MYSQLTEST_VARDIR','/master-data/test/tmp2''
)');
diff --git a/mysql-test/suite/parts/inc/partition_layout_check2.inc b/mysql-test/suite/parts/inc/partition_layout_check2.inc
index 05c44a73a7f..716baa7d042 100644
--- a/mysql-test/suite/parts/inc/partition_layout_check2.inc
+++ b/mysql-test/suite/parts/inc/partition_layout_check2.inc
@@ -32,6 +32,11 @@ if ($do_file_tests)
{
# List the files belonging to the table t1
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1* > $MYSQLTEST_VARDIR/master-data/test/tmp2 2>&1 || true
+if ($with_directories)
+{
+--exec ls $MYSQLTEST_VARDIR/mysql-test-data-dir/t1* >> $MYSQLTEST_VARDIR/master-data/test/tmp2 2>&1 || true
+--exec ls $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1* >> $MYSQLTEST_VARDIR/master-data/test/tmp2 2>&1 || true
+}
eval SET @aux = CONCAT('load_file(''$MYSQLTEST_VARDIR','/master-data/test/tmp2'')');
let $file_list= `SELECT @aux`;
}
diff --git a/mysql-test/suite/parts/inc/partition_methods1.inc b/mysql-test/suite/parts/inc/partition_methods1.inc
index 1edcdcb3743..54cf050f1ff 100644
--- a/mysql-test/suite/parts/inc/partition_methods1.inc
+++ b/mysql-test/suite/parts/inc/partition_methods1.inc
@@ -44,42 +44,38 @@ let $partitioning= ;
if ($with_partitioning)
{
let $partitioning= PARTITION BY HASH(f_int1) PARTITIONS 2;
---disable_query_log
if ($with_directories)
{
-eval SET @aux =
-'PARTITION BY HASH(f_int1) PARTITIONS 2
+let $partitioning=
+PARTITION BY HASH(f_int1) PARTITIONS 2
(PARTITION p1
$data_directory
$index_directory,
PARTITION p2
$data_directory
-$index_directory)';
-let $partitioning= `SELECT @aux`;
+$index_directory);
}
}
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (
$column_list
$unique
)
$partitioning;
---enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY KEY
---disable_query_log
if ($with_partitioning)
{
-eval SET @aux =
-'PARTITION BY KEY(f_int1) PARTITIONS 5';
-let $partitioning= `SELECT @aux`;
+let $partitioning=
+PARTITION BY KEY(f_int1) PARTITIONS 5;
if ($with_directories)
{
-eval SET @aux =
-'PARTITION BY HASH(f_int1) PARTITIONS 5
+let $partitioning=
+PARTITION BY KEY(f_int1) PARTITIONS 5
(PARTITION p1
$data_directory
$index_directory,
@@ -94,27 +90,37 @@ $data_directory
$index_directory,
PARTITION p5
$data_directory
-$index_directory)';
-let $partitioning= `SELECT @aux`;
+$index_directory);
}
}
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (
$column_list
$unique
)
$partitioning;
---enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY LIST
---disable_query_log
if ($with_partitioning)
{
-eval SET @aux =
-'PARTITION BY LIST(MOD(f_int1,4))
+let $partitioning=
+PARTITION BY LIST(MOD(f_int1,4))
+(PARTITION part_3 VALUES IN (-3),
+ PARTITION part_2 VALUES IN (-2),
+ PARTITION part_1 VALUES IN (-1),
+ PARTITION part_N VALUES IN (NULL),
+ PARTITION part0 VALUES IN (0),
+ PARTITION part1 VALUES IN (1),
+ PARTITION part2 VALUES IN (2),
+ PARTITION part3 VALUES IN (3));
+if ($with_directories)
+{
+let $partitioning=
+PARTITION BY LIST(MOD(f_int1,4))
(PARTITION part_3 VALUES IN (-3)
$data_directory $index_directory,
PARTITION part_2 VALUES IN (-2)
@@ -130,25 +136,33 @@ $data_directory $index_directory,
PARTITION part2 VALUES IN (2)
$data_directory $index_directory,
PARTITION part3 VALUES IN (3)
-$data_directory $index_directory)';
-let $partitioning= `SELECT @aux`;
+$data_directory $index_directory);
+}
}
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (
$column_list
$unique
)
$partitioning;
---enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY RANGE
---disable_query_log
if ($with_partitioning)
{
-eval SET @aux = 'PARTITION BY RANGE(f_int1)
+let $partitioning= PARTITION BY RANGE(f_int1)
+(PARTITION parta VALUES LESS THAN (0),
+PARTITION partb VALUES LESS THAN ($max_row_div4),
+PARTITION partc VALUES LESS THAN ($max_row_div2),
+PARTITION partd VALUES LESS THAN ($max_row_div2 + $max_row_div4),
+PARTITION parte VALUES LESS THAN ($max_row),
+PARTITION partf VALUES LESS THAN $MAX_VALUE);
+if ($with_directories)
+{
+let $partitioning= PARTITION BY RANGE(f_int1)
(PARTITION parta VALUES LESS THAN (0)
$data_directory
$index_directory,
@@ -166,26 +180,33 @@ $data_directory
$index_directory,
PARTITION partf VALUES LESS THAN $MAX_VALUE
$data_directory
-$index_directory)';
-let $partitioning= `SELECT @aux`;
+$index_directory);
}
+}
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (
$column_list
$unique
)
$partitioning;
---enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY HASH
---disable_query_log
if ($with_partitioning)
{
-eval SET @aux =
-'PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2
+let $partitioning=
+PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2
+(PARTITION parta VALUES LESS THAN (0),
+PARTITION partb VALUES LESS THAN ($max_row_div4),
+PARTITION partc VALUES LESS THAN ($max_row_div2),
+PARTITION partd VALUES LESS THAN $MAX_VALUE);
+if ($with_directories)
+{
+let $partitioning=
+PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2
(PARTITION parta VALUES LESS THAN (0)
$data_directory
$index_directory,
@@ -197,60 +218,81 @@ $data_directory
$index_directory,
PARTITION partd VALUES LESS THAN $MAX_VALUE
$data_directory
-$index_directory)';
-let $partitioning= `SELECT @aux`;
+$index_directory);
+}
}
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (
$column_list
$unique
)
$partitioning;
---enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
---disable_query_log
if ($with_partitioning)
{
-eval SET @aux = 'PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1)
+let $partitioning= PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1)
(PARTITION part1 VALUES LESS THAN (0)
-$data_directory
-$index_directory
(SUBPARTITION subpart11, SUBPARTITION subpart12),
PARTITION part2 VALUES LESS THAN ($max_row_div4)
-$data_directory
-$index_directory
(SUBPARTITION subpart21, SUBPARTITION subpart22),
PARTITION part3 VALUES LESS THAN ($max_row_div2)
-$data_directory
-$index_directory
(SUBPARTITION subpart31, SUBPARTITION subpart32),
PARTITION part4 VALUES LESS THAN $MAX_VALUE
-$data_directory
-$index_directory
-(SUBPARTITION subpart41, SUBPARTITION subpart42))';
-let $partitioning= `SELECT @aux`;
+(SUBPARTITION subpart41, SUBPARTITION subpart42));
+if ($with_directories)
+{
+let $partitioning= PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1)
+(PARTITION part1 VALUES LESS THAN (0)
+(SUBPARTITION subpart11 $data_directory $index_directory,
+ SUBPARTITION subpart12 $data_directory $index_directory),
+PARTITION part2 VALUES LESS THAN ($max_row_div4)
+(SUBPARTITION subpart21 $data_directory $index_directory,
+ SUBPARTITION subpart22 $data_directory $index_directory),
+PARTITION part3 VALUES LESS THAN ($max_row_div2)
+(SUBPARTITION subpart31 $data_directory $index_directory,
+ SUBPARTITION subpart32 $data_directory $index_directory),
+PARTITION part4 VALUES LESS THAN $MAX_VALUE
+(SUBPARTITION subpart41 $data_directory $index_directory,
+ SUBPARTITION subpart42 $data_directory $index_directory));
}
+}
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (
$column_list
$unique
)
$partitioning;
---enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH
---disable_query_log
if ($with_partitioning)
{
-eval SET @aux =
-'PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1)
+let $partitioning=
+PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1)
+(PARTITION part1 VALUES IN (0)
+ (SUBPARTITION sp11,
+ SUBPARTITION sp12),
+ PARTITION part2 VALUES IN (1)
+ (SUBPARTITION sp21,
+ SUBPARTITION sp22),
+ PARTITION part3 VALUES IN (2)
+ (SUBPARTITION sp31,
+ SUBPARTITION sp32),
+ PARTITION part4 VALUES IN (NULL)
+ (SUBPARTITION sp41,
+ SUBPARTITION sp42));
+if ($with_directories)
+{
+let $partitioning=
+PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1)
(PARTITION part1 VALUES IN (0)
$data_directory
$index_directory
@@ -282,26 +324,33 @@ eval SET @aux =
$index_directory,
SUBPARTITION sp42
$data_directory
- $index_directory))';
-let $partitioning= `SELECT @aux`;
+ $index_directory));
+}
}
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (
$column_list
$unique
)
$partitioning;
---enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY KEY
---disable_query_log
if ($with_partitioning)
{
-eval SET @aux =
-'PARTITION BY LIST(ABS(MOD(f_int1,2)))
+let $partitioning=
+PARTITION BY LIST(ABS(MOD(f_int1,2)))
+SUBPARTITION BY KEY(f_int1) SUBPARTITIONS $sub_part_no
+(PARTITION part1 VALUES IN (0),
+ PARTITION part2 VALUES IN (1),
+ PARTITION part3 VALUES IN (NULL));
+if ($with_directories)
+{
+let $partitioning=
+PARTITION BY LIST(ABS(MOD(f_int1,2)))
SUBPARTITION BY KEY(f_int1) SUBPARTITIONS $sub_part_no
(PARTITION part1 VALUES IN (0)
$data_directory
@@ -311,17 +360,16 @@ SUBPARTITION BY KEY(f_int1) SUBPARTITIONS $sub_part_no
$index_directory,
PARTITION part3 VALUES IN (NULL)
$data_directory
- $index_directory)';
-let $partitioning= `SELECT @aux`;
+ $index_directory);
+}
}
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (
$column_list
$unique
)
$partitioning;
---enable_query_log
eval $insert_all;
--source suite/parts/inc/partition_check.inc
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
-let $with_directories= FALSE;
diff --git a/mysql-test/suite/parts/inc/partition_methods2.inc b/mysql-test/suite/parts/inc/partition_methods2.inc
index 91821d620b6..8af6a2cbf42 100644
--- a/mysql-test/suite/parts/inc/partition_methods2.inc
+++ b/mysql-test/suite/parts/inc/partition_methods2.inc
@@ -43,7 +43,19 @@ let $partitioning= ;
if ($with_partitioning)
{
let $partitioning= PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2;
+if ($with_directories)
+{
+let $partitioning=
+PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2
+(PARTITION p1
+$data_directory
+$index_directory,
+PARTITION p2
+$data_directory
+$index_directory);
+}
}
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (
$column_list
$unique
@@ -57,7 +69,28 @@ DROP TABLE t1;
if ($with_partitioning)
{
let $partitioning= PARTITION BY KEY(f_int1,f_int2) PARTITIONS 5;
+if ($with_directories)
+{
+let $partitioning=
+PARTITION BY KEY(f_int1,f_int2) PARTITIONS 5
+(PARTITION p1
+$data_directory
+$index_directory,
+PARTITION p2
+$data_directory
+$index_directory,
+PARTITION p3
+$data_directory
+$index_directory,
+PARTITION p4
+$data_directory
+$index_directory,
+PARTITION p5
+$data_directory
+$index_directory);
+}
}
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (
$column_list
$unique
@@ -79,7 +112,29 @@ let $partitioning= PARTITION BY LIST(MOD(f_int1 + f_int2,4))
PARTITION part1 VALUES IN (1),
PARTITION part2 VALUES IN (2),
PARTITION part3 VALUES IN (3));
+if ($with_directories)
+{
+let $partitioning=
+PARTITION BY LIST(MOD(f_int1 + f_int2,4))
+(PARTITION part_3 VALUES IN (-3)
+$data_directory $index_directory,
+ PARTITION part_2 VALUES IN (-2)
+$data_directory $index_directory,
+ PARTITION part_1 VALUES IN (-1)
+$data_directory $index_directory,
+ PARTITION part_N VALUES IN (NULL)
+$data_directory $index_directory,
+ PARTITION part0 VALUES IN (0)
+$data_directory $index_directory,
+ PARTITION part1 VALUES IN (1)
+$data_directory $index_directory,
+ PARTITION part2 VALUES IN (2)
+$data_directory $index_directory,
+ PARTITION part3 VALUES IN (3)
+$data_directory $index_directory);
+}
}
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (
$column_list
$unique
@@ -92,17 +147,37 @@ DROP TABLE t1;
#----------- PARTITION BY RANGE
if ($with_partitioning)
{
---disable_query_log
-eval SET @aux = 'PARTITION BY RANGE((f_int1 + f_int2) DIV 2)
+let $partitioning= PARTITION BY RANGE((f_int1 + f_int2) DIV 2)
(PARTITION parta VALUES LESS THAN (0),
PARTITION partb VALUES LESS THAN ($max_row_div4),
PARTITION partc VALUES LESS THAN ($max_row_div2),
PARTITION partd VALUES LESS THAN ($max_row_div2 + $max_row_div4),
PARTITION parte VALUES LESS THAN ($max_row),
-PARTITION partf VALUES LESS THAN $MAX_VALUE)';
-let $partitioning= `SELECT @aux`;
---enable_query_log
+PARTITION partf VALUES LESS THAN $MAX_VALUE);
+if ($with_directories)
+{
+let $partitioning= PARTITION BY RANGE((f_int1 + f_int2) DIV 2)
+(PARTITION parta VALUES LESS THAN (0)
+$data_directory
+$index_directory,
+PARTITION partb VALUES LESS THAN ($max_row_div4)
+$data_directory
+$index_directory,
+PARTITION partc VALUES LESS THAN ($max_row_div2)
+$data_directory
+$index_directory,
+PARTITION partd VALUES LESS THAN ($max_row_div2 + $max_row_div4)
+$data_directory
+$index_directory,
+PARTITION parte VALUES LESS THAN ($max_row)
+$data_directory
+$index_directory,
+PARTITION partf VALUES LESS THAN $MAX_VALUE
+$data_directory
+$index_directory);
}
+}
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (
$column_list
$unique
@@ -115,16 +190,31 @@ DROP TABLE t1;
#----------- PARTITION BY RANGE -- SUBPARTITION BY HASH
if ($with_partitioning)
{
---disable_query_log
-eval SET @aux =
-'PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int2) SUBPARTITIONS 2
+let $partitioning=
+PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int2) SUBPARTITIONS 2
(PARTITION parta VALUES LESS THAN (0),
PARTITION partb VALUES LESS THAN ($max_row_div4),
PARTITION partc VALUES LESS THAN ($max_row_div2),
-PARTITION partd VALUES LESS THAN $MAX_VALUE)';
-let $partitioning= `SELECT @aux`;
---enable_query_log
+PARTITION partd VALUES LESS THAN $MAX_VALUE);
+if ($with_directories)
+{
+let $partitioning=
+PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int2) SUBPARTITIONS 2
+(PARTITION parta VALUES LESS THAN (0)
+$data_directory
+$index_directory,
+PARTITION partb VALUES LESS THAN ($max_row_div4)
+$data_directory
+$index_directory,
+PARTITION partc VALUES LESS THAN ($max_row_div2)
+$data_directory
+$index_directory,
+PARTITION partd VALUES LESS THAN $MAX_VALUE
+$data_directory
+$index_directory);
+}
}
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (
$column_list
$unique
@@ -137,8 +227,7 @@ DROP TABLE t1;
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
if ($with_partitioning)
{
---disable_query_log
-eval SET @aux = 'PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int2)
+let $partitioning= PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int2)
(PARTITION part1 VALUES LESS THAN (0)
(SUBPARTITION subpart11, SUBPARTITION subpart12),
PARTITION part2 VALUES LESS THAN ($max_row_div4)
@@ -146,10 +235,25 @@ PARTITION part2 VALUES LESS THAN ($max_row_div4)
PARTITION part3 VALUES LESS THAN ($max_row_div2)
(SUBPARTITION subpart31, SUBPARTITION subpart32),
PARTITION part4 VALUES LESS THAN $MAX_VALUE
-(SUBPARTITION subpart41, SUBPARTITION subpart42))';
-let $partitioning= `SELECT @aux`;
---enable_query_log
+(SUBPARTITION subpart41, SUBPARTITION subpart42));
+if ($with_directories)
+{
+let $partitioning= PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int2)
+(PARTITION part1 VALUES LESS THAN (0)
+(SUBPARTITION subpart11 $data_directory $index_directory,
+ SUBPARTITION subpart12 $data_directory $index_directory),
+PARTITION part2 VALUES LESS THAN ($max_row_div4)
+(SUBPARTITION subpart21 $data_directory $index_directory,
+ SUBPARTITION subpart22 $data_directory $index_directory),
+PARTITION part3 VALUES LESS THAN ($max_row_div2)
+(SUBPARTITION subpart31 $data_directory $index_directory,
+ SUBPARTITION subpart32 $data_directory $index_directory),
+PARTITION part4 VALUES LESS THAN $MAX_VALUE
+(SUBPARTITION subpart41 $data_directory $index_directory,
+ SUBPARTITION subpart42 $data_directory $index_directory));
}
+}
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (
$column_list
$unique
@@ -171,7 +275,45 @@ let $partitioning= PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_
(SUBPARTITION sp31, SUBPARTITION sp32),
PARTITION part4 VALUES IN (NULL)
(SUBPARTITION sp41, SUBPARTITION sp42));
+if ($with_directories)
+{
+let $partitioning=
+PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int2 + 1)
+(PARTITION part1 VALUES IN (0)
+ $data_directory
+ $index_directory
+ (SUBPARTITION sp11
+ $data_directory
+ $index_directory,
+ SUBPARTITION sp12
+ $data_directory
+ $index_directory),
+ PARTITION part2 VALUES IN (1)
+ $data_directory
+ $index_directory
+ (SUBPARTITION sp21
+ $data_directory
+ $index_directory,
+ SUBPARTITION sp22
+ $data_directory
+ $index_directory),
+ PARTITION part3 VALUES IN (2)
+ $data_directory
+ $index_directory
+ (SUBPARTITION sp31,
+ SUBPARTITION sp32),
+ PARTITION part4 VALUES IN (NULL)
+ $data_directory
+ $index_directory
+ (SUBPARTITION sp41
+ $data_directory
+ $index_directory,
+ SUBPARTITION sp42
+ $data_directory
+ $index_directory));
+}
}
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (
$column_list
$unique
@@ -184,16 +326,29 @@ DROP TABLE t1;
#----------- PARTITION BY LIST -- SUBPARTITION BY KEY
if ($with_partitioning)
{
---disable_query_log
-eval SET @aux =
-'PARTITION BY LIST(ABS(MOD(f_int1,2)))
+let $partitioning=
+PARTITION BY LIST(ABS(MOD(f_int1,2)))
SUBPARTITION BY KEY(f_int2) SUBPARTITIONS $sub_part_no
(PARTITION part1 VALUES IN (0),
PARTITION part2 VALUES IN (1),
- PARTITION part3 VALUES IN (NULL))';
-let $partitioning= `SELECT @aux`;
---enable_query_log
+ PARTITION part3 VALUES IN (NULL));
+if ($with_directories)
+{
+let $partitioning=
+PARTITION BY LIST(ABS(MOD(f_int1,2)))
+SUBPARTITION BY KEY(f_int2) SUBPARTITIONS $sub_part_no
+(PARTITION part1 VALUES IN (0)
+ $data_directory
+ $index_directory,
+ PARTITION part2 VALUES IN (1)
+ $data_directory
+ $index_directory,
+ PARTITION part3 VALUES IN (NULL)
+ $data_directory
+ $index_directory);
+}
}
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (
$column_list
$unique