1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

parts suite merged

This commit is contained in:
Sergei Golubchik
2013-07-14 13:48:06 +02:00
parent 9fea6e7b7b
commit 48c54cd355
37 changed files with 2752 additions and 251 deletions

View File

@ -23,13 +23,13 @@
################################################################################
# Set the session storage engine
eval SET @@session.storage_engine = $engine;
eval SET @@session.default_storage_engine = $engine;
##### Disabled/affected testcases, because of open bugs #####
# --echo
# --echo #------------------------------------------------------------------------
# --echo # There are several testcases disabled because of the open bugs
# if (`SELECT @@session.storage_engine IN('ndbcluster')`)
# if (`SELECT @@session.default_storage_engine IN('ndbcluster')`)
# {
# --echo # #18730
# }
@ -135,7 +135,7 @@ f_charbig VARCHAR(1000);
# in partition_methods[1|2].inc and partition_alter_1[1|3].inc
# when $sub_part_no is set to >= 3.
let $sub_part_no= 3;
if (`SELECT @@session.storage_engine = 'ndbcluster'`)
if (`SELECT @@session.default_storage_engine = 'ndbcluster'`)
{
let $sub_part_no= 2;
}
@ -318,7 +318,7 @@ if (0)
# --source inc/have_partition.inc
# b) Engine specific settings and requirements
# $do_pk_tests, $MAX_VALUE, $engine
# SET SESSION storage_engine
# SET SESSION default_storage_engine
# $engine_other
# c) Generate the prerequisites ($variables, @variables, tables) needed
# via

View File

@ -115,6 +115,7 @@ ALTER TABLE t1 REMOVE PARTITIONING;
--source suite/parts/inc/partition_check_read1.inc
#
--echo # 1.2.7 Remove partitioning from not partitioned table --> ????
--error ER_PARTITION_MGMT_ON_NONPARTITIONED
ALTER TABLE t1 REMOVE PARTITIONING;
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@ -193,6 +194,7 @@ ALTER TABLE t1 REMOVE PARTITIONING;
--source suite/parts/inc/partition_check_read2.inc
#
--echo # 2.2.7 Remove partitioning from not partitioned table --> ????
--error ER_PARTITION_MGMT_ON_NONPARTITIONED
ALTER TABLE t1 REMOVE PARTITIONING;
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc

View File

@ -0,0 +1,29 @@
# To be used with WL#4445: EXCHANGE PARTITION WITH TABLE.
SET SESSION debug_dbug="+d,exchange_partition_abort_1";
--source suite/parts/inc/partition_crash_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_abort_1";
SET SESSION debug_dbug="+d,exchange_partition_abort_2";
--source suite/parts/inc/partition_crash_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_abort_2";
SET SESSION debug_dbug="+d,exchange_partition_abort_3";
--source suite/parts/inc/partition_crash_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_abort_3";
SET SESSION debug_dbug="+d,exchange_partition_abort_4";
--source suite/parts/inc/partition_crash_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_abort_4";
SET SESSION debug_dbug="+d,exchange_partition_abort_5";
--source suite/parts/inc/partition_crash_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_abort_5";
SET SESSION debug_dbug="+d,exchange_partition_abort_6";
--source suite/parts/inc/partition_crash_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_abort_6";
SET SESSION debug_dbug="+d,exchange_partition_abort_7";
--source suite/parts/inc/partition_crash_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_abort_7";
SET SESSION debug_dbug="+d,exchange_partition_abort_8";
--source suite/parts/inc/partition_crash_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_abort_8";
SET SESSION debug_dbug="+d,exchange_partition_abort_9";
--source suite/parts/inc/partition_crash_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_abort_9";

View File

@ -0,0 +1,12 @@
# Include file to extend partition_crash with a second table.
# To be used with WL#4445: EXCHANGE PARTITION WITH TABLE.
--eval $create_statement2
--eval $insert_statement2
SHOW CREATE TABLE t2;
--sorted_result
SELECT * FROM t2;
--source suite/parts/inc/partition_crash.inc
SHOW CREATE TABLE t2;
--sorted_result
SELECT * FROM t2;
DROP TABLE t2;

View File

@ -0,0 +1,27 @@
SET SESSION debug_dbug="+d,exchange_partition_fail_1";
--source suite/parts/inc/partition_fail_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_fail_1";
SET SESSION debug_dbug="+d,exchange_partition_fail_2";
--source suite/parts/inc/partition_fail_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_fail_2";
SET SESSION debug_dbug="+d,exchange_partition_fail_3";
--source suite/parts/inc/partition_fail_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_fail_3";
SET SESSION debug_dbug="+d,exchange_partition_fail_4";
--source suite/parts/inc/partition_fail_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_fail_4";
SET SESSION debug_dbug="+d,exchange_partition_fail_5";
--source suite/parts/inc/partition_fail_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_fail_5";
SET SESSION debug_dbug="+d,exchange_partition_fail_6";
--source suite/parts/inc/partition_fail_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_fail_6";
SET SESSION debug_dbug="+d,exchange_partition_fail_7";
--source suite/parts/inc/partition_fail_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_fail_7";
SET SESSION debug_dbug="+d,exchange_partition_fail_8";
--source suite/parts/inc/partition_fail_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_fail_8";
SET SESSION debug_dbug="+d,exchange_partition_fail_9";
--source suite/parts/inc/partition_fail_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_fail_9";

View File

@ -0,0 +1,31 @@
# Include file to to test failure with error injection.
# To be used with WL#4445: EXCHANGE PARTITION WITH TABLE.
--eval $create_statement2
--eval $insert_statement2
SHOW CREATE TABLE t2;
--sorted_result
SELECT * FROM t2;
--eval $create_statement
--eval $insert_statement
--echo # State before failure
--replace_result #p# #P#
--list_files $DATADIR/test
SHOW CREATE TABLE t1;
--sorted_result
SELECT * FROM t1;
# accept all errors
--disable_abort_on_error
--replace_regex /#sqlx-[0-9a-f_]*/#sqlx-nnnn_nnnn/i
--eval $fail_statement
--enable_abort_on_error
--echo # State after failure
--replace_result #p# #P#
--list_files $DATADIR/test
SHOW CREATE TABLE t1;
--sorted_result
SELECT * FROM t1;
DROP TABLE t1;
SHOW CREATE TABLE t2;
--sorted_result
SELECT * FROM t2;
DROP TABLE t2;

View File

@ -1,5 +1,5 @@
SET @max_row = 20;
SET @@session.storage_engine = 'InnoDB';
SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables

View File

@ -1,5 +1,5 @@
SET @max_row = 20;
SET @@session.storage_engine = 'MyISAM';
SET @@session.default_storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables

View File

@ -1,5 +1,5 @@
SET @max_row = 20;
SET @@session.storage_engine = 'InnoDB';
SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables

View File

@ -1,5 +1,5 @@
SET @max_row = 20;
SET @@session.storage_engine = 'MyISAM';
SET @@session.default_storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables

View File

@ -1,5 +1,5 @@
SET @max_row = 20;
SET @@session.storage_engine = 'InnoDB';
SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables

View File

@ -1,5 +1,5 @@
SET @max_row = 20;
SET @@session.storage_engine = 'MyISAM';
SET @@session.default_storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables

View File

@ -1,5 +1,5 @@
SET @max_row = 20;
SET @@session.storage_engine = 'InnoDB';
SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables

View File

@ -1,5 +1,5 @@
SET @max_row = 20;
SET @@session.storage_engine = 'InnoDB';
SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables

View File

@ -1,5 +1,5 @@
SET @max_row = 20;
SET @@session.storage_engine = 'Aria';
SET @@session.default_storage_engine = 'Aria';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables

View File

@ -1,5 +1,5 @@
SET @max_row = 20;
SET @@session.storage_engine = 'MyISAM';
SET @@session.default_storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables

View File

@ -1,5 +1,5 @@
SET @max_row = 20;
SET @@session.storage_engine = 'InnoDB';
SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables

View File

@ -1,5 +1,5 @@
SET @max_row = 20;
SET @@session.storage_engine = 'InnoDB';
SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables

View File

@ -1,5 +1,5 @@
SET @max_row = 20;
SET @@session.storage_engine = 'Aria';
SET @@session.default_storage_engine = 'Aria';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables

View File

@ -1,5 +1,5 @@
SET @max_row = 20;
SET @@session.storage_engine = 'MyISAM';
SET @@session.default_storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables

View File

@ -1,5 +1,5 @@
SET @max_row = 20;
SET @@session.storage_engine = 'InnoDB';
SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
@ -57,6 +57,7 @@ t1 CREATE TABLE `t1` (
`f_varchar` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
t1.frm
t1.ibd
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
@ -78,6 +79,7 @@ t1 CREATE TABLE `t1` (
`f_varchar` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH (YEAR(f_date)) */
t1#P#p0.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@ -96,6 +98,7 @@ t1 CREATE TABLE `t1` (
`f_varchar` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH (DAYOFYEAR(f_date)) */
t1#P#p0.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@ -112,6 +115,7 @@ t1 CREATE TABLE `t1` (
`f_varchar` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH (YEAR(f_date)) */
t1#P#p0.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@ -137,6 +141,9 @@ t1 CREATE TABLE `t1` (
(PARTITION p0 ENGINE = InnoDB,
PARTITION part1 ENGINE = InnoDB,
PARTITION part7 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#part1.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@ -161,6 +168,10 @@ t1 CREATE TABLE `t1` (
PARTITION part1 ENGINE = InnoDB,
PARTITION part7 ENGINE = InnoDB,
PARTITION part2 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@ -186,6 +197,14 @@ t1 CREATE TABLE `t1` (
PARTITION p5 ENGINE = InnoDB,
PARTITION p6 ENGINE = InnoDB,
PARTITION p7 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#p4.ibd
t1#P#p5.ibd
t1#P#p6.ibd
t1#P#p7.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@ -222,6 +241,13 @@ t1 CREATE TABLE `t1` (
PARTITION p4 ENGINE = InnoDB,
PARTITION p5 ENGINE = InnoDB,
PARTITION p6 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#p4.ibd
t1#P#p5.ibd
t1#P#p6.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@ -244,6 +270,12 @@ t1 CREATE TABLE `t1` (
PARTITION part2 ENGINE = InnoDB,
PARTITION p4 ENGINE = InnoDB,
PARTITION p5 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#p4.ibd
t1#P#p5.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@ -265,6 +297,11 @@ t1 CREATE TABLE `t1` (
PARTITION part7 ENGINE = InnoDB,
PARTITION part2 ENGINE = InnoDB,
PARTITION p4 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#p4.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@ -285,6 +322,10 @@ t1 CREATE TABLE `t1` (
PARTITION part1 ENGINE = InnoDB,
PARTITION part7 ENGINE = InnoDB,
PARTITION part2 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@ -304,6 +345,9 @@ t1 CREATE TABLE `t1` (
(PARTITION p0 ENGINE = InnoDB,
PARTITION part1 ENGINE = InnoDB,
PARTITION part7 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#part1.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@ -322,6 +366,8 @@ t1 CREATE TABLE `t1` (
/*!50100 PARTITION BY HASH (YEAR(f_date))
(PARTITION p0 ENGINE = InnoDB,
PARTITION part1 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#part1.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@ -339,6 +385,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH (YEAR(f_date))
(PARTITION p0 ENGINE = InnoDB) */
t1#P#p0.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@ -359,6 +406,7 @@ t1 CREATE TABLE `t1` (
`f_varchar` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
t1.frm
t1.ibd
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
@ -367,6 +415,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
# check read row by row success: 1
# 1.2.7 Remove partitioning from not partitioned table --> ????
ALTER TABLE t1 REMOVE PARTITIONING;
ERROR HY000: Partition management on a not partitioned table is not possible
DROP TABLE t1;
# Attention: There are unused files.
# Either the DROP TABLE or a preceding ALTER TABLE
@ -398,6 +447,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
t1.frm
t1.ibd
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
@ -420,6 +470,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (f_int1) */
t1#P#p0.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
@ -448,6 +499,9 @@ t1 CREATE TABLE `t1` (
(PARTITION p0 ENGINE = InnoDB,
PARTITION part1 ENGINE = InnoDB,
PARTITION part7 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#part1.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
@ -472,6 +526,10 @@ t1 CREATE TABLE `t1` (
PARTITION part1 ENGINE = InnoDB,
PARTITION part7 ENGINE = InnoDB,
PARTITION part2 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
@ -500,6 +558,14 @@ t1 CREATE TABLE `t1` (
PARTITION p5 ENGINE = InnoDB,
PARTITION p6 ENGINE = InnoDB,
PARTITION p7 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#p4.ibd
t1#P#p5.ibd
t1#P#p6.ibd
t1#P#p7.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
@ -534,6 +600,13 @@ t1 CREATE TABLE `t1` (
PARTITION p4 ENGINE = InnoDB,
PARTITION p5 ENGINE = InnoDB,
PARTITION p6 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#p4.ibd
t1#P#p5.ibd
t1#P#p6.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
@ -559,6 +632,12 @@ t1 CREATE TABLE `t1` (
PARTITION part2 ENGINE = InnoDB,
PARTITION p4 ENGINE = InnoDB,
PARTITION p5 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#p4.ibd
t1#P#p5.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
@ -583,6 +662,11 @@ t1 CREATE TABLE `t1` (
PARTITION part7 ENGINE = InnoDB,
PARTITION part2 ENGINE = InnoDB,
PARTITION p4 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#p4.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
@ -606,6 +690,10 @@ t1 CREATE TABLE `t1` (
PARTITION part1 ENGINE = InnoDB,
PARTITION part7 ENGINE = InnoDB,
PARTITION part2 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
@ -628,6 +716,9 @@ t1 CREATE TABLE `t1` (
(PARTITION p0 ENGINE = InnoDB,
PARTITION part1 ENGINE = InnoDB,
PARTITION part7 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#part1.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
@ -649,6 +740,8 @@ t1 CREATE TABLE `t1` (
/*!50100 PARTITION BY KEY (f_int1)
(PARTITION p0 ENGINE = InnoDB,
PARTITION part1 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#part1.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
@ -669,6 +762,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (f_int1)
(PARTITION p0 ENGINE = InnoDB) */
t1#P#p0.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
@ -692,6 +786,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
t1.frm
t1.ibd
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
@ -700,6 +795,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
# check read row by row success: 1
# 2.2.7 Remove partitioning from not partitioned table --> ????
ALTER TABLE t1 REMOVE PARTITIONING;
ERROR HY000: Partition management on a not partitioned table is not possible
DROP TABLE t1;
# Attention: There are unused files.
# Either the DROP TABLE or a preceding ALTER TABLE

View File

@ -1,5 +1,5 @@
SET @max_row = 20;
SET @@session.storage_engine = 'MyISAM';
SET @@session.default_storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
@ -463,6 +463,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
# check read row by row success: 1
# 1.2.7 Remove partitioning from not partitioned table --> ????
ALTER TABLE t1 REMOVE PARTITIONING;
ERROR HY000: Partition management on a not partitioned table is not possible
DROP TABLE t1;
#========================================================================
@ -882,6 +883,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
# check read row by row success: 1
# 2.2.7 Remove partitioning from not partitioned table --> ????
ALTER TABLE t1 REMOVE PARTITIONING;
ERROR HY000: Partition management on a not partitioned table is not possible
DROP TABLE t1;
DROP VIEW IF EXISTS v1;
DROP TABLE IF EXISTS t1;

View File

@ -1,5 +1,5 @@
SET @max_row = 20;
SET @@session.storage_engine = 'InnoDB';
SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables

View File

@ -1,5 +1,5 @@
SET @max_row = 20;
SET @@session.storage_engine = 'MyISAM';
SET @@session.default_storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables

View File

@ -1,5 +1,5 @@
SET @max_row = 20;
SET @@session.storage_engine = 'InnoDB';
SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
@ -77,6 +77,8 @@ t1 CREATE TABLE `t1` (
PARTITIONS 2 */
unified filelist
t1#P#p0.ibd
t1#P#p1.ibd
t1.frm
t1.par
@ -532,6 +534,11 @@ t1 CREATE TABLE `t1` (
PARTITIONS 5 */
unified filelist
t1#P#p0.ibd
t1#P#p1.ibd
t1#P#p2.ibd
t1#P#p3.ibd
t1#P#p4.ibd
t1.frm
t1.par
@ -1002,6 +1009,14 @@ t1 CREATE TABLE `t1` (
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
unified filelist
t1#P#part0.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part3.ibd
t1#P#part_1.ibd
t1#P#part_2.ibd
t1#P#part_3.ibd
t1#P#part_N.ibd
t1.frm
t1.par
@ -1468,6 +1483,12 @@ t1 CREATE TABLE `t1` (
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
t1#P#parta.ibd
t1#P#partb.ibd
t1#P#partc.ibd
t1#P#partd.ibd
t1#P#parte.ibd
t1#P#partf.ibd
t1.frm
t1.par
@ -1930,6 +1951,14 @@ SUBPARTITIONS 2
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
t1#P#parta#SP#partasp0.ibd
t1#P#parta#SP#partasp1.ibd
t1#P#partb#SP#partbsp0.ibd
t1#P#partb#SP#partbsp1.ibd
t1#P#partc#SP#partcsp0.ibd
t1#P#partc#SP#partcsp1.ibd
t1#P#partd#SP#partdsp0.ibd
t1#P#partd#SP#partdsp1.ibd
t1.frm
t1.par
@ -2405,6 +2434,14 @@ SUBPARTITION BY KEY (f_int1)
SUBPARTITION subpart42 ENGINE = InnoDB)) */
unified filelist
t1#P#part1#SP#subpart11.ibd
t1#P#part1#SP#subpart12.ibd
t1#P#part2#SP#subpart21.ibd
t1#P#part2#SP#subpart22.ibd
t1#P#part3#SP#subpart31.ibd
t1#P#part3#SP#subpart32.ibd
t1#P#part4#SP#subpart41.ibd
t1#P#part4#SP#subpart42.ibd
t1.frm
t1.par
@ -2882,6 +2919,14 @@ SUBPARTITION BY HASH (f_int1 + 1)
SUBPARTITION sp42 ENGINE = InnoDB)) */
unified filelist
t1#P#part1#SP#sp11.ibd
t1#P#part1#SP#sp12.ibd
t1#P#part2#SP#sp21.ibd
t1#P#part2#SP#sp22.ibd
t1#P#part3#SP#sp31.ibd
t1#P#part3#SP#sp32.ibd
t1#P#part4#SP#sp41.ibd
t1#P#part4#SP#sp42.ibd
t1.frm
t1.par
@ -3345,6 +3390,15 @@ SUBPARTITIONS 3
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
unified filelist
t1#P#part1#SP#part1sp0.ibd
t1#P#part1#SP#part1sp1.ibd
t1#P#part1#SP#part1sp2.ibd
t1#P#part2#SP#part2sp0.ibd
t1#P#part2#SP#part2sp1.ibd
t1#P#part2#SP#part2sp2.ibd
t1#P#part3#SP#part3sp0.ibd
t1#P#part3#SP#part3sp1.ibd
t1#P#part3#SP#part3sp2.ibd
t1.frm
t1.par
@ -3802,6 +3856,8 @@ t1 CREATE TABLE `t1` (
PARTITIONS 2 */
unified filelist
t1#P#p0.ibd
t1#P#p1.ibd
t1.frm
t1.par
@ -4257,6 +4313,11 @@ t1 CREATE TABLE `t1` (
PARTITIONS 5 */
unified filelist
t1#P#p0.ibd
t1#P#p1.ibd
t1#P#p2.ibd
t1#P#p3.ibd
t1#P#p4.ibd
t1.frm
t1.par
@ -4727,6 +4788,14 @@ t1 CREATE TABLE `t1` (
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
unified filelist
t1#P#part0.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part3.ibd
t1#P#part_1.ibd
t1#P#part_2.ibd
t1#P#part_3.ibd
t1#P#part_N.ibd
t1.frm
t1.par
@ -5193,6 +5262,12 @@ t1 CREATE TABLE `t1` (
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
t1#P#parta.ibd
t1#P#partb.ibd
t1#P#partc.ibd
t1#P#partd.ibd
t1#P#parte.ibd
t1#P#partf.ibd
t1.frm
t1.par
@ -5655,6 +5730,14 @@ SUBPARTITIONS 2
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
t1#P#parta#SP#partasp0.ibd
t1#P#parta#SP#partasp1.ibd
t1#P#partb#SP#partbsp0.ibd
t1#P#partb#SP#partbsp1.ibd
t1#P#partc#SP#partcsp0.ibd
t1#P#partc#SP#partcsp1.ibd
t1#P#partd#SP#partdsp0.ibd
t1#P#partd#SP#partdsp1.ibd
t1.frm
t1.par
@ -6128,6 +6211,14 @@ SUBPARTITION BY KEY (f_int2)
SUBPARTITION subpart42 ENGINE = InnoDB)) */
unified filelist
t1#P#part1#SP#subpart11.ibd
t1#P#part1#SP#subpart12.ibd
t1#P#part2#SP#subpart21.ibd
t1#P#part2#SP#subpart22.ibd
t1#P#part3#SP#subpart31.ibd
t1#P#part3#SP#subpart32.ibd
t1#P#part4#SP#subpart41.ibd
t1#P#part4#SP#subpart42.ibd
t1.frm
t1.par
@ -6601,6 +6692,14 @@ SUBPARTITION BY HASH (f_int2 + 1)
SUBPARTITION sp42 ENGINE = InnoDB)) */
unified filelist
t1#P#part1#SP#sp11.ibd
t1#P#part1#SP#sp12.ibd
t1#P#part2#SP#sp21.ibd
t1#P#part2#SP#sp22.ibd
t1#P#part3#SP#sp31.ibd
t1#P#part3#SP#sp32.ibd
t1#P#part4#SP#sp41.ibd
t1#P#part4#SP#sp42.ibd
t1.frm
t1.par
@ -7064,6 +7163,15 @@ SUBPARTITIONS 3
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
unified filelist
t1#P#part1#SP#part1sp0.ibd
t1#P#part1#SP#part1sp1.ibd
t1#P#part1#SP#part1sp2.ibd
t1#P#part2#SP#part2sp0.ibd
t1#P#part2#SP#part2sp1.ibd
t1#P#part2#SP#part2sp2.ibd
t1#P#part3#SP#part3sp0.ibd
t1#P#part3#SP#part3sp1.ibd
t1#P#part3#SP#part3sp2.ibd
t1.frm
t1.par
@ -7527,6 +7635,8 @@ t1 CREATE TABLE `t1` (
PARTITIONS 2 */
unified filelist
t1#P#p0.ibd
t1#P#p1.ibd
t1.frm
t1.par
@ -8019,6 +8129,11 @@ t1 CREATE TABLE `t1` (
PARTITIONS 5 */
unified filelist
t1#P#p0.ibd
t1#P#p1.ibd
t1#P#p2.ibd
t1#P#p3.ibd
t1#P#p4.ibd
t1.frm
t1.par
@ -8526,6 +8641,14 @@ t1 CREATE TABLE `t1` (
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
unified filelist
t1#P#part0.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part3.ibd
t1#P#part_1.ibd
t1#P#part_2.ibd
t1#P#part_3.ibd
t1#P#part_N.ibd
t1.frm
t1.par
@ -9029,6 +9152,12 @@ t1 CREATE TABLE `t1` (
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
t1#P#parta.ibd
t1#P#partb.ibd
t1#P#partc.ibd
t1#P#partd.ibd
t1#P#parte.ibd
t1#P#partf.ibd
t1.frm
t1.par
@ -9528,6 +9657,14 @@ SUBPARTITIONS 2
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
t1#P#parta#SP#partasp0.ibd
t1#P#parta#SP#partasp1.ibd
t1#P#partb#SP#partbsp0.ibd
t1#P#partb#SP#partbsp1.ibd
t1#P#partc#SP#partcsp0.ibd
t1#P#partc#SP#partcsp1.ibd
t1#P#partd#SP#partdsp0.ibd
t1#P#partd#SP#partdsp1.ibd
t1.frm
t1.par
@ -10040,6 +10177,14 @@ SUBPARTITION BY KEY (f_int1)
SUBPARTITION subpart42 ENGINE = InnoDB)) */
unified filelist
t1#P#part1#SP#subpart11.ibd
t1#P#part1#SP#subpart12.ibd
t1#P#part2#SP#subpart21.ibd
t1#P#part2#SP#subpart22.ibd
t1#P#part3#SP#subpart31.ibd
t1#P#part3#SP#subpart32.ibd
t1#P#part4#SP#subpart41.ibd
t1#P#part4#SP#subpart42.ibd
t1.frm
t1.par
@ -10554,6 +10699,14 @@ SUBPARTITION BY HASH (f_int1 + 1)
SUBPARTITION sp42 ENGINE = InnoDB)) */
unified filelist
t1#P#part1#SP#sp11.ibd
t1#P#part1#SP#sp12.ibd
t1#P#part2#SP#sp21.ibd
t1#P#part2#SP#sp22.ibd
t1#P#part3#SP#sp31.ibd
t1#P#part3#SP#sp32.ibd
t1#P#part4#SP#sp41.ibd
t1#P#part4#SP#sp42.ibd
t1.frm
t1.par
@ -11054,6 +11207,15 @@ SUBPARTITIONS 3
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
unified filelist
t1#P#part1#SP#part1sp0.ibd
t1#P#part1#SP#part1sp1.ibd
t1#P#part1#SP#part1sp2.ibd
t1#P#part2#SP#part2sp0.ibd
t1#P#part2#SP#part2sp1.ibd
t1#P#part2#SP#part2sp2.ibd
t1#P#part3#SP#part3sp0.ibd
t1#P#part3#SP#part3sp1.ibd
t1#P#part3#SP#part3sp2.ibd
t1.frm
t1.par
@ -11547,6 +11709,8 @@ t1 CREATE TABLE `t1` (
PARTITIONS 2 */
unified filelist
t1#P#p0.ibd
t1#P#p1.ibd
t1.frm
t1.par
@ -12039,6 +12203,11 @@ t1 CREATE TABLE `t1` (
PARTITIONS 5 */
unified filelist
t1#P#p0.ibd
t1#P#p1.ibd
t1#P#p2.ibd
t1#P#p3.ibd
t1#P#p4.ibd
t1.frm
t1.par
@ -12546,6 +12715,14 @@ t1 CREATE TABLE `t1` (
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
unified filelist
t1#P#part0.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part3.ibd
t1#P#part_1.ibd
t1#P#part_2.ibd
t1#P#part_3.ibd
t1#P#part_N.ibd
t1.frm
t1.par
@ -13049,6 +13226,12 @@ t1 CREATE TABLE `t1` (
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
t1#P#parta.ibd
t1#P#partb.ibd
t1#P#partc.ibd
t1#P#partd.ibd
t1#P#parte.ibd
t1#P#partf.ibd
t1.frm
t1.par
@ -13548,6 +13731,14 @@ SUBPARTITIONS 2
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
t1#P#parta#SP#partasp0.ibd
t1#P#parta#SP#partasp1.ibd
t1#P#partb#SP#partbsp0.ibd
t1#P#partb#SP#partbsp1.ibd
t1#P#partc#SP#partcsp0.ibd
t1#P#partc#SP#partcsp1.ibd
t1#P#partd#SP#partdsp0.ibd
t1#P#partd#SP#partdsp1.ibd
t1.frm
t1.par
@ -14060,6 +14251,14 @@ SUBPARTITION BY KEY (f_int1)
SUBPARTITION subpart42 ENGINE = InnoDB)) */
unified filelist
t1#P#part1#SP#subpart11.ibd
t1#P#part1#SP#subpart12.ibd
t1#P#part2#SP#subpart21.ibd
t1#P#part2#SP#subpart22.ibd
t1#P#part3#SP#subpart31.ibd
t1#P#part3#SP#subpart32.ibd
t1#P#part4#SP#subpart41.ibd
t1#P#part4#SP#subpart42.ibd
t1.frm
t1.par
@ -14574,6 +14773,14 @@ SUBPARTITION BY HASH (f_int1 + 1)
SUBPARTITION sp42 ENGINE = InnoDB)) */
unified filelist
t1#P#part1#SP#sp11.ibd
t1#P#part1#SP#sp12.ibd
t1#P#part2#SP#sp21.ibd
t1#P#part2#SP#sp22.ibd
t1#P#part3#SP#sp31.ibd
t1#P#part3#SP#sp32.ibd
t1#P#part4#SP#sp41.ibd
t1#P#part4#SP#sp42.ibd
t1.frm
t1.par
@ -15074,6 +15281,15 @@ SUBPARTITIONS 3
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
unified filelist
t1#P#part1#SP#part1sp0.ibd
t1#P#part1#SP#part1sp1.ibd
t1#P#part1#SP#part1sp2.ibd
t1#P#part2#SP#part2sp0.ibd
t1#P#part2#SP#part2sp1.ibd
t1#P#part2#SP#part2sp2.ibd
t1#P#part3#SP#part3sp0.ibd
t1#P#part3#SP#part3sp1.ibd
t1#P#part3#SP#part3sp2.ibd
t1.frm
t1.par
@ -15567,6 +15783,8 @@ t1 CREATE TABLE `t1` (
PARTITIONS 2 */
unified filelist
t1#P#p0.ibd
t1#P#p1.ibd
t1.frm
t1.par
@ -16075,6 +16293,11 @@ t1 CREATE TABLE `t1` (
PARTITIONS 5 */
unified filelist
t1#P#p0.ibd
t1#P#p1.ibd
t1#P#p2.ibd
t1#P#p3.ibd
t1#P#p4.ibd
t1.frm
t1.par
@ -16598,6 +16821,14 @@ t1 CREATE TABLE `t1` (
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
unified filelist
t1#P#part0.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part3.ibd
t1#P#part_1.ibd
t1#P#part_2.ibd
t1#P#part_3.ibd
t1#P#part_N.ibd
t1.frm
t1.par
@ -17117,6 +17348,12 @@ t1 CREATE TABLE `t1` (
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
t1#P#parta.ibd
t1#P#partb.ibd
t1#P#partc.ibd
t1#P#partd.ibd
t1#P#parte.ibd
t1#P#partf.ibd
t1.frm
t1.par
@ -17632,6 +17869,14 @@ SUBPARTITIONS 2
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
t1#P#parta#SP#partasp0.ibd
t1#P#parta#SP#partasp1.ibd
t1#P#partb#SP#partbsp0.ibd
t1#P#partb#SP#partbsp1.ibd
t1#P#partc#SP#partcsp0.ibd
t1#P#partc#SP#partcsp1.ibd
t1#P#partd#SP#partdsp0.ibd
t1#P#partd#SP#partdsp1.ibd
t1.frm
t1.par
@ -18160,6 +18405,14 @@ SUBPARTITION BY KEY (f_int1)
SUBPARTITION subpart42 ENGINE = InnoDB)) */
unified filelist
t1#P#part1#SP#subpart11.ibd
t1#P#part1#SP#subpart12.ibd
t1#P#part2#SP#subpart21.ibd
t1#P#part2#SP#subpart22.ibd
t1#P#part3#SP#subpart31.ibd
t1#P#part3#SP#subpart32.ibd
t1#P#part4#SP#subpart41.ibd
t1#P#part4#SP#subpart42.ibd
t1.frm
t1.par
@ -18690,6 +18943,14 @@ SUBPARTITION BY HASH (f_int1 + 1)
SUBPARTITION sp42 ENGINE = InnoDB)) */
unified filelist
t1#P#part1#SP#sp11.ibd
t1#P#part1#SP#sp12.ibd
t1#P#part2#SP#sp21.ibd
t1#P#part2#SP#sp22.ibd
t1#P#part3#SP#sp31.ibd
t1#P#part3#SP#sp32.ibd
t1#P#part4#SP#sp41.ibd
t1#P#part4#SP#sp42.ibd
t1.frm
t1.par
@ -19206,6 +19467,15 @@ SUBPARTITIONS 3
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
unified filelist
t1#P#part1#SP#part1sp0.ibd
t1#P#part1#SP#part1sp1.ibd
t1#P#part1#SP#part1sp2.ibd
t1#P#part2#SP#part2sp0.ibd
t1#P#part2#SP#part2sp1.ibd
t1#P#part2#SP#part2sp2.ibd
t1#P#part3#SP#part3sp0.ibd
t1#P#part3#SP#part3sp1.ibd
t1#P#part3#SP#part3sp2.ibd
t1.frm
t1.par
@ -19720,6 +19990,8 @@ t1 CREATE TABLE `t1` (
PARTITIONS 2 */
unified filelist
t1#P#p0.ibd
t1#P#p1.ibd
t1.frm
t1.par
@ -20212,6 +20484,11 @@ t1 CREATE TABLE `t1` (
PARTITIONS 5 */
unified filelist
t1#P#p0.ibd
t1#P#p1.ibd
t1#P#p2.ibd
t1#P#p3.ibd
t1#P#p4.ibd
t1.frm
t1.par
@ -20719,6 +20996,14 @@ t1 CREATE TABLE `t1` (
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
unified filelist
t1#P#part0.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part3.ibd
t1#P#part_1.ibd
t1#P#part_2.ibd
t1#P#part_3.ibd
t1#P#part_N.ibd
t1.frm
t1.par
@ -21222,6 +21507,12 @@ t1 CREATE TABLE `t1` (
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
t1#P#parta.ibd
t1#P#partb.ibd
t1#P#partc.ibd
t1#P#partd.ibd
t1#P#parte.ibd
t1#P#partf.ibd
t1.frm
t1.par
@ -21721,6 +22012,14 @@ SUBPARTITIONS 2
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
t1#P#parta#SP#partasp0.ibd
t1#P#parta#SP#partasp1.ibd
t1#P#partb#SP#partbsp0.ibd
t1#P#partb#SP#partbsp1.ibd
t1#P#partc#SP#partcsp0.ibd
t1#P#partc#SP#partcsp1.ibd
t1#P#partd#SP#partdsp0.ibd
t1#P#partd#SP#partdsp1.ibd
t1.frm
t1.par
@ -22231,6 +22530,14 @@ SUBPARTITION BY KEY (f_int2)
SUBPARTITION subpart42 ENGINE = InnoDB)) */
unified filelist
t1#P#part1#SP#subpart11.ibd
t1#P#part1#SP#subpart12.ibd
t1#P#part2#SP#subpart21.ibd
t1#P#part2#SP#subpart22.ibd
t1#P#part3#SP#subpart31.ibd
t1#P#part3#SP#subpart32.ibd
t1#P#part4#SP#subpart41.ibd
t1#P#part4#SP#subpart42.ibd
t1.frm
t1.par
@ -22741,6 +23048,14 @@ SUBPARTITION BY HASH (f_int2 + 1)
SUBPARTITION sp42 ENGINE = InnoDB)) */
unified filelist
t1#P#part1#SP#sp11.ibd
t1#P#part1#SP#sp12.ibd
t1#P#part2#SP#sp21.ibd
t1#P#part2#SP#sp22.ibd
t1#P#part3#SP#sp31.ibd
t1#P#part3#SP#sp32.ibd
t1#P#part4#SP#sp41.ibd
t1#P#part4#SP#sp42.ibd
t1.frm
t1.par
@ -23241,6 +23556,15 @@ SUBPARTITIONS 3
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
unified filelist
t1#P#part1#SP#part1sp0.ibd
t1#P#part1#SP#part1sp1.ibd
t1#P#part1#SP#part1sp2.ibd
t1#P#part2#SP#part2sp0.ibd
t1#P#part2#SP#part2sp1.ibd
t1#P#part2#SP#part2sp2.ibd
t1#P#part3#SP#part3sp0.ibd
t1#P#part3#SP#part3sp1.ibd
t1#P#part3#SP#part3sp2.ibd
t1.frm
t1.par
@ -23734,6 +24058,8 @@ t1 CREATE TABLE `t1` (
PARTITIONS 2 */
unified filelist
t1#P#p0.ibd
t1#P#p1.ibd
t1.frm
t1.par
@ -24226,6 +24552,11 @@ t1 CREATE TABLE `t1` (
PARTITIONS 5 */
unified filelist
t1#P#p0.ibd
t1#P#p1.ibd
t1#P#p2.ibd
t1#P#p3.ibd
t1#P#p4.ibd
t1.frm
t1.par
@ -24733,6 +25064,14 @@ t1 CREATE TABLE `t1` (
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
unified filelist
t1#P#part0.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part3.ibd
t1#P#part_1.ibd
t1#P#part_2.ibd
t1#P#part_3.ibd
t1#P#part_N.ibd
t1.frm
t1.par
@ -25236,6 +25575,12 @@ t1 CREATE TABLE `t1` (
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
t1#P#parta.ibd
t1#P#partb.ibd
t1#P#partc.ibd
t1#P#partd.ibd
t1#P#parte.ibd
t1#P#partf.ibd
t1.frm
t1.par
@ -25735,6 +26080,14 @@ SUBPARTITIONS 2
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
t1#P#parta#SP#partasp0.ibd
t1#P#parta#SP#partasp1.ibd
t1#P#partb#SP#partbsp0.ibd
t1#P#partb#SP#partbsp1.ibd
t1#P#partc#SP#partcsp0.ibd
t1#P#partc#SP#partcsp1.ibd
t1#P#partd#SP#partdsp0.ibd
t1#P#partd#SP#partdsp1.ibd
t1.frm
t1.par
@ -26245,6 +26598,14 @@ SUBPARTITION BY KEY (f_int2)
SUBPARTITION subpart42 ENGINE = InnoDB)) */
unified filelist
t1#P#part1#SP#subpart11.ibd
t1#P#part1#SP#subpart12.ibd
t1#P#part2#SP#subpart21.ibd
t1#P#part2#SP#subpart22.ibd
t1#P#part3#SP#subpart31.ibd
t1#P#part3#SP#subpart32.ibd
t1#P#part4#SP#subpart41.ibd
t1#P#part4#SP#subpart42.ibd
t1.frm
t1.par
@ -26755,6 +27116,14 @@ SUBPARTITION BY HASH (f_int2 + 1)
SUBPARTITION sp42 ENGINE = InnoDB)) */
unified filelist
t1#P#part1#SP#sp11.ibd
t1#P#part1#SP#sp12.ibd
t1#P#part2#SP#sp21.ibd
t1#P#part2#SP#sp22.ibd
t1#P#part3#SP#sp31.ibd
t1#P#part3#SP#sp32.ibd
t1#P#part4#SP#sp41.ibd
t1#P#part4#SP#sp42.ibd
t1.frm
t1.par
@ -27255,6 +27624,15 @@ SUBPARTITIONS 3
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
unified filelist
t1#P#part1#SP#part1sp0.ibd
t1#P#part1#SP#part1sp1.ibd
t1#P#part1#SP#part1sp2.ibd
t1#P#part2#SP#part2sp0.ibd
t1#P#part2#SP#part2sp1.ibd
t1#P#part2#SP#part2sp2.ibd
t1#P#part3#SP#part3sp0.ibd
t1#P#part3#SP#part3sp1.ibd
t1#P#part3#SP#part3sp2.ibd
t1.frm
t1.par
@ -27748,6 +28126,8 @@ t1 CREATE TABLE `t1` (
PARTITIONS 2 */
unified filelist
t1#P#p0.ibd
t1#P#p1.ibd
t1.frm
t1.par
@ -28256,6 +28636,11 @@ t1 CREATE TABLE `t1` (
PARTITIONS 5 */
unified filelist
t1#P#p0.ibd
t1#P#p1.ibd
t1#P#p2.ibd
t1#P#p3.ibd
t1#P#p4.ibd
t1.frm
t1.par
@ -28779,6 +29164,14 @@ t1 CREATE TABLE `t1` (
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
unified filelist
t1#P#part0.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part3.ibd
t1#P#part_1.ibd
t1#P#part_2.ibd
t1#P#part_3.ibd
t1#P#part_N.ibd
t1.frm
t1.par
@ -29298,6 +29691,12 @@ t1 CREATE TABLE `t1` (
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
t1#P#parta.ibd
t1#P#partb.ibd
t1#P#partc.ibd
t1#P#partd.ibd
t1#P#parte.ibd
t1#P#partf.ibd
t1.frm
t1.par
@ -29813,6 +30212,14 @@ SUBPARTITIONS 2
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
t1#P#parta#SP#partasp0.ibd
t1#P#parta#SP#partasp1.ibd
t1#P#partb#SP#partbsp0.ibd
t1#P#partb#SP#partbsp1.ibd
t1#P#partc#SP#partcsp0.ibd
t1#P#partc#SP#partcsp1.ibd
t1#P#partd#SP#partdsp0.ibd
t1#P#partd#SP#partdsp1.ibd
t1.frm
t1.par
@ -30339,6 +30746,14 @@ SUBPARTITION BY KEY (f_int2)
SUBPARTITION subpart42 ENGINE = InnoDB)) */
unified filelist
t1#P#part1#SP#subpart11.ibd
t1#P#part1#SP#subpart12.ibd
t1#P#part2#SP#subpart21.ibd
t1#P#part2#SP#subpart22.ibd
t1#P#part3#SP#subpart31.ibd
t1#P#part3#SP#subpart32.ibd
t1#P#part4#SP#subpart41.ibd
t1#P#part4#SP#subpart42.ibd
t1.frm
t1.par
@ -30865,6 +31280,14 @@ SUBPARTITION BY HASH (f_int2 + 1)
SUBPARTITION sp42 ENGINE = InnoDB)) */
unified filelist
t1#P#part1#SP#sp11.ibd
t1#P#part1#SP#sp12.ibd
t1#P#part2#SP#sp21.ibd
t1#P#part2#SP#sp22.ibd
t1#P#part3#SP#sp31.ibd
t1#P#part3#SP#sp32.ibd
t1#P#part4#SP#sp41.ibd
t1#P#part4#SP#sp42.ibd
t1.frm
t1.par
@ -31381,6 +31804,15 @@ SUBPARTITIONS 3
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
unified filelist
t1#P#part1#SP#part1sp0.ibd
t1#P#part1#SP#part1sp1.ibd
t1#P#part1#SP#part1sp2.ibd
t1#P#part2#SP#part2sp0.ibd
t1#P#part2#SP#part2sp1.ibd
t1#P#part2#SP#part2sp2.ibd
t1#P#part3#SP#part3sp0.ibd
t1#P#part3#SP#part3sp1.ibd
t1#P#part3#SP#part3sp2.ibd
t1.frm
t1.par

View File

@ -1,5 +1,5 @@
SET @max_row = 20;
SET @@session.storage_engine = 'MyISAM';
SET @@session.default_storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables

View File

@ -1,10 +1,40 @@
# Will not run partition_basic_symlink on InnoDB, since it is the same
# as partition_basic, since InnoDB does not support DATA/INDEX DIR
# Will only verify that the DATA/INDEX DIR is stored and used if
# ALTER to MyISAM.
#
# Verify that the DATA/INDEX DIR is stored and used if ALTER to MyISAM.
#
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (c1 INT)
ENGINE = InnoDB
SET SESSION innodb_strict_mode = ON;
#
# InnoDB only supports DATA DIRECTORY with innodb_file_per_table=ON
#
SET GLOBAL innodb_file_per_table = OFF;
CREATE TABLE t1 (c1 INT) ENGINE = InnoDB
PARTITION BY HASH (c1) (
PARTITION p0
DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir'
INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir',
PARTITION p1
DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir'
INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'
);
ERROR HY000: Can't create table 'test.t1' (errno: 140 "Wrong create options")
SHOW WARNINGS;
Level Code Message
Warning 1478 InnoDB: DATA DIRECTORY requires innodb_file_per_table.
Warning 1478 InnoDB: INDEX DIRECTORY is not supported
Error 1005 Can't create table 'test.t1' (errno: 140 "Wrong create options")
Error 6 Error on delete of 'MYSQLD_DATADIR/test/t1.par' (Errcode: 2 "No such file or directory")
#
# InnoDB is different from MyISAM in that it uses a text file
# with an '.isl' extension instead of a symbolic link so that
# the tablespace can be re-located on any OS. Also, instead of
# putting the file directly into the DATA DIRECTORY,
# it adds a folder under it with the name of the database.
# Since strict mode is off, InnoDB ignores the INDEX DIRECTORY
# and it is no longer part of the definition.
#
SET SESSION innodb_strict_mode = OFF;
SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (c1 INT) ENGINE = InnoDB
PARTITION BY HASH (c1)
(PARTITION p0
DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir'
@ -13,8 +43,26 @@ PARTITION p1
DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir'
INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'
);
# Verifying .frm and .par files
# Verifying that there are no MyISAM files
Warnings:
Warning 1618 <INDEX DIRECTORY> option ignored
Warning 1618 <INDEX DIRECTORY> option ignored
SHOW WARNINGS;
Level Code Message
Warning 1618 <INDEX DIRECTORY> option ignored
Warning 1618 <INDEX DIRECTORY> option ignored
# Verifying .frm, .par, .isl & .ibd files
---- MYSQLD_DATADIR/test
t1#P#p0.isl
t1#P#p1.isl
t1.frm
t1.par
---- MYSQLTEST_VARDIR/mysql-test-data-dir/test
t1#P#p0.ibd
t1#P#p1.ibd
# The ibd tablespaces should not be directly under the DATA DIRECTORY
---- MYSQLTEST_VARDIR/mysql-test-data-dir
test
---- MYSQLTEST_VARDIR/mysql-test-idx-dir
FLUSH TABLES;
SHOW CREATE TABLE t1;
Table Create Table
@ -22,17 +70,61 @@ t1 CREATE TABLE `t1` (
`c1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH (c1)
(PARTITION p0 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = InnoDB,
PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = InnoDB) */
ALTER TABLE t1 ENGINE = MyISAM;
# Verifying .frm, .par and MyISAM files (.MYD, MYI)
FLUSH TABLES;
(PARTITION p0 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = InnoDB,
PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = InnoDB) */
#
# Verify that the DATA/INDEX DIRECTORY is stored and used if we
# ALTER TABLE to MyISAM.
#
ALTER TABLE t1 engine=MyISAM;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH (c1)
(PARTITION p0 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM,
PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */
(PARTITION p0 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = MyISAM,
PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = MyISAM) */
# Verifying .frm, .par and MyISAM files (.MYD, MYI)
---- MYSQLD_DATADIR/test
t1#P#p0.MYD
t1#P#p0.MYI
t1#P#p1.MYD
t1#P#p1.MYI
t1.frm
t1.par
---- MYSQLTEST_VARDIR/mysql-test-data-dir
t1#P#p0.MYD
t1#P#p1.MYD
test
---- MYSQLTEST_VARDIR/mysql-test-idx-dir
#
# Now verify that the DATA DIRECTORY is used again if we
# ALTER TABLE back to InnoDB.
#
SET SESSION innodb_strict_mode = ON;
ALTER TABLE t1 engine=InnoDB;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH (c1)
(PARTITION p0 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = InnoDB,
PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = InnoDB) */
# Verifying .frm, .par, .isl and InnoDB .ibd files
---- MYSQLD_DATADIR/test
t1#P#p0.isl
t1#P#p1.isl
t1.frm
t1.par
---- MYSQLTEST_VARDIR/mysql-test-data-dir
test
---- MYSQLTEST_VARDIR/mysql-test-idx-dir
---- MYSQLTEST_VARDIR/mysql-test-data-dir/test
t1#P#p0.ibd
t1#P#p1.ibd
DROP TABLE t1;
#
# Cleanup
#

View File

@ -1,5 +1,5 @@
SET @max_row = 20;
SET @@session.storage_engine = 'MyISAM';
SET @@session.default_storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables

File diff suppressed because it is too large Load Diff

View File

@ -4151,8 +4151,6 @@ t1#P#p0.MYD
t1#P#p0.MYI
t1#P#p10.MYD
t1#P#p10.MYI
t1#P#p20.MYD
t1#P#p20.MYI
t1.frm
t1.par
SHOW CREATE TABLE t1;
@ -4163,8 +4161,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) */
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) */
SELECT * FROM t1;
a b
1 Original from partition p0
@ -4296,6 +4293,8 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Lost connection to MySQL server during query
# State after crash (before recovery)
#sql-t1.frm
#sql-t1.par
t1#P#p0.MYD
t1#P#p0.MYI
t1#P#p10#TMP#.MYD
@ -5348,8 +5347,6 @@ t1#P#p0.MYD
t1#P#p0.MYI
t1#P#p10.MYD
t1#P#p10.MYI
t1#P#p20.MYD
t1#P#p20.MYI
t1.frm
t1.par
SHOW CREATE TABLE t1;
@ -5360,8 +5357,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) */
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) */
SELECT * FROM t1;
a b
1 Original from partition p0
@ -5416,8 +5412,6 @@ t1#P#p0.MYD
t1#P#p0.MYI
t1#P#p10.MYD
t1#P#p10.MYI
t1#P#p20.MYD
t1#P#p20.MYI
t1.frm
t1.par
SHOW CREATE TABLE t1;
@ -5428,8 +5422,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM,
PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM,
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) */
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) */
SELECT * FROM t1;
a b
1 Original from partition p0

View File

@ -1,5 +1,5 @@
SET @max_row = 20;
SET @@session.storage_engine = 'InnoDB';
SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables

View File

@ -1,5 +1,5 @@
SET @max_row = 20;
SET @@session.storage_engine = 'MyISAM';
SET @@session.default_storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables

View File

@ -1,5 +1,5 @@
SET @max_row = 20;
SET @@session.storage_engine = 'InnoDB';
SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables

View File

@ -1,5 +1,5 @@
SET @max_row = 20;
SET @@session.storage_engine = 'MyISAM';
SET @@session.default_storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables

View File

@ -42,12 +42,12 @@ SET @max_row = 20;
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
# This test relies on connecting externally from mysqltest, doesn't
# work with embedded.
--source include/not_embedded.inc
# The server must support partitioning.
--source include/have_partition.inc
# Does not work with --embedded
--source include/not_embedded.inc
#------------------------------------------------------------------------------#
# Engine specific settings and requirements

View File

@ -14,16 +14,20 @@
# Change Author: mattiasj #
# Change Date: 2008-03-16 #
# Change: Replaced all test with alter -> myisam, since innodb does not support#
# DATA/INDEX DIRECTORY #
# Change Author: Kevin lewis #
# Change Date: 2012-03-02 #
# Change: WL5980 activates DATA DIRECTORY for InnoDB #
################################################################################
# NOTE: Until InnoDB supports DATA/INDEX DIR, test that a partitioned table
# remembers the DATA/INDEX DIR and it is used if altered to MyISAM
# NOTE: As of WL5980, InnoDB supports DATA DIRECTORY, but not INDEX DIRECTORY.
# See innodb.innodb-tablespace for tests using partition engine, innodb
# and DATADIRECTORY. The purpose of this test is to show that a
# partitioned table remembers the DATA/INDEX DIR and it is used if
# altered to MyISAM
#
--echo # Will not run partition_basic_symlink on InnoDB, since it is the same
--echo # as partition_basic, since InnoDB does not support DATA/INDEX DIR
--echo # Will only verify that the DATA/INDEX DIR is stored and used if
--echo # ALTER to MyISAM.
--echo #
--echo # Verify that the DATA/INDEX DIR is stored and used if ALTER to MyISAM.
--echo #
--source include/have_innodb.inc
# The server must support partitioning.
--source include/have_partition.inc
@ -32,17 +36,57 @@
# windows does not support symlink for DATA/INDEX DIRECTORY.
--source include/not_windows.inc
# Does not work with --embedded
--source include/not_embedded.inc
--disable_query_log
let $MYSQLD_DATADIR= `select @@datadir`;
# These values can change during the test
LET $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
LET $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`;
--enable_query_log
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
let $MYSQLD_DATADIR= `select @@datadir`;
--mkdir $MYSQLTEST_VARDIR/mysql-test-data-dir
--mkdir $MYSQLTEST_VARDIR/mysql-test-idx-dir
SET SESSION innodb_strict_mode = ON;
--echo #
--echo # InnoDB only supports DATA DIRECTORY with innodb_file_per_table=ON
--echo #
SET GLOBAL innodb_file_per_table = OFF;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (c1 INT)
ENGINE = InnoDB
--error ER_CANT_CREATE_TABLE
eval CREATE TABLE t1 (c1 INT) ENGINE = InnoDB
PARTITION BY HASH (c1) (
PARTITION p0
DATA DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-data-dir'
INDEX DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-idx-dir',
PARTITION p1
DATA DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-data-dir'
INDEX DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-idx-dir'
);
--replace_result ./ MYSQLD_DATADIR/ $MYSQLD_DATADIR MYSQLD_DATADIR
SHOW WARNINGS;
--echo #
--echo # InnoDB is different from MyISAM in that it uses a text file
--echo # with an '.isl' extension instead of a symbolic link so that
--echo # the tablespace can be re-located on any OS. Also, instead of
--echo # putting the file directly into the DATA DIRECTORY,
--echo # it adds a folder under it with the name of the database.
--echo # Since strict mode is off, InnoDB ignores the INDEX DIRECTORY
--echo # and it is no longer part of the definition.
--echo #
SET SESSION innodb_strict_mode = OFF;
SET GLOBAL innodb_file_per_table = ON;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 (c1 INT) ENGINE = InnoDB
PARTITION BY HASH (c1)
(PARTITION p0
DATA DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-data-dir'
@ -51,116 +95,70 @@ PARTITION BY HASH (c1)
DATA DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-data-dir'
INDEX DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-idx-dir'
);
--echo # Verifying .frm and .par files
--file_exists $MYSQLD_DATADIR/test/t1.frm
--file_exists $MYSQLD_DATADIR/test/t1.par
--echo # Verifying that there are no MyISAM files
--error 1
--file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYD
--error 1
--file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYI
--error 1
--file_exists $MYSQLD_DATADIR/test/t1#P#p1.MYD
--error 1
--file_exists $MYSQLD_DATADIR/test/t1#P#p1.MYI
--error 1
--file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p0.MYD
--error 1
--file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p0.MYI
--error 1
--file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.MYD
--error 1
--file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p1.MYI
SHOW WARNINGS;
--echo # Verifying .frm, .par, .isl & .ibd files
--echo ---- MYSQLD_DATADIR/test
--list_files $MYSQLD_DATADIR/test
--echo ---- MYSQLTEST_VARDIR/mysql-test-data-dir/test
--list_files $MYSQLTEST_VARDIR/mysql-test-data-dir/test
--echo # The ibd tablespaces should not be directly under the DATA DIRECTORY
--echo ---- MYSQLTEST_VARDIR/mysql-test-data-dir
--list_files $MYSQLTEST_VARDIR/mysql-test-data-dir
--echo ---- MYSQLTEST_VARDIR/mysql-test-idx-dir
--list_files $MYSQLTEST_VARDIR/mysql-test-idx-dir
FLUSH TABLES;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
SHOW CREATE TABLE t1;
ALTER TABLE t1 ENGINE = MyISAM;
--echo #
--echo # Verify that the DATA/INDEX DIRECTORY is stored and used if we
--echo # ALTER TABLE to MyISAM.
--echo #
ALTER TABLE t1 engine=MyISAM;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
SHOW CREATE TABLE t1;
--echo # Verifying .frm, .par and MyISAM files (.MYD, MYI)
--file_exists $MYSQLD_DATADIR/test/t1.frm
--file_exists $MYSQLD_DATADIR/test/t1.par
--file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYD
--file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYI
--file_exists $MYSQLD_DATADIR/test/t1#P#p1.MYD
--file_exists $MYSQLD_DATADIR/test/t1#P#p1.MYI
--file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p0.MYD
--file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p0.MYI
--file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.MYD
--file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p1.MYI
FLUSH TABLES;
--echo ---- MYSQLD_DATADIR/test
--list_files $MYSQLD_DATADIR/test
--echo ---- MYSQLTEST_VARDIR/mysql-test-data-dir
--list_files $MYSQLTEST_VARDIR/mysql-test-data-dir
--echo ---- MYSQLTEST_VARDIR/mysql-test-idx-dir
--list_files $MYSQLTEST_VARDIR/mysql-test-idx-dir
--echo #
--echo # Now verify that the DATA DIRECTORY is used again if we
--echo # ALTER TABLE back to InnoDB.
--echo #
SET SESSION innodb_strict_mode = ON;
ALTER TABLE t1 engine=InnoDB;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
SHOW CREATE TABLE t1;
--echo # Verifying .frm, .par, .isl and InnoDB .ibd files
--echo ---- MYSQLD_DATADIR/test
--list_files $MYSQLD_DATADIR/test
--echo ---- MYSQLTEST_VARDIR/mysql-test-data-dir
--list_files $MYSQLTEST_VARDIR/mysql-test-data-dir
--echo ---- MYSQLTEST_VARDIR/mysql-test-idx-dir
--list_files $MYSQLTEST_VARDIR/mysql-test-idx-dir
--echo ---- MYSQLTEST_VARDIR/mysql-test-data-dir/test
--list_files $MYSQLTEST_VARDIR/mysql-test-data-dir/test
DROP TABLE t1;
--echo #
--echo # Cleanup
--echo #
--rmdir $MYSQLTEST_VARDIR/mysql-test-data-dir/test
--rmdir $MYSQLTEST_VARDIR/mysql-test-data-dir
--rmdir $MYSQLTEST_VARDIR/mysql-test-idx-dir
--exit
# here is the old test, which is tested by partition_basic_innodb
#
# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE !
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
--disable_query_log
EVAL SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig;
EVAL SET SESSION innodb_strict_mode=$innodb_strict_mode_orig;
--enable_query_log
#------------------------------------------------------------------------------#
# General not engine specific settings and requirements
##### Options, for debugging support #####
let $debug= 0;
let $with_partitioning= 1;
##### Option, for displaying files #####
let $ls= 1;
##### Number of rows for the INSERT/UPDATE/DELETE/SELECT experiments #####
# on partioned tables
SET @max_row = 20;
##### Execute more tests #####
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
# The server must support partitioning.
--source include/have_partition.inc
# The server must support symlink for DATA/INDEX DIRECTORY.
--source include/have_symlink.inc
# windows does not support symlink for DATA/INDEX DIRECTORY.
--source include/not_windows.inc
#------------------------------------------------------------------------------#
# Engine specific settings and requirements
##### Storage engine to be tested
--source include/have_innodb.inc
let $engine= 'InnoDB';
##### Execute the test of "table" files
# InnoDB has no files per PK, UI, ...
let $do_file_tests= 0;
##### Execute PRIMARY KEY tests #####
# AFAIK InnoDB clusters the table around PRIMARY KEYs.
let $do_pk_tests= 1;
##### Assign a big number smaller than the maximum value for partitions #####
# and smaller than the maximum value of SIGNED INTEGER
let $MAX_VALUE= (2147483646);
# Generate the prerequisites ($variables, @variables, tables) needed
--source suite/parts/inc/partition.pre
##### Workarounds for known open engine specific bugs
# none
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_basic_symlink.inc
#------------------------------------------------------------------------------#
# Execute storage engine specific tests
#------------------------------------------------------------------------------#
# Cleanup
--source suite/parts/inc/partition_cleanup.inc

View File

@ -1,10 +1,12 @@
# Partitioning test that require debug features
# Partitioning test that require debug features and InnoDB
# including crashing tests.
--source include/have_debug.inc
--source include/have_innodb.inc
--source include/have_partition.inc
# Don't test this under valgrind, memory leaks will occur
--source include/not_valgrind.inc
# Crash tests don't work with embedded
--source include/not_embedded.inc
--disable_warnings
@ -13,6 +15,9 @@ DROP TABLE IF EXISTS t1;
--let $DATADIR= `SELECT @@datadir;`
# Waiting for wl#6723
if (0)
{
--echo #
--echo # Bug#12696518/Bug#11766879/60106:DIFF BETWEEN # OF INDEXES IN MYSQL
--echo # VS INNODB, PARTITONING, ON INDEX CREATE
@ -47,6 +52,7 @@ SELECT * FROM t1;
SET SESSION debug_dbug = "-d,ha_partition_fail_final_add_index";
SHOW CREATE TABLE t1;
DROP TABLE t1;
}
# Checking with #innodb what this is...
call mtr.add_suppression("InnoDB: Warning: allocated tablespace .*, old maximum was");
@ -60,3 +66,26 @@ let $engine= 'InnoDB';
--echo # Test crash and failure recovery in fast_alter_partition_table.
--source suite/parts/inc/partition_mgm_crash.inc
--echo #
--echo # WL#4445: EXCHANGE PARTITION WITH TABLE
--echo # Verify ddl_log and InnoDB in case of crashing.
# Investigating if this warning is OK when crash testing.
call mtr.add_suppression("InnoDB: Warning: allocated tablespace .*, old maximum was ");
#
call mtr.add_suppression("Attempting backtrace. You can use the following information to find out");
call mtr.add_suppression("table .* does not exist in the InnoDB internal");
let $create_statement= CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = InnoDB
PARTITION BY RANGE (a)
(PARTITION p0 VALUES LESS THAN (10),
PARTITION p1 VALUES LESS THAN MAXVALUE);
let $insert_statement= INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
let $create_statement2= CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
let $insert_statement2= INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
let $crash_statement= ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
--source suite/parts/inc/partition_crash_exchange.inc
let $fail_statement= $crash_statement;
--source suite/parts/inc/partition_fail_exchange.inc