Commit 8c0300da authored by istruewing@stella.local's avatar istruewing@stella.local

Merge stella.local:/home2/mydev/mysql-5.1-ateam

into  stella.local:/home2/mydev/mysql-5.1-axmrg
parents 7157f0d2 65992efc
...@@ -3,13 +3,13 @@ partition by range (a) ...@@ -3,13 +3,13 @@ partition by range (a)
subpartition by hash (a) subpartition by hash (a)
(partition p0 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' (partition p0 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp'
(SUBPARTITION subpart00, SUBPARTITION subpart01)); (SUBPARTITION subpart00, SUBPARTITION subpart01));
Checking if file exists before alter # Checking if file exists before alter
ALTER TABLE t1 REORGANIZE PARTITION p0 INTO ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
(partition p1 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' (partition p1 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp'
(SUBPARTITION subpart10, SUBPARTITION subpart11), (SUBPARTITION subpart10, SUBPARTITION subpart11),
partition p2 VALUES LESS THAN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' partition p2 VALUES LESS THAN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp'
(SUBPARTITION subpart20, SUBPARTITION subpart21)); (SUBPARTITION subpart20, SUBPARTITION subpart21));
Checking if file exists after alter # Checking if file exists after alter
drop table t1; drop table t1;
set @org_mode=@@sql_mode; set @org_mode=@@sql_mode;
set @@sql_mode='NO_DIR_IN_CREATE'; set @@sql_mode='NO_DIR_IN_CREATE';
...@@ -36,11 +36,11 @@ set @@sql_mode=@org_mode; ...@@ -36,11 +36,11 @@ set @@sql_mode=@org_mode;
CREATE TABLE t1(a INT) CREATE TABLE t1(a INT)
PARTITION BY KEY (a) PARTITION BY KEY (a)
(PARTITION p0 DATA DIRECTORY 'TEST_DIR/master-data/test'); (PARTITION p0 DATA DIRECTORY 'TEST_DIR/master-data/test');
ERROR HY000: Incorrect arguments to DATA DIRECORY ERROR HY000: Incorrect arguments to DATA DIRECTORY
CREATE TABLE t1(a INT) CREATE TABLE t1(a INT)
PARTITION BY KEY (a) PARTITION BY KEY (a)
(PARTITION p0 INDEX DIRECTORY 'TEST_DIR/master-data/test'); (PARTITION p0 INDEX DIRECTORY 'TEST_DIR/master-data/test');
ERROR HY000: Incorrect arguments to INDEX DIRECORY ERROR HY000: Incorrect arguments to INDEX DIRECTORY
CREATE TABLE ts (id INT, purchased DATE) CREATE TABLE ts (id INT, purchased DATE)
PARTITION BY RANGE(YEAR(purchased)) PARTITION BY RANGE(YEAR(purchased))
SUBPARTITION BY HASH(TO_DAYS(purchased)) ( SUBPARTITION BY HASH(TO_DAYS(purchased)) (
...@@ -50,7 +50,7 @@ DATA DIRECTORY = 'TEST_DIR/master-data/test', ...@@ -50,7 +50,7 @@ DATA DIRECTORY = 'TEST_DIR/master-data/test',
SUBPARTITION s0b SUBPARTITION s0b
DATA DIRECTORY = 'TEST_DIR/master-data/test' DATA DIRECTORY = 'TEST_DIR/master-data/test'
)); ));
ERROR HY000: Incorrect arguments to DATA DIRECORY ERROR HY000: Incorrect arguments to DATA DIRECTORY
CREATE TABLE ts (id INT, purchased DATE) CREATE TABLE ts (id INT, purchased DATE)
PARTITION BY RANGE(YEAR(purchased)) PARTITION BY RANGE(YEAR(purchased))
SUBPARTITION BY HASH(TO_DAYS(purchased)) ( SUBPARTITION BY HASH(TO_DAYS(purchased)) (
...@@ -60,7 +60,7 @@ INDEX DIRECTORY = 'TEST_DIR/master-data/test', ...@@ -60,7 +60,7 @@ INDEX DIRECTORY = 'TEST_DIR/master-data/test',
SUBPARTITION s0b SUBPARTITION s0b
INDEX DIRECTORY = 'TEST_DIR/master-data/test' INDEX DIRECTORY = 'TEST_DIR/master-data/test'
)); ));
ERROR HY000: Incorrect arguments to INDEX DIRECORY ERROR HY000: Incorrect arguments to INDEX DIRECTORY
DROP TABLE IF EXISTS `example`; DROP TABLE IF EXISTS `example`;
CREATE TABLE `example` ( CREATE TABLE `example` (
`ID_EXAMPLE` int(10) unsigned NOT NULL AUTO_INCREMENT, `ID_EXAMPLE` int(10) unsigned NOT NULL AUTO_INCREMENT,
...@@ -69,9 +69,27 @@ CREATE TABLE `example` ( ...@@ -69,9 +69,27 @@ CREATE TABLE `example` (
PRIMARY KEY (`ID_EXAMPLE`) PRIMARY KEY (`ID_EXAMPLE`)
) ENGINE = MYISAM ) ENGINE = MYISAM
PARTITION BY HASH(ID_EXAMPLE)( PARTITION BY HASH(ID_EXAMPLE)(
PARTITION p0 DATA DIRECTORY = '/build/5.1/data/partitiontest/p0Data', PARTITION p0 DATA DIRECTORY = 'MYSQLTEST_VARDIR/p0Data'
PARTITION p1 DATA DIRECTORY = '/build/5.1/data/partitiontest/p1Data', INDEX DIRECTORY = 'MYSQLTEST_VARDIR/p0Index',
PARTITION p2 DATA DIRECTORY = '/build/5.1/data/partitiontest/p2Data', PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/p1Data'
PARTITION p3 DATA DIRECTORY = '/build/5.1/data/partitiontest/p3Data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/p1Index',
PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/p2Data'
INDEX DIRECTORY = 'MYSQLTEST_VARDIR/p2Index',
PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/p3Data'
INDEX DIRECTORY = 'MYSQLTEST_VARDIR/p3Index'
); );
ERROR HY000: Can't create/write to file '/build/5.1/data/partitiontest/p0Data/example#P#p0.MYD' (Errcode: 2) # Checking that MyISAM .MYD and .MYI are in test db and data/idx dir
DROP TABLE example;
CREATE TABLE `example` (
`ID_EXAMPLE` int(10) unsigned NOT NULL AUTO_INCREMENT,
`DESCRIPTION` varchar(30) NOT NULL,
`LEVEL` smallint(5) unsigned DEFAULT NULL,
PRIMARY KEY (`ID_EXAMPLE`)
) ENGINE = MYISAM
PARTITION BY HASH(ID_EXAMPLE)(
PARTITION p0 DATA DIRECTORY = '/not/existent/p0Data',
PARTITION p1 DATA DIRECTORY = '/not/existent/p1Data',
PARTITION p2 DATA DIRECTORY = '/not/existent/p2Data',
PARTITION p3 DATA DIRECTORY = '/not/existent/p3Data'
);
Got one of the listed errors
...@@ -81,6 +81,13 @@ Got one of the listed errors ...@@ -81,6 +81,13 @@ Got one of the listed errors
DROP DATABASE mysqltest2; DROP DATABASE mysqltest2;
USE test; USE test;
DROP USER mysqltest_1@localhost; DROP USER mysqltest_1@localhost;
create table t2 (i int )
partition by range (i)
(
partition p01 values less than (1000)
data directory="MYSQLTEST_VARDIR/tmp"
index directory="MYSQLTEST_VARDIR/tmp"
);
set @org_mode=@@sql_mode; set @org_mode=@@sql_mode;
set @@sql_mode='NO_DIR_IN_CREATE'; set @@sql_mode='NO_DIR_IN_CREATE';
select @@sql_mode; select @@sql_mode;
......
...@@ -22,6 +22,7 @@ insert into t1 (b) select b from t2; ...@@ -22,6 +22,7 @@ insert into t1 (b) select b from t2;
insert into t2 (b) select b from t1; insert into t2 (b) select b from t1;
insert into t1 (b) select b from t2; insert into t1 (b) select b from t2;
drop table t2; drop table t2;
create table t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="MYSQLTEST_VARDIR/tmp" index directory="MYSQLTEST_VARDIR/run";
insert into t9 select * from t1; insert into t9 select * from t1;
check table t9; check table t9;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
...@@ -54,10 +55,16 @@ t9 CREATE TABLE `t9` ( ...@@ -54,10 +55,16 @@ t9 CREATE TABLE `t9` (
`d` int(11) NOT NULL, `d` int(11) NOT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=MyISAM AUTO_INCREMENT=16725 DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/' ) ENGINE=MyISAM AUTO_INCREMENT=16725 DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
create table t1 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="tmp";
Got one of the listed errors Got one of the listed errors
create database mysqltest;
create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="/this-dir-does-not-exist";
Got one of the listed errors Got one of the listed errors
create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="not-hard-path";
Got one of the listed errors Got one of the listed errors
create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="MYSQLTEST_VARDIR/run";
Got one of the listed errors Got one of the listed errors
create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="MYSQLTEST_VARDIR/tmp";
Got one of the listed errors Got one of the listed errors
alter table t9 rename mysqltest.t9; alter table t9 rename mysqltest.t9;
select count(*) from mysqltest.t9; select count(*) from mysqltest.t9;
...@@ -74,6 +81,7 @@ t9 CREATE TABLE `t9` ( ...@@ -74,6 +81,7 @@ t9 CREATE TABLE `t9` (
) ENGINE=MyISAM AUTO_INCREMENT=16725 DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/' ) ENGINE=MyISAM AUTO_INCREMENT=16725 DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
drop database mysqltest; drop database mysqltest;
create table t1 (a int not null) engine=myisam; create table t1 (a int not null) engine=myisam;
alter table t1 data directory="MYSQLTEST_VARDIR/tmp";
Warnings: Warnings:
Warning 0 DATA DIRECTORY option ignored Warning 0 DATA DIRECTORY option ignored
show create table t1; show create table t1;
...@@ -82,6 +90,7 @@ t1 CREATE TABLE `t1` ( ...@@ -82,6 +90,7 @@ t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL `a` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t1 add b int; alter table t1 add b int;
alter table t1 data directory="MYSQLTEST_VARDIR/log";
Warnings: Warnings:
Warning 0 DATA DIRECTORY option ignored Warning 0 DATA DIRECTORY option ignored
show create table t1; show create table t1;
...@@ -90,6 +99,7 @@ t1 CREATE TABLE `t1` ( ...@@ -90,6 +99,7 @@ t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL, `a` int(11) NOT NULL,
`b` int(11) DEFAULT NULL `b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t1 index directory="MYSQLTEST_VARDIR/log";
Warnings: Warnings:
Warning 0 INDEX DIRECTORY option ignored Warning 0 INDEX DIRECTORY option ignored
show create table t1; show create table t1;
...@@ -102,18 +112,20 @@ drop table t1; ...@@ -102,18 +112,20 @@ drop table t1;
CREATE TABLE t1(a INT) CREATE TABLE t1(a INT)
DATA DIRECTORY='TEST_DIR/tmp' DATA DIRECTORY='TEST_DIR/tmp'
INDEX DIRECTORY='TEST_DIR/tmp'; INDEX DIRECTORY='TEST_DIR/tmp';
ERROR HY000: Can't create/write to file 'TEST_DIR/tmp/t1.MYI' (Errcode: 17) Got one of the listed errors
CREATE TABLE t2(a INT) CREATE TABLE t2(a INT)
DATA DIRECTORY='TEST_DIR/tmp' DATA DIRECTORY='TEST_DIR/tmp'
INDEX DIRECTORY='TEST_DIR/tmp'; INDEX DIRECTORY='TEST_DIR/tmp';
RENAME TABLE t2 TO t1; RENAME TABLE t2 TO t1;
ERROR HY000: Can't create/write to file 'TEST_DIR/tmp/t1.MYI' (Errcode: 17) ERROR HY000: Can't create/write to file 'TEST_DIR/tmp/t1.MYI' (Errcode: 17)
DROP TABLE t2; DROP TABLE t2;
create temporary table t1 (a int) engine=myisam data directory="MYSQLTEST_VARDIR/log" select 9 a;
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TEMPORARY TABLE `t1` ( t1 CREATE TEMPORARY TABLE `t1` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/log/' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/log/'
create temporary table t1 (a int) engine=myisam data directory="MYSQLTEST_VARDIR/log" select 99 a;
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TEMPORARY TABLE `t1` ( t1 CREATE TEMPORARY TABLE `t1` (
......
...@@ -16,144 +16,29 @@ ...@@ -16,144 +16,29 @@
--enable_abort_on_error --enable_abort_on_error
--echo --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= ; 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 # DATA DIRECTORY
# Make directory for partition index # Make directory for partition data
--exec mkdir $MYSQLTEST_VARDIR/master-data/test/index || true let $data_dir_path= $MYSQLTEST_VARDIR/mysql-test-data-dir;
eval SET @indx_dir = 'INDEX DIRECTORY = --mkdir $data_dir_path
''''$MYSQLTEST_VARDIR/master-data/test/index'''''; let $data_directory= DATA DIRECTORY = '$data_dir_path';
let $index_directory = `select @indx_dir`;
let $with_directories= TRUE; #INDEX DIRECTORY
--source suite/parts/inc/partition_methods1.inc # Make directory for partition index
let $with_directories= FALSE; let $idx_dir_path= $MYSQLTEST_VARDIR/mysql-test-idx-dir;
--enable_query_log --mkdir $idx_dir_path
# let $index_directory= INDEX DIRECTORY = '$idx_dir_path';
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
--echo #------------------------------------------------------------------------ let $with_directories= 1;
--echo # 3 Tables with PRIMARY KEY and/or UNIQUE INDEXes --echo #========================================================================
--echo # The partitioning function contains two columns. --echo # 0.5 use partition_basic with DATA/INDEX DIRECTORY
--echo #------------------------------------------------------------------------ --echo #========================================================================
# --source suite/parts/inc/partition_basic.inc
if ($more_pk_ui_tests) --echo #========================================================================
{ --echo # 5 use partition_directory with DATA/INDEX DIRECTORY
if ($do_pk_tests) --echo #========================================================================
{ --source suite/parts/inc/partition_directory.inc
--echo # 3.1 PRIMARY KEY consisting of two columns --rmdir $data_dir_path
let $unique= , PRIMARY KEY(f_int1,f_int2); --rmdir $idx_dir_path
--source suite/parts/inc/partition_methods2.inc let $with_directories= 0;
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
...@@ -29,41 +29,35 @@ let $partitioning= ; ...@@ -29,41 +29,35 @@ let $partitioning= ;
if ($with_partitioning) if ($with_partitioning)
{ {
let $partitioning= PARTITION BY HASH(f_int1) PARTITIONS 2; let $partitioning= PARTITION BY HASH(f_int1) PARTITIONS 2;
--disable_query_log
if ($with_directories) if ($with_directories)
{ {
eval SET @aux = let $partitioning=
'PARTITION BY HASH(f_int1) PARTITIONS 2 PARTITION BY HASH(f_int1) PARTITIONS 2
(PARTITION p1 (PARTITION p1
$index_directory, $index_directory,
PARTITION p2 PARTITION p2
$index_directory)'; $index_directory);
let $partitioning= `SELECT @aux`;
} }
} }
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY KEY #----------- PARTITION BY KEY
--disable_query_log
if ($with_partitioning) if ($with_partitioning)
{ {
eval SET @aux = let $partitioning= PARTITION BY KEY(f_int1) PARTITIONS 5;
'PARTITION BY KEY(f_int1) PARTITIONS 5';
let $partitioning= `SELECT @aux`;
if ($with_directories) if ($with_directories)
{ {
--disable_query_log let $partitioning=
eval SET @aux = PARTITION BY HASH(f_int1) PARTITIONS 5
'PARTITION BY HASH(f_int1) PARTITIONS 5
(PARTITION p1 (PARTITION p1
$data_directory, $data_directory,
PARTITION p2 PARTITION p2
...@@ -73,27 +67,25 @@ $data_directory ...@@ -73,27 +67,25 @@ $data_directory
$index_directory, $index_directory,
PARTITION p4, PARTITION p4,
PARTITION p5 PARTITION p5
$index_directory)'; $index_directory);
let $partitioning= `SELECT @aux`;
} }
} }
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY LIST #----------- PARTITION BY LIST
--disable_query_log
if ($with_partitioning) if ($with_partitioning)
{ {
eval SET @aux = let $partitioning=
'PARTITION BY LIST(MOD(f_int1,4)) PARTITION BY LIST(MOD(f_int1,4))
(PARTITION part_3 VALUES IN (-3) (PARTITION part_3 VALUES IN (-3)
$index_directory, $index_directory,
PARTITION part_2 VALUES IN (-2) PARTITION part_2 VALUES IN (-2)
...@@ -109,25 +101,23 @@ $index_directory, ...@@ -109,25 +101,23 @@ $index_directory,
PARTITION part2 VALUES IN (2) PARTITION part2 VALUES IN (2)
$data_directory, $data_directory,
PARTITION part3 VALUES IN (3) PARTITION part3 VALUES IN (3)
$data_directory $index_directory)'; $data_directory $index_directory);
let $partitioning= `SELECT @aux`;
} }
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY RANGE #----------- PARTITION BY RANGE
--disable_query_log
if ($with_partitioning) 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 parta VALUES LESS THAN (0)
$index_directory, $index_directory,
PARTITION partb VALUES LESS THAN ($max_row_div4) PARTITION partb VALUES LESS THAN ($max_row_div4)
...@@ -139,26 +129,24 @@ PARTITION partd VALUES LESS THAN ($max_row_div2 + $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) PARTITION parte VALUES LESS THAN ($max_row)
$data_directory, $data_directory,
PARTITION partf VALUES LESS THAN $MAX_VALUE PARTITION partf VALUES LESS THAN $MAX_VALUE
$index_directory)'; $index_directory);
let $partitioning= `SELECT @aux`;
} }
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY HASH #----------- PARTITION BY RANGE -- SUBPARTITION BY HASH
--disable_query_log
if ($with_partitioning) if ($with_partitioning)
{ {
eval SET @aux = let $partitioning=
'PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2
(PARTITION parta VALUES LESS THAN (0) (PARTITION parta VALUES LESS THAN (0)
$index_directory, $index_directory,
PARTITION partb VALUES LESS THAN ($max_row_div4) PARTITION partb VALUES LESS THAN ($max_row_div4)
...@@ -166,25 +154,23 @@ $data_directory, ...@@ -166,25 +154,23 @@ $data_directory,
PARTITION partc VALUES LESS THAN ($max_row_div2), PARTITION partc VALUES LESS THAN ($max_row_div2),
PARTITION partd VALUES LESS THAN $MAX_VALUE PARTITION partd VALUES LESS THAN $MAX_VALUE
$data_directory $data_directory
$index_directory)'; $index_directory);
let $partitioning= `SELECT @aux`;
} }
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY #----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
--disable_query_log
if ($with_partitioning) 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) (PARTITION part1 VALUES LESS THAN (0)
$data_directory $data_directory
(SUBPARTITION subpart11, SUBPARTITION subpart12), (SUBPARTITION subpart11, SUBPARTITION subpart12),
...@@ -196,26 +182,24 @@ $data_directory ...@@ -196,26 +182,24 @@ $data_directory
$index_directory $index_directory
(SUBPARTITION subpart31, SUBPARTITION subpart32), (SUBPARTITION subpart31, SUBPARTITION subpart32),
PARTITION part4 VALUES LESS THAN $MAX_VALUE PARTITION part4 VALUES LESS THAN $MAX_VALUE
(SUBPARTITION subpart41, SUBPARTITION subpart42))'; (SUBPARTITION subpart41, SUBPARTITION subpart42));
let $partitioning= `SELECT @aux`;
} }
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH #----------- PARTITION BY LIST -- SUBPARTITION BY HASH
--disable_query_log
if ($with_partitioning) if ($with_partitioning)
{ {
eval SET @aux = let $partitioning=
'PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1)
(PARTITION part1 VALUES IN (0) (PARTITION part1 VALUES IN (0)
$index_directory $index_directory
(SUBPARTITION sp11 (SUBPARTITION sp11
...@@ -239,15 +223,14 @@ eval SET @aux = ...@@ -239,15 +223,14 @@ eval SET @aux =
$index_directory, $index_directory,
SUBPARTITION sp42 SUBPARTITION sp42
$data_directory $data_directory
$index_directory))'; $index_directory));
let $partitioning= `SELECT @aux`;
} }
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
......
...@@ -38,7 +38,8 @@ if ($do_file_tests) ...@@ -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 --exec ls $MYSQLTEST_VARDIR/master-data/test/t1* > $MYSQLTEST_VARDIR/master-data/test/tmp2 2>&1 || true
if ($with_directories) 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'' eval SET @aux = CONCAT('load_file(''$MYSQLTEST_VARDIR','/master-data/test/tmp2''
)'); )');
......
...@@ -32,6 +32,11 @@ if ($do_file_tests) ...@@ -32,6 +32,11 @@ if ($do_file_tests)
{ {
# List the files belonging to the table t1 # 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 --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'')'); eval SET @aux = CONCAT('load_file(''$MYSQLTEST_VARDIR','/master-data/test/tmp2'')');
let $file_list= `SELECT @aux`; let $file_list= `SELECT @aux`;
} }
......
...@@ -44,42 +44,38 @@ let $partitioning= ; ...@@ -44,42 +44,38 @@ let $partitioning= ;
if ($with_partitioning) if ($with_partitioning)
{ {
let $partitioning= PARTITION BY HASH(f_int1) PARTITIONS 2; let $partitioning= PARTITION BY HASH(f_int1) PARTITIONS 2;
--disable_query_log
if ($with_directories) if ($with_directories)
{ {
eval SET @aux = let $partitioning=
'PARTITION BY HASH(f_int1) PARTITIONS 2 PARTITION BY HASH(f_int1) PARTITIONS 2
(PARTITION p1 (PARTITION p1
$data_directory $data_directory
$index_directory, $index_directory,
PARTITION p2 PARTITION p2
$data_directory $data_directory
$index_directory)'; $index_directory);
let $partitioning= `SELECT @aux`;
} }
} }
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY KEY #----------- PARTITION BY KEY
--disable_query_log
if ($with_partitioning) if ($with_partitioning)
{ {
eval SET @aux = let $partitioning=
'PARTITION BY KEY(f_int1) PARTITIONS 5'; PARTITION BY KEY(f_int1) PARTITIONS 5;
let $partitioning= `SELECT @aux`;
if ($with_directories) if ($with_directories)
{ {
eval SET @aux = let $partitioning=
'PARTITION BY HASH(f_int1) PARTITIONS 5 PARTITION BY KEY(f_int1) PARTITIONS 5
(PARTITION p1 (PARTITION p1
$data_directory $data_directory
$index_directory, $index_directory,
...@@ -94,27 +90,37 @@ $data_directory ...@@ -94,27 +90,37 @@ $data_directory
$index_directory, $index_directory,
PARTITION p5 PARTITION p5
$data_directory $data_directory
$index_directory)'; $index_directory);
let $partitioning= `SELECT @aux`;
} }
} }
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY LIST #----------- PARTITION BY LIST
--disable_query_log
if ($with_partitioning) if ($with_partitioning)
{ {
eval SET @aux = let $partitioning=
'PARTITION BY LIST(MOD(f_int1,4)) 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) (PARTITION part_3 VALUES IN (-3)
$data_directory $index_directory, $data_directory $index_directory,
PARTITION part_2 VALUES IN (-2) PARTITION part_2 VALUES IN (-2)
...@@ -130,25 +136,33 @@ $data_directory $index_directory, ...@@ -130,25 +136,33 @@ $data_directory $index_directory,
PARTITION part2 VALUES IN (2) PARTITION part2 VALUES IN (2)
$data_directory $index_directory, $data_directory $index_directory,
PARTITION part3 VALUES IN (3) PARTITION part3 VALUES IN (3)
$data_directory $index_directory)'; $data_directory $index_directory);
let $partitioning= `SELECT @aux`; }
} }
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY RANGE #----------- PARTITION BY RANGE
--disable_query_log
if ($with_partitioning) 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) (PARTITION parta VALUES LESS THAN (0)
$data_directory $data_directory
$index_directory, $index_directory,
...@@ -166,26 +180,33 @@ $data_directory ...@@ -166,26 +180,33 @@ $data_directory
$index_directory, $index_directory,
PARTITION partf VALUES LESS THAN $MAX_VALUE PARTITION partf VALUES LESS THAN $MAX_VALUE
$data_directory $data_directory
$index_directory)'; $index_directory);
let $partitioning= `SELECT @aux`;
} }
}
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY HASH #----------- PARTITION BY RANGE -- SUBPARTITION BY HASH
--disable_query_log
if ($with_partitioning) if ($with_partitioning)
{ {
eval SET @aux = let $partitioning=
'PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 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) (PARTITION parta VALUES LESS THAN (0)
$data_directory $data_directory
$index_directory, $index_directory,
...@@ -197,60 +218,81 @@ $data_directory ...@@ -197,60 +218,81 @@ $data_directory
$index_directory, $index_directory,
PARTITION partd VALUES LESS THAN $MAX_VALUE PARTITION partd VALUES LESS THAN $MAX_VALUE
$data_directory $data_directory
$index_directory)'; $index_directory);
let $partitioning= `SELECT @aux`; }
} }
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY #----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
--disable_query_log
if ($with_partitioning) 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) (PARTITION part1 VALUES LESS THAN (0)
$data_directory
$index_directory
(SUBPARTITION subpart11, SUBPARTITION subpart12), (SUBPARTITION subpart11, SUBPARTITION subpart12),
PARTITION part2 VALUES LESS THAN ($max_row_div4) PARTITION part2 VALUES LESS THAN ($max_row_div4)
$data_directory
$index_directory
(SUBPARTITION subpart21, SUBPARTITION subpart22), (SUBPARTITION subpart21, SUBPARTITION subpart22),
PARTITION part3 VALUES LESS THAN ($max_row_div2) PARTITION part3 VALUES LESS THAN ($max_row_div2)
$data_directory
$index_directory
(SUBPARTITION subpart31, SUBPARTITION subpart32), (SUBPARTITION subpart31, SUBPARTITION subpart32),
PARTITION part4 VALUES LESS THAN $MAX_VALUE PARTITION part4 VALUES LESS THAN $MAX_VALUE
$data_directory (SUBPARTITION subpart41, SUBPARTITION subpart42));
$index_directory if ($with_directories)
(SUBPARTITION subpart41, SUBPARTITION subpart42))'; {
let $partitioning= `SELECT @aux`; 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 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH #----------- PARTITION BY LIST -- SUBPARTITION BY HASH
--disable_query_log
if ($with_partitioning) if ($with_partitioning)
{ {
eval SET @aux = let $partitioning=
'PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) 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) (PARTITION part1 VALUES IN (0)
$data_directory $data_directory
$index_directory $index_directory
...@@ -282,26 +324,33 @@ eval SET @aux = ...@@ -282,26 +324,33 @@ eval SET @aux =
$index_directory, $index_directory,
SUBPARTITION sp42 SUBPARTITION sp42
$data_directory $data_directory
$index_directory))'; $index_directory));
let $partitioning= `SELECT @aux`; }
} }
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
#----------- PARTITION BY LIST -- SUBPARTITION BY KEY #----------- PARTITION BY LIST -- SUBPARTITION BY KEY
--disable_query_log
if ($with_partitioning) if ($with_partitioning)
{ {
eval SET @aux = let $partitioning=
'PARTITION BY LIST(ABS(MOD(f_int1,2))) 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 SUBPARTITION BY KEY(f_int1) SUBPARTITIONS $sub_part_no
(PARTITION part1 VALUES IN (0) (PARTITION part1 VALUES IN (0)
$data_directory $data_directory
...@@ -311,17 +360,16 @@ SUBPARTITION BY KEY(f_int1) SUBPARTITIONS $sub_part_no ...@@ -311,17 +360,16 @@ SUBPARTITION BY KEY(f_int1) SUBPARTITIONS $sub_part_no
$index_directory, $index_directory,
PARTITION part3 VALUES IN (NULL) PARTITION part3 VALUES IN (NULL)
$data_directory $data_directory
$index_directory)'; $index_directory);
let $partitioning= `SELECT @aux`; }
} }
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
) )
$partitioning; $partitioning;
--enable_query_log
eval $insert_all; eval $insert_all;
--source suite/parts/inc/partition_check.inc --source suite/parts/inc/partition_check.inc
DROP TABLE t1; DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc --source suite/parts/inc/partition_check_drop.inc
let $with_directories= FALSE;
...@@ -43,7 +43,19 @@ let $partitioning= ; ...@@ -43,7 +43,19 @@ let $partitioning= ;
if ($with_partitioning) if ($with_partitioning)
{ {
let $partitioning= PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2; 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 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
...@@ -57,7 +69,28 @@ DROP TABLE t1; ...@@ -57,7 +69,28 @@ DROP TABLE t1;
if ($with_partitioning) if ($with_partitioning)
{ {
let $partitioning= PARTITION BY KEY(f_int1,f_int2) PARTITIONS 5; 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 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
...@@ -79,7 +112,29 @@ let $partitioning= PARTITION BY LIST(MOD(f_int1 + f_int2,4)) ...@@ -79,7 +112,29 @@ let $partitioning= PARTITION BY LIST(MOD(f_int1 + f_int2,4))
PARTITION part1 VALUES IN (1), PARTITION part1 VALUES IN (1),
PARTITION part2 VALUES IN (2), PARTITION part2 VALUES IN (2),
PARTITION part3 VALUES IN (3)); 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 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
...@@ -92,17 +147,37 @@ DROP TABLE t1; ...@@ -92,17 +147,37 @@ DROP TABLE t1;
#----------- PARTITION BY RANGE #----------- PARTITION BY RANGE
if ($with_partitioning) if ($with_partitioning)
{ {
--disable_query_log let $partitioning= PARTITION BY RANGE((f_int1 + f_int2) DIV 2)
eval SET @aux = 'PARTITION BY RANGE((f_int1 + f_int2) DIV 2)
(PARTITION parta VALUES LESS THAN (0), (PARTITION parta VALUES LESS THAN (0),
PARTITION partb VALUES LESS THAN ($max_row_div4), PARTITION partb VALUES LESS THAN ($max_row_div4),
PARTITION partc VALUES LESS THAN ($max_row_div2), PARTITION partc VALUES LESS THAN ($max_row_div2),
PARTITION partd VALUES LESS THAN ($max_row_div2 + $max_row_div4), PARTITION partd VALUES LESS THAN ($max_row_div2 + $max_row_div4),
PARTITION parte VALUES LESS THAN ($max_row), PARTITION parte VALUES LESS THAN ($max_row),
PARTITION partf VALUES LESS THAN $MAX_VALUE)'; PARTITION partf VALUES LESS THAN $MAX_VALUE);
let $partitioning= `SELECT @aux`; if ($with_directories)
--enable_query_log {
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 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
...@@ -115,16 +190,31 @@ DROP TABLE t1; ...@@ -115,16 +190,31 @@ DROP TABLE t1;
#----------- PARTITION BY RANGE -- SUBPARTITION BY HASH #----------- PARTITION BY RANGE -- SUBPARTITION BY HASH
if ($with_partitioning) if ($with_partitioning)
{ {
--disable_query_log let $partitioning=
eval SET @aux = PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int2) SUBPARTITIONS 2
'PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int2) SUBPARTITIONS 2
(PARTITION parta VALUES LESS THAN (0), (PARTITION parta VALUES LESS THAN (0),
PARTITION partb VALUES LESS THAN ($max_row_div4), PARTITION partb VALUES LESS THAN ($max_row_div4),
PARTITION partc VALUES LESS THAN ($max_row_div2), PARTITION partc VALUES LESS THAN ($max_row_div2),
PARTITION partd VALUES LESS THAN $MAX_VALUE)'; PARTITION partd VALUES LESS THAN $MAX_VALUE);
let $partitioning= `SELECT @aux`; if ($with_directories)
--enable_query_log {
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 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
...@@ -137,8 +227,7 @@ DROP TABLE t1; ...@@ -137,8 +227,7 @@ DROP TABLE t1;
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY #----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
if ($with_partitioning) if ($with_partitioning)
{ {
--disable_query_log let $partitioning= PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int2)
eval SET @aux = 'PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int2)
(PARTITION part1 VALUES LESS THAN (0) (PARTITION part1 VALUES LESS THAN (0)
(SUBPARTITION subpart11, SUBPARTITION subpart12), (SUBPARTITION subpart11, SUBPARTITION subpart12),
PARTITION part2 VALUES LESS THAN ($max_row_div4) PARTITION part2 VALUES LESS THAN ($max_row_div4)
...@@ -146,10 +235,25 @@ 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) PARTITION part3 VALUES LESS THAN ($max_row_div2)
(SUBPARTITION subpart31, SUBPARTITION subpart32), (SUBPARTITION subpart31, SUBPARTITION subpart32),
PARTITION part4 VALUES LESS THAN $MAX_VALUE PARTITION part4 VALUES LESS THAN $MAX_VALUE
(SUBPARTITION subpart41, SUBPARTITION subpart42))'; (SUBPARTITION subpart41, SUBPARTITION subpart42));
let $partitioning= `SELECT @aux`; if ($with_directories)
--enable_query_log {
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 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
...@@ -171,7 +275,45 @@ let $partitioning= PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_ ...@@ -171,7 +275,45 @@ let $partitioning= PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_
(SUBPARTITION sp31, SUBPARTITION sp32), (SUBPARTITION sp31, SUBPARTITION sp32),
PARTITION part4 VALUES IN (NULL) PARTITION part4 VALUES IN (NULL)
(SUBPARTITION sp41, SUBPARTITION sp42)); (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 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
...@@ -184,16 +326,29 @@ DROP TABLE t1; ...@@ -184,16 +326,29 @@ DROP TABLE t1;
#----------- PARTITION BY LIST -- SUBPARTITION BY KEY #----------- PARTITION BY LIST -- SUBPARTITION BY KEY
if ($with_partitioning) if ($with_partitioning)
{ {
--disable_query_log let $partitioning=
eval SET @aux = PARTITION BY LIST(ABS(MOD(f_int1,2)))
'PARTITION BY LIST(ABS(MOD(f_int1,2)))
SUBPARTITION BY KEY(f_int2) SUBPARTITIONS $sub_part_no SUBPARTITION BY KEY(f_int2) SUBPARTITIONS $sub_part_no
(PARTITION part1 VALUES IN (0), (PARTITION part1 VALUES IN (0),
PARTITION part2 VALUES IN (1), PARTITION part2 VALUES IN (1),
PARTITION part3 VALUES IN (NULL))'; PARTITION part3 VALUES IN (NULL));
let $partitioning= `SELECT @aux`; if ($with_directories)
--enable_query_log {
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 ( eval CREATE TABLE t1 (
$column_list $column_list
$unique $unique
......
...@@ -51,6 +51,15 @@ SET @@session.sql_mode= ''; ...@@ -51,6 +51,15 @@ SET @@session.sql_mode= '';
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# 1.1 The partitioning function contains one column. # 1.1 The partitioning function contains one column.
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY HASH(f_int1) PARTITIONS 2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -65,6 +74,10 @@ t1 CREATE TABLE `t1` ( ...@@ -65,6 +74,10 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) PARTITIONS 2 */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) PARTITIONS 2 */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -490,12 +503,15 @@ TRUNCATE t1; ...@@ -490,12 +503,15 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
)
PARTITION BY KEY(f_int1) PARTITIONS 5;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -510,6 +526,10 @@ t1 CREATE TABLE `t1` ( ...@@ -510,6 +526,10 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) PARTITIONS 5 */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) PARTITIONS 5 */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -935,12 +955,23 @@ TRUNCATE t1; ...@@ -935,12 +955,23 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
)
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));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -955,6 +986,10 @@ t1 CREATE TABLE `t1` ( ...@@ -955,6 +986,10 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -1380,12 +1415,21 @@ TRUNCATE t1; ...@@ -1380,12 +1415,21 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
)
PARTITION BY RANGE(f_int1)
(PARTITION parta VALUES LESS THAN (0),
PARTITION partb VALUES LESS THAN (5),
PARTITION partc VALUES LESS THAN (10),
PARTITION partd VALUES LESS THAN (10 + 5),
PARTITION parte VALUES LESS THAN (20),
PARTITION partf VALUES LESS THAN (2147483646));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -1400,6 +1444,10 @@ t1 CREATE TABLE `t1` ( ...@@ -1400,6 +1444,10 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -1823,12 +1871,19 @@ TRUNCATE t1; ...@@ -1823,12 +1871,19 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
)
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 (5),
PARTITION partc VALUES LESS THAN (10),
PARTITION partd VALUES LESS THAN (2147483646));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -1843,6 +1898,10 @@ t1 CREATE TABLE `t1` ( ...@@ -1843,6 +1898,10 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -2268,12 +2327,23 @@ TRUNCATE t1; ...@@ -2268,12 +2327,23 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
)
PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1)
(PARTITION part1 VALUES LESS THAN (0)
(SUBPARTITION subpart11, SUBPARTITION subpart12),
PARTITION part2 VALUES LESS THAN (5)
(SUBPARTITION subpart21, SUBPARTITION subpart22),
PARTITION part3 VALUES LESS THAN (10)
(SUBPARTITION subpart31, SUBPARTITION subpart32),
PARTITION part4 VALUES LESS THAN (2147483646)
(SUBPARTITION subpart41, SUBPARTITION subpart42));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -2288,6 +2358,10 @@ t1 CREATE TABLE `t1` ( ...@@ -2288,6 +2358,10 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -2711,12 +2785,27 @@ TRUNCATE t1; ...@@ -2711,12 +2785,27 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
)
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));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -2731,6 +2820,10 @@ t1 CREATE TABLE `t1` ( ...@@ -2731,6 +2820,10 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -3156,12 +3249,19 @@ TRUNCATE t1; ...@@ -3156,12 +3249,19 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
)
PARTITION BY LIST(ABS(MOD(f_int1,2)))
SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3
(PARTITION part1 VALUES IN (0),
PARTITION part2 VALUES IN (1),
PARTITION part3 VALUES IN (NULL));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -3176,6 +3276,10 @@ t1 CREATE TABLE `t1` ( ...@@ -3176,6 +3276,10 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -3601,12 +3705,6 @@ TRUNCATE t1; ...@@ -3601,12 +3705,6 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files.
# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
# 1.2 The partitioning function contains two columns. # 1.2 The partitioning function contains two columns.
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( CREATE TABLE t1 (
...@@ -3632,6 +3730,10 @@ t1 CREATE TABLE `t1` ( ...@@ -3632,6 +3730,10 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1 + f_int2) PARTITIONS 2 */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1 + f_int2) PARTITIONS 2 */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -4080,6 +4182,10 @@ t1 CREATE TABLE `t1` ( ...@@ -4080,6 +4182,10 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1,f_int2) PARTITIONS 5 */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1,f_int2) PARTITIONS 5 */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -4536,6 +4642,10 @@ t1 CREATE TABLE `t1` ( ...@@ -4536,6 +4642,10 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -4990,6 +5100,10 @@ t1 CREATE TABLE `t1` ( ...@@ -4990,6 +5100,10 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -5440,6 +5554,10 @@ t1 CREATE TABLE `t1` ( ...@@ -5440,6 +5554,10 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -5894,6 +6012,10 @@ t1 CREATE TABLE `t1` ( ...@@ -5894,6 +6012,10 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -6348,6 +6470,10 @@ t1 CREATE TABLE `t1` ( ...@@ -6348,6 +6470,10 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -6784,8 +6910,8 @@ f_charbig VARCHAR(1000) ...@@ -6784,8 +6910,8 @@ f_charbig VARCHAR(1000)
PARTITION BY LIST(ABS(MOD(f_int1,2))) PARTITION BY LIST(ABS(MOD(f_int1,2)))
SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3 SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3
(PARTITION part1 VALUES IN (0), (PARTITION part1 VALUES IN (0),
PARTITION part2 VALUES IN (1), PARTITION part2 VALUES IN (1),
PARTITION part3 VALUES IN (NULL)); PARTITION part3 VALUES IN (NULL));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -6800,6 +6926,10 @@ t1 CREATE TABLE `t1` ( ...@@ -6800,6 +6926,10 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -7231,6 +7361,15 @@ DROP TABLE t1; ...@@ -7231,6 +7361,15 @@ DROP TABLE t1;
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# 2.5 PRIMARY KEY + UNIQUE INDEX consisting of two columns # 2.5 PRIMARY KEY + UNIQUE INDEX consisting of two columns
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1)
)
PARTITION BY HASH(f_int1) PARTITIONS 2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -7247,6 +7386,10 @@ t1 CREATE TABLE `t1` ( ...@@ -7247,6 +7386,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) PARTITIONS 2 */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) PARTITIONS 2 */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -7707,12 +7850,15 @@ TRUNCATE t1; ...@@ -7707,12 +7850,15 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1)
)
PARTITION BY KEY(f_int1) PARTITIONS 5;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -7729,6 +7875,10 @@ t1 CREATE TABLE `t1` ( ...@@ -7729,6 +7875,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) PARTITIONS 5 */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) PARTITIONS 5 */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -8189,12 +8339,23 @@ TRUNCATE t1; ...@@ -8189,12 +8339,23 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1)
)
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));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -8211,6 +8372,10 @@ t1 CREATE TABLE `t1` ( ...@@ -8211,6 +8372,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -8671,12 +8836,21 @@ TRUNCATE t1; ...@@ -8671,12 +8836,21 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1)
)
PARTITION BY RANGE(f_int1)
(PARTITION parta VALUES LESS THAN (0),
PARTITION partb VALUES LESS THAN (5),
PARTITION partc VALUES LESS THAN (10),
PARTITION partd VALUES LESS THAN (10 + 5),
PARTITION parte VALUES LESS THAN (20),
PARTITION partf VALUES LESS THAN (2147483646));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -8693,6 +8867,10 @@ t1 CREATE TABLE `t1` ( ...@@ -8693,6 +8867,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -9151,12 +9329,19 @@ TRUNCATE t1; ...@@ -9151,12 +9329,19 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1)
)
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 (5),
PARTITION partc VALUES LESS THAN (10),
PARTITION partd VALUES LESS THAN (2147483646));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -9173,6 +9358,10 @@ t1 CREATE TABLE `t1` ( ...@@ -9173,6 +9358,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -9633,12 +9822,23 @@ TRUNCATE t1; ...@@ -9633,12 +9822,23 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1)
)
PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1)
(PARTITION part1 VALUES LESS THAN (0)
(SUBPARTITION subpart11, SUBPARTITION subpart12),
PARTITION part2 VALUES LESS THAN (5)
(SUBPARTITION subpart21, SUBPARTITION subpart22),
PARTITION part3 VALUES LESS THAN (10)
(SUBPARTITION subpart31, SUBPARTITION subpart32),
PARTITION part4 VALUES LESS THAN (2147483646)
(SUBPARTITION subpart41, SUBPARTITION subpart42));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -9655,6 +9855,10 @@ t1 CREATE TABLE `t1` ( ...@@ -9655,6 +9855,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -10113,12 +10317,27 @@ TRUNCATE t1; ...@@ -10113,12 +10317,27 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1)
)
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));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -10135,6 +10354,10 @@ t1 CREATE TABLE `t1` ( ...@@ -10135,6 +10354,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -10595,12 +10818,19 @@ TRUNCATE t1; ...@@ -10595,12 +10818,19 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1)
)
PARTITION BY LIST(ABS(MOD(f_int1,2)))
SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3
(PARTITION part1 VALUES IN (0),
PARTITION part2 VALUES IN (1),
PARTITION part3 VALUES IN (NULL));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -10617,6 +10847,10 @@ t1 CREATE TABLE `t1` ( ...@@ -10617,6 +10847,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -11077,13 +11311,16 @@ TRUNCATE t1; ...@@ -11077,13 +11311,16 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files.
# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2)
)
PARTITION BY HASH(f_int1) PARTITIONS 2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -11100,6 +11337,10 @@ t1 CREATE TABLE `t1` ( ...@@ -11100,6 +11337,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) PARTITIONS 2 */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) PARTITIONS 2 */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -11560,12 +11801,15 @@ TRUNCATE t1; ...@@ -11560,12 +11801,15 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2)
)
PARTITION BY KEY(f_int1) PARTITIONS 5;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -11582,6 +11826,10 @@ t1 CREATE TABLE `t1` ( ...@@ -11582,6 +11826,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) PARTITIONS 5 */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) PARTITIONS 5 */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -12042,12 +12290,23 @@ TRUNCATE t1; ...@@ -12042,12 +12290,23 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2)
)
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));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -12064,6 +12323,10 @@ t1 CREATE TABLE `t1` ( ...@@ -12064,6 +12323,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -12524,12 +12787,21 @@ TRUNCATE t1; ...@@ -12524,12 +12787,21 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2)
)
PARTITION BY RANGE(f_int1)
(PARTITION parta VALUES LESS THAN (0),
PARTITION partb VALUES LESS THAN (5),
PARTITION partc VALUES LESS THAN (10),
PARTITION partd VALUES LESS THAN (10 + 5),
PARTITION parte VALUES LESS THAN (20),
PARTITION partf VALUES LESS THAN (2147483646));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -12546,6 +12818,10 @@ t1 CREATE TABLE `t1` ( ...@@ -12546,6 +12818,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -13004,12 +13280,19 @@ TRUNCATE t1; ...@@ -13004,12 +13280,19 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2)
)
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 (5),
PARTITION partc VALUES LESS THAN (10),
PARTITION partd VALUES LESS THAN (2147483646));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -13026,6 +13309,10 @@ t1 CREATE TABLE `t1` ( ...@@ -13026,6 +13309,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -13486,12 +13773,23 @@ TRUNCATE t1; ...@@ -13486,12 +13773,23 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2)
)
PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1)
(PARTITION part1 VALUES LESS THAN (0)
(SUBPARTITION subpart11, SUBPARTITION subpart12),
PARTITION part2 VALUES LESS THAN (5)
(SUBPARTITION subpart21, SUBPARTITION subpart22),
PARTITION part3 VALUES LESS THAN (10)
(SUBPARTITION subpart31, SUBPARTITION subpart32),
PARTITION part4 VALUES LESS THAN (2147483646)
(SUBPARTITION subpart41, SUBPARTITION subpart42));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -13508,6 +13806,10 @@ t1 CREATE TABLE `t1` ( ...@@ -13508,6 +13806,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -13966,12 +14268,27 @@ TRUNCATE t1; ...@@ -13966,12 +14268,27 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2)
)
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));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -13988,6 +14305,10 @@ t1 CREATE TABLE `t1` ( ...@@ -13988,6 +14305,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -14448,12 +14769,19 @@ TRUNCATE t1; ...@@ -14448,12 +14769,19 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2)
)
PARTITION BY LIST(ABS(MOD(f_int1,2)))
SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3
(PARTITION part1 VALUES IN (0),
PARTITION part2 VALUES IN (1),
PARTITION part3 VALUES IN (NULL));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -14470,6 +14798,10 @@ t1 CREATE TABLE `t1` ( ...@@ -14470,6 +14798,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -14930,13 +15262,16 @@ TRUNCATE t1; ...@@ -14930,13 +15262,16 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files.
# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1)
)
PARTITION BY HASH(f_int1) PARTITIONS 2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -14953,6 +15288,10 @@ t1 CREATE TABLE `t1` ( ...@@ -14953,6 +15288,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) PARTITIONS 2 */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) PARTITIONS 2 */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -15429,12 +15768,15 @@ TRUNCATE t1; ...@@ -15429,12 +15768,15 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1)
)
PARTITION BY KEY(f_int1) PARTITIONS 5;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -15451,6 +15793,10 @@ t1 CREATE TABLE `t1` ( ...@@ -15451,6 +15793,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) PARTITIONS 5 */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) PARTITIONS 5 */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -15927,12 +16273,23 @@ TRUNCATE t1; ...@@ -15927,12 +16273,23 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1)
)
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));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -15949,6 +16306,10 @@ t1 CREATE TABLE `t1` ( ...@@ -15949,6 +16306,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -16425,12 +16786,21 @@ TRUNCATE t1; ...@@ -16425,12 +16786,21 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1)
)
PARTITION BY RANGE(f_int1)
(PARTITION parta VALUES LESS THAN (0),
PARTITION partb VALUES LESS THAN (5),
PARTITION partc VALUES LESS THAN (10),
PARTITION partd VALUES LESS THAN (10 + 5),
PARTITION parte VALUES LESS THAN (20),
PARTITION partf VALUES LESS THAN (2147483646));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -16447,6 +16817,10 @@ t1 CREATE TABLE `t1` ( ...@@ -16447,6 +16817,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -16921,12 +17295,19 @@ TRUNCATE t1; ...@@ -16921,12 +17295,19 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1)
)
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 (5),
PARTITION partc VALUES LESS THAN (10),
PARTITION partd VALUES LESS THAN (2147483646));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -16943,6 +17324,10 @@ t1 CREATE TABLE `t1` ( ...@@ -16943,6 +17324,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -17419,12 +17804,23 @@ TRUNCATE t1; ...@@ -17419,12 +17804,23 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1)
)
PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1)
(PARTITION part1 VALUES LESS THAN (0)
(SUBPARTITION subpart11, SUBPARTITION subpart12),
PARTITION part2 VALUES LESS THAN (5)
(SUBPARTITION subpart21, SUBPARTITION subpart22),
PARTITION part3 VALUES LESS THAN (10)
(SUBPARTITION subpart31, SUBPARTITION subpart32),
PARTITION part4 VALUES LESS THAN (2147483646)
(SUBPARTITION subpart41, SUBPARTITION subpart42));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -17441,6 +17837,10 @@ t1 CREATE TABLE `t1` ( ...@@ -17441,6 +17837,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -17915,12 +18315,27 @@ TRUNCATE t1; ...@@ -17915,12 +18315,27 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1)
)
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));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -17937,6 +18352,10 @@ t1 CREATE TABLE `t1` ( ...@@ -17937,6 +18352,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -18413,12 +18832,19 @@ TRUNCATE t1; ...@@ -18413,12 +18832,19 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files. CREATE TABLE t1 (
# Either the DROP TABLE or a preceding ALTER TABLE f_int1 INTEGER,
# <alter partitioning> worked incomplete. f_int2 INTEGER,
# We found: f_char1 CHAR(20),
unified filelist f_char2 CHAR(20),
--- not determined --- f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1)
)
PARTITION BY LIST(ABS(MOD(f_int1,2)))
SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3
(PARTITION part1 VALUES IN (0),
PARTITION part2 VALUES IN (1),
PARTITION part3 VALUES IN (NULL));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -18435,6 +18861,10 @@ t1 CREATE TABLE `t1` ( ...@@ -18435,6 +18861,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -18911,12 +19341,6 @@ TRUNCATE t1; ...@@ -18911,12 +19341,6 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
# Attention: There are unused files.
# Either the DROP TABLE or a preceding ALTER TABLE
# <alter partitioning> worked incomplete.
# We found:
unified filelist
--- not determined ---
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# 3 Tables with PRIMARY KEY and/or UNIQUE INDEXes # 3 Tables with PRIMARY KEY and/or UNIQUE INDEXes
# The partitioning function contains two columns. # The partitioning function contains two columns.
...@@ -18948,6 +19372,10 @@ t1 CREATE TABLE `t1` ( ...@@ -18948,6 +19372,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1 + f_int2) PARTITIONS 2 */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1 + f_int2) PARTITIONS 2 */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -19433,6 +19861,10 @@ t1 CREATE TABLE `t1` ( ...@@ -19433,6 +19861,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1,f_int2) PARTITIONS 5 */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1,f_int2) PARTITIONS 5 */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -19926,6 +20358,10 @@ t1 CREATE TABLE `t1` ( ...@@ -19926,6 +20358,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -20417,6 +20853,10 @@ t1 CREATE TABLE `t1` ( ...@@ -20417,6 +20853,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -20904,6 +21344,10 @@ t1 CREATE TABLE `t1` ( ...@@ -20904,6 +21344,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -21395,6 +21839,10 @@ t1 CREATE TABLE `t1` ( ...@@ -21395,6 +21839,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -21886,6 +22334,10 @@ t1 CREATE TABLE `t1` ( ...@@ -21886,6 +22334,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -22357,8 +22809,8 @@ f_charbig VARCHAR(1000) ...@@ -22357,8 +22809,8 @@ f_charbig VARCHAR(1000)
PARTITION BY LIST(ABS(MOD(f_int1,2))) PARTITION BY LIST(ABS(MOD(f_int1,2)))
SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3 SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3
(PARTITION part1 VALUES IN (0), (PARTITION part1 VALUES IN (0),
PARTITION part2 VALUES IN (1), PARTITION part2 VALUES IN (1),
PARTITION part3 VALUES IN (NULL)); PARTITION part3 VALUES IN (NULL));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -22375,6 +22827,10 @@ t1 CREATE TABLE `t1` ( ...@@ -22375,6 +22827,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -22861,6 +23317,10 @@ t1 CREATE TABLE `t1` ( ...@@ -22861,6 +23317,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1 + f_int2) PARTITIONS 2 */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1 + f_int2) PARTITIONS 2 */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -23346,6 +23806,10 @@ t1 CREATE TABLE `t1` ( ...@@ -23346,6 +23806,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1,f_int2) PARTITIONS 5 */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1,f_int2) PARTITIONS 5 */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -23839,6 +24303,10 @@ t1 CREATE TABLE `t1` ( ...@@ -23839,6 +24303,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -24330,6 +24798,10 @@ t1 CREATE TABLE `t1` ( ...@@ -24330,6 +24798,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -24817,6 +25289,10 @@ t1 CREATE TABLE `t1` ( ...@@ -24817,6 +25289,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -25308,6 +25784,10 @@ t1 CREATE TABLE `t1` ( ...@@ -25308,6 +25784,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -25799,6 +26279,10 @@ t1 CREATE TABLE `t1` ( ...@@ -25799,6 +26279,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -26270,8 +26754,8 @@ f_charbig VARCHAR(1000) ...@@ -26270,8 +26754,8 @@ f_charbig VARCHAR(1000)
PARTITION BY LIST(ABS(MOD(f_int1,2))) PARTITION BY LIST(ABS(MOD(f_int1,2)))
SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3 SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3
(PARTITION part1 VALUES IN (0), (PARTITION part1 VALUES IN (0),
PARTITION part2 VALUES IN (1), PARTITION part2 VALUES IN (1),
PARTITION part3 VALUES IN (NULL)); PARTITION part3 VALUES IN (NULL));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -26288,6 +26772,10 @@ t1 CREATE TABLE `t1` ( ...@@ -26288,6 +26772,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -26774,6 +27262,10 @@ t1 CREATE TABLE `t1` ( ...@@ -26774,6 +27262,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1 + f_int2) PARTITIONS 2 */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1 + f_int2) PARTITIONS 2 */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -27275,6 +27767,10 @@ t1 CREATE TABLE `t1` ( ...@@ -27275,6 +27767,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1,f_int2) PARTITIONS 5 */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1,f_int2) PARTITIONS 5 */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -27784,6 +28280,10 @@ t1 CREATE TABLE `t1` ( ...@@ -27784,6 +28280,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -28291,6 +28791,10 @@ t1 CREATE TABLE `t1` ( ...@@ -28291,6 +28791,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -28794,6 +29298,10 @@ t1 CREATE TABLE `t1` ( ...@@ -28794,6 +29298,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -29301,6 +29809,10 @@ t1 CREATE TABLE `t1` ( ...@@ -29301,6 +29809,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -29808,6 +30320,10 @@ t1 CREATE TABLE `t1` ( ...@@ -29808,6 +30320,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -30295,8 +30811,8 @@ f_charbig VARCHAR(1000) ...@@ -30295,8 +30811,8 @@ f_charbig VARCHAR(1000)
PARTITION BY LIST(ABS(MOD(f_int1,2))) PARTITION BY LIST(ABS(MOD(f_int1,2)))
SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3 SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3
(PARTITION part1 VALUES IN (0), (PARTITION part1 VALUES IN (0),
PARTITION part2 VALUES IN (1), PARTITION part2 VALUES IN (1),
PARTITION part3 VALUES IN (NULL)); PARTITION part3 VALUES IN (NULL));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -30313,6 +30829,10 @@ t1 CREATE TABLE `t1` ( ...@@ -30313,6 +30829,10 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
unified filelist
$MYSQLTEST_VARDIR/master-data/test/t1.frm
$MYSQLTEST_VARDIR/master-data/test/t1.par
# check prerequisites-1 success: 1 # check prerequisites-1 success: 1
# check COUNT(*) success: 1 # check COUNT(*) success: 1
# check MIN/MAX(f_int1) success: 1 # check MIN/MAX(f_int1) success: 1
...@@ -51,6 +51,15 @@ SET @@session.sql_mode= ''; ...@@ -51,6 +51,15 @@ SET @@session.sql_mode= '';
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# 1.1 The partitioning function contains one column. # 1.1 The partitioning function contains one column.
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY HASH(f_int1) PARTITIONS 2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -500,6 +509,15 @@ TRUNCATE t1; ...@@ -500,6 +509,15 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY KEY(f_int1) PARTITIONS 5;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -955,6 +973,23 @@ TRUNCATE t1; ...@@ -955,6 +973,23 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
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));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -1416,6 +1451,21 @@ TRUNCATE t1; ...@@ -1416,6 +1451,21 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY RANGE(f_int1)
(PARTITION parta VALUES LESS THAN (0),
PARTITION partb VALUES LESS THAN (5),
PARTITION partc VALUES LESS THAN (10),
PARTITION partd VALUES LESS THAN (10 + 5),
PARTITION parte VALUES LESS THAN (20),
PARTITION partf VALUES LESS THAN (2147483646));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -1871,6 +1921,19 @@ TRUNCATE t1; ...@@ -1871,6 +1921,19 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
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 (5),
PARTITION partc VALUES LESS THAN (10),
PARTITION partd VALUES LESS THAN (2147483646));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -2332,6 +2395,23 @@ TRUNCATE t1; ...@@ -2332,6 +2395,23 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1)
(PARTITION part1 VALUES LESS THAN (0)
(SUBPARTITION subpart11, SUBPARTITION subpart12),
PARTITION part2 VALUES LESS THAN (5)
(SUBPARTITION subpart21, SUBPARTITION subpart22),
PARTITION part3 VALUES LESS THAN (10)
(SUBPARTITION subpart31, SUBPARTITION subpart32),
PARTITION part4 VALUES LESS THAN (2147483646)
(SUBPARTITION subpart41, SUBPARTITION subpart42));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -2791,6 +2871,27 @@ TRUNCATE t1; ...@@ -2791,6 +2871,27 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
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));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -3252,6 +3353,19 @@ TRUNCATE t1; ...@@ -3252,6 +3353,19 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
)
PARTITION BY LIST(ABS(MOD(f_int1,2)))
SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3
(PARTITION part1 VALUES IN (0),
PARTITION part2 VALUES IN (1),
PARTITION part3 VALUES IN (NULL));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -7024,8 +7138,8 @@ f_charbig VARCHAR(1000) ...@@ -7024,8 +7138,8 @@ f_charbig VARCHAR(1000)
PARTITION BY LIST(ABS(MOD(f_int1,2))) PARTITION BY LIST(ABS(MOD(f_int1,2)))
SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3 SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3
(PARTITION part1 VALUES IN (0), (PARTITION part1 VALUES IN (0),
PARTITION part2 VALUES IN (1), PARTITION part2 VALUES IN (1),
PARTITION part3 VALUES IN (NULL)); PARTITION part3 VALUES IN (NULL));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -7495,6 +7609,15 @@ DROP TABLE t1; ...@@ -7495,6 +7609,15 @@ DROP TABLE t1;
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# 2.5 PRIMARY KEY + UNIQUE INDEX consisting of two columns # 2.5 PRIMARY KEY + UNIQUE INDEX consisting of two columns
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1)
)
PARTITION BY HASH(f_int1) PARTITIONS 2;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -7997,6 +8120,15 @@ TRUNCATE t1; ...@@ -7997,6 +8120,15 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1)
)
PARTITION BY KEY(f_int1) PARTITIONS 5;
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -8505,6 +8637,23 @@ TRUNCATE t1; ...@@ -8505,6 +8637,23 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1)
)
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));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -9019,6 +9168,21 @@ TRUNCATE t1; ...@@ -9019,6 +9168,21 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1)
)
PARTITION BY RANGE(f_int1)
(PARTITION parta VALUES LESS THAN (0),
PARTITION partb VALUES LESS THAN (5),
PARTITION partc VALUES LESS THAN (10),
PARTITION partd VALUES LESS THAN (10 + 5),
PARTITION parte VALUES LESS THAN (20),
PARTITION partf VALUES LESS THAN (2147483646));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -9527,6 +9691,19 @@ TRUNCATE t1; ...@@ -9527,6 +9691,19 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1)
)
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 (5),
PARTITION partc VALUES LESS THAN (10),
PARTITION partd VALUES LESS THAN (2147483646));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -10041,6 +10218,23 @@ TRUNCATE t1; ...@@ -10041,6 +10218,23 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1)
)
PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1)
(PARTITION part1 VALUES LESS THAN (0)
(SUBPARTITION subpart11, SUBPARTITION subpart12),
PARTITION part2 VALUES LESS THAN (5)
(SUBPARTITION subpart21, SUBPARTITION subpart22),
PARTITION part3 VALUES LESS THAN (10)
(SUBPARTITION subpart31, SUBPARTITION subpart32),
PARTITION part4 VALUES LESS THAN (2147483646)
(SUBPARTITION subpart41, SUBPARTITION subpart42));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -10553,6 +10747,27 @@ TRUNCATE t1; ...@@ -10553,6 +10747,27 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1)
)
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));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -11067,6 +11282,19 @@ TRUNCATE t1; ...@@ -11067,6 +11282,19 @@ TRUNCATE t1;
# check layout success: 1 # check layout success: 1
# End usability test (inc/partition_check.inc) # End usability test (inc/partition_check.inc)
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1)
)
PARTITION BY LIST(ABS(MOD(f_int1,2)))
SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3
(PARTITION part1 VALUES IN (0),
PARTITION part2 VALUES IN (1),
PARTITION part3 VALUES IN (NULL));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
...@@ -15267,8 +15495,8 @@ f_charbig VARCHAR(1000) ...@@ -15267,8 +15495,8 @@ f_charbig VARCHAR(1000)
PARTITION BY LIST(ABS(MOD(f_int1,2))) PARTITION BY LIST(ABS(MOD(f_int1,2)))
SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3 SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3
(PARTITION part1 VALUES IN (0), (PARTITION part1 VALUES IN (0),
PARTITION part2 VALUES IN (1), PARTITION part2 VALUES IN (1),
PARTITION part3 VALUES IN (NULL)); PARTITION part3 VALUES IN (NULL));
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
# Start usability test (inc/partition_check.inc) # Start usability test (inc/partition_check.inc)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -18,5 +18,3 @@ partition_value_ndb : cannot create t1 ...@@ -18,5 +18,3 @@ partition_value_ndb : cannot create t1
rpl_ndb_dd_partitions : cannot create t1 rpl_ndb_dd_partitions : cannot create t1
partition_alter4_myisam : Bug#20129 / WL#4176 partition_alter4_myisam : Bug#20129 / WL#4176
partition_alter4_innodb : Bug#20129 / WL#4176 partition_alter4_innodb : Bug#20129 / WL#4176
partition_basic_symlink_innodb : Bug#35306 Make pushbuild green
partition_basic_symlink_myisam : Bug#35306 Make pushbuild green
...@@ -51,8 +51,8 @@ let $more_pk_ui_tests= 0; ...@@ -51,8 +51,8 @@ let $more_pk_ui_tests= 0;
let $engine= 'InnoDB'; let $engine= 'InnoDB';
##### Execute the test of "table" files ##### Execute the test of "table" files
# InnoDB has no files per PK, UI, ... # InnoDB has no files per PK, UI, ... But only .frm file
let $do_file_tests= 0; let $do_file_tests= 1;
##### Execute PRIMARY KEY tests ##### ##### Execute PRIMARY KEY tests #####
# AFAIK InnoDB clusters the table around PRIMARY KEYs. # AFAIK InnoDB clusters the table around PRIMARY KEYs.
......
...@@ -48,9 +48,6 @@ let $more_pk_ui_tests= 0; ...@@ -48,9 +48,6 @@ let $more_pk_ui_tests= 0;
##### Storage engine to be tested ##### Storage engine to be tested
let $engine= 'MyISAM'; let $engine= 'MyISAM';
# The server uses in case of MyISAM symlinking (if available) and the expected
# results fit to symlinking support.
--source include/have_symlink.inc
##### Execute the test of "table" files ##### Execute the test of "table" files
# MyISAM has files per PK, UI, ... # MyISAM has files per PK, UI, ...
......
...@@ -11,8 +11,87 @@ ...@@ -11,8 +11,87 @@
# Change Author: mattiasj # # Change Author: mattiasj #
# Change Date: 2008-02-05 # # Change Date: 2008-02-05 #
# Change: copied it from partition_basic_innodb.test and kept DATA DIR # # Change: copied it from partition_basic_innodb.test and kept DATA DIR #
# Change Author: mattiasj #
# Change Date: 2008-03-16 #
# Change: Replaced all test with alter -> myisam, since innodb does not support#
# DATA/INDEX DIRECTORY #
################################################################################ ################################################################################
# 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
#
--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.
--source include/have_innodb.inc
# 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
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
--mkdir $MYSQLTEST_VARDIR/mysql-test-data-dir
--mkdir $MYSQLTEST_VARDIR/mysql-test-idx-dir
--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'
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'
);
--echo # Verifying .frm and .par files
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par
--echo # Verifying that there are no MyISAM files
--error 1
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
--error 1
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
--error 1
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD
--error 1
--file_exists $MYSQLTEST_VARDIR/master-data/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
FLUSH TABLES;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
SHOW CREATE TABLE t1;
ALTER TABLE t1 ENGINE = MyISAM;
--echo # Verifying .frm, .par and MyISAM files (.MYD, MYI)
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/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;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
SHOW CREATE TABLE t1;
DROP TABLE t1;
--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 ! # NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE !
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN # TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
......
...@@ -21,4 +21,3 @@ ctype_create : Bug#32965 main.ctype_create fails ...@@ -21,4 +21,3 @@ ctype_create : Bug#32965 main.ctype_create fails
status : Bug#32966 main.status fails status : Bug#32966 main.status fails
ps_ddl : Bug#12093 2007-12-14 pending WL#4165 / WL#4166 ps_ddl : Bug#12093 2007-12-14 pending WL#4165 / WL#4166
csv_alter_table : Bug#33696 2008-01-21 pcrews no .result file - bug allows NULL columns in CSV tables csv_alter_table : Bug#33696 2008-01-21 pcrews no .result file - bug allows NULL columns in CSV tables
partition_symlink : Bug#35305 Make pushbuild green
...@@ -11,13 +11,9 @@ ...@@ -11,13 +11,9 @@
# Bug 20770 Partitions: DATA DIRECTORY clause change in reorganize # Bug 20770 Partitions: DATA DIRECTORY clause change in reorganize
# doesn't remove old directory # doesn't remove old directory
--disable_query_log let $data_directory = DATA DIRECTORY = '$MYSQLTEST_VARDIR/tmp';
eval SET @data_dir = 'DATA DIRECTORY = ''$MYSQLTEST_VARDIR/tmp''';
let $data_directory = `select @data_dir`;
eval SET @inx_dir = 'INDEX DIRECTORY = ''$MYSQLTEST_VARDIR/tmp'''; let $inx_directory = INDEX DIRECTORY = '$MYSQLTEST_VARDIR/tmp';
let $inx_directory = `select @inx_dir`;
--enable_query_log
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval create table t1 (a int) engine myisam eval create table t1 (a int) engine myisam
...@@ -26,7 +22,7 @@ subpartition by hash (a) ...@@ -26,7 +22,7 @@ subpartition by hash (a)
(partition p0 VALUES LESS THAN (1) $data_directory $inx_directory (partition p0 VALUES LESS THAN (1) $data_directory $inx_directory
(SUBPARTITION subpart00, SUBPARTITION subpart01)); (SUBPARTITION subpart00, SUBPARTITION subpart01));
--echo Checking if file exists before alter --echo # Checking if file exists before alter
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm --file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par --file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart00.MYD --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart00.MYD
...@@ -45,7 +41,7 @@ eval ALTER TABLE t1 REORGANIZE PARTITION p0 INTO ...@@ -45,7 +41,7 @@ eval ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
partition p2 VALUES LESS THAN (2) $data_directory $inx_directory partition p2 VALUES LESS THAN (2) $data_directory $inx_directory
(SUBPARTITION subpart20, SUBPARTITION subpart21)); (SUBPARTITION subpart20, SUBPARTITION subpart21));
--echo Checking if file exists after alter --echo # Checking if file exists after alter
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm --file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par --file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart10.MYD --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart10.MYD
...@@ -98,18 +94,18 @@ set @@sql_mode=@org_mode; ...@@ -98,18 +94,18 @@ set @@sql_mode=@org_mode;
# Bug#32167: another privilege bypass with DATA/INDEX DIRECTORY # Bug#32167: another privilege bypass with DATA/INDEX DIRECTORY
# #
--replace_result $MYSQLTEST_VARDIR TEST_DIR --replace_result $MYSQLTEST_VARDIR TEST_DIR
--error 1210 --error ER_WRONG_ARGUMENTS
eval CREATE TABLE t1(a INT) eval CREATE TABLE t1(a INT)
PARTITION BY KEY (a) PARTITION BY KEY (a)
(PARTITION p0 DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/test'); (PARTITION p0 DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/test');
--replace_result $MYSQLTEST_VARDIR TEST_DIR --replace_result $MYSQLTEST_VARDIR TEST_DIR
--error 1210 --error ER_WRONG_ARGUMENTS
eval CREATE TABLE t1(a INT) eval CREATE TABLE t1(a INT)
PARTITION BY KEY (a) PARTITION BY KEY (a)
(PARTITION p0 INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/test'); (PARTITION p0 INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/test');
--replace_result $MYSQLTEST_VARDIR TEST_DIR --replace_result $MYSQLTEST_VARDIR TEST_DIR
--error 1210 --error ER_WRONG_ARGUMENTS
eval CREATE TABLE ts (id INT, purchased DATE) eval CREATE TABLE ts (id INT, purchased DATE)
PARTITION BY RANGE(YEAR(purchased)) PARTITION BY RANGE(YEAR(purchased))
SUBPARTITION BY HASH(TO_DAYS(purchased)) ( SUBPARTITION BY HASH(TO_DAYS(purchased)) (
...@@ -121,7 +117,7 @@ SUBPARTITION s0b ...@@ -121,7 +117,7 @@ SUBPARTITION s0b
)); ));
--replace_result $MYSQLTEST_VARDIR TEST_DIR --replace_result $MYSQLTEST_VARDIR TEST_DIR
--error 1210 --error ER_WRONG_ARGUMENTS
eval CREATE TABLE ts (id INT, purchased DATE) eval CREATE TABLE ts (id INT, purchased DATE)
PARTITION BY RANGE(YEAR(purchased)) PARTITION BY RANGE(YEAR(purchased))
SUBPARTITION BY HASH(TO_DAYS(purchased)) ( SUBPARTITION BY HASH(TO_DAYS(purchased)) (
...@@ -144,7 +140,59 @@ SUBPARTITION s0b ...@@ -144,7 +140,59 @@ SUBPARTITION s0b
DROP TABLE IF EXISTS `example`; DROP TABLE IF EXISTS `example`;
--enable_warnings --enable_warnings
--disable_abort_on_error --mkdir $MYSQLTEST_VARDIR/p0Data
--mkdir $MYSQLTEST_VARDIR/p1Data
--mkdir $MYSQLTEST_VARDIR/p2Data
--mkdir $MYSQLTEST_VARDIR/p3Data
--mkdir $MYSQLTEST_VARDIR/p0Index
--mkdir $MYSQLTEST_VARDIR/p1Index
--mkdir $MYSQLTEST_VARDIR/p2Index
--mkdir $MYSQLTEST_VARDIR/p3Index
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE `example` (
`ID_EXAMPLE` int(10) unsigned NOT NULL AUTO_INCREMENT,
`DESCRIPTION` varchar(30) NOT NULL,
`LEVEL` smallint(5) unsigned DEFAULT NULL,
PRIMARY KEY (`ID_EXAMPLE`)
) ENGINE = MYISAM
PARTITION BY HASH(ID_EXAMPLE)(
PARTITION p0 DATA DIRECTORY = '$MYSQLTEST_VARDIR/p0Data'
INDEX DIRECTORY = '$MYSQLTEST_VARDIR/p0Index',
PARTITION p1 DATA DIRECTORY = '$MYSQLTEST_VARDIR/p1Data'
INDEX DIRECTORY = '$MYSQLTEST_VARDIR/p1Index',
PARTITION p2 DATA DIRECTORY = '$MYSQLTEST_VARDIR/p2Data'
INDEX DIRECTORY = '$MYSQLTEST_VARDIR/p2Index',
PARTITION p3 DATA DIRECTORY = '$MYSQLTEST_VARDIR/p3Data'
INDEX DIRECTORY = '$MYSQLTEST_VARDIR/p3Index'
);
--echo # Checking that MyISAM .MYD and .MYI are in test db and data/idx dir
--file_exists $MYSQLTEST_VARDIR/master-data/test/example#P#p0.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/test/example#P#p0.MYD
--file_exists $MYSQLTEST_VARDIR/p0Data/example#P#p0.MYD
--file_exists $MYSQLTEST_VARDIR/p0Index/example#P#p0.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/test/example#P#p1.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/test/example#P#p1.MYD
--file_exists $MYSQLTEST_VARDIR/p1Data/example#P#p1.MYD
--file_exists $MYSQLTEST_VARDIR/p1Index/example#P#p1.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/test/example#P#p2.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/test/example#P#p2.MYD
--file_exists $MYSQLTEST_VARDIR/p2Data/example#P#p2.MYD
--file_exists $MYSQLTEST_VARDIR/p2Index/example#P#p2.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/test/example#P#p3.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/test/example#P#p3.MYD
--file_exists $MYSQLTEST_VARDIR/p3Data/example#P#p3.MYD
--file_exists $MYSQLTEST_VARDIR/p3Index/example#P#p3.MYI
DROP TABLE example;
--rmdir $MYSQLTEST_VARDIR/p0Data
--rmdir $MYSQLTEST_VARDIR/p1Data
--rmdir $MYSQLTEST_VARDIR/p2Data
--rmdir $MYSQLTEST_VARDIR/p3Data
--rmdir $MYSQLTEST_VARDIR/p0Index
--rmdir $MYSQLTEST_VARDIR/p1Index
--rmdir $MYSQLTEST_VARDIR/p2Index
--rmdir $MYSQLTEST_VARDIR/p3Index
--error ER_CANT_CREATE_TABLE,1
CREATE TABLE `example` ( CREATE TABLE `example` (
`ID_EXAMPLE` int(10) unsigned NOT NULL AUTO_INCREMENT, `ID_EXAMPLE` int(10) unsigned NOT NULL AUTO_INCREMENT,
`DESCRIPTION` varchar(30) NOT NULL, `DESCRIPTION` varchar(30) NOT NULL,
...@@ -152,10 +200,8 @@ CREATE TABLE `example` ( ...@@ -152,10 +200,8 @@ CREATE TABLE `example` (
PRIMARY KEY (`ID_EXAMPLE`) PRIMARY KEY (`ID_EXAMPLE`)
) ENGINE = MYISAM ) ENGINE = MYISAM
PARTITION BY HASH(ID_EXAMPLE)( PARTITION BY HASH(ID_EXAMPLE)(
PARTITION p0 DATA DIRECTORY = '/build/5.1/data/partitiontest/p0Data', PARTITION p0 DATA DIRECTORY = '/not/existent/p0Data',
PARTITION p1 DATA DIRECTORY = '/build/5.1/data/partitiontest/p1Data', PARTITION p1 DATA DIRECTORY = '/not/existent/p1Data',
PARTITION p2 DATA DIRECTORY = '/build/5.1/data/partitiontest/p2Data', PARTITION p2 DATA DIRECTORY = '/not/existent/p2Data',
PARTITION p3 DATA DIRECTORY = '/build/5.1/data/partitiontest/p3Data' PARTITION p3 DATA DIRECTORY = '/not/existent/p3Data'
); );
--enable_abort_on_error
...@@ -27,9 +27,6 @@ DROP DATABASE IF EXISTS mysqltest2; ...@@ -27,9 +27,6 @@ DROP DATABASE IF EXISTS mysqltest2;
# directory or file that the mysqld-process can use, via DATA/INDEX DIR) # directory or file that the mysqld-process can use, via DATA/INDEX DIR)
# this is the security flaw that was used in bug#32091 and bug#32111 # this is the security flaw that was used in bug#32091 and bug#32111
#--exec mkdir $MYSQLTEST_VARDIR/tmp/test || true
#--exec mkdir $MYSQLTEST_VARDIR/tmp/mysqltest2 || true
-- echo # Creating two non colliding tables mysqltest2.t1 and test.t1 -- echo # Creating two non colliding tables mysqltest2.t1 and test.t1
-- echo # test.t1 have partitions in mysqltest2-directory! -- echo # test.t1 have partitions in mysqltest2-directory!
-- echo # user root: -- echo # user root:
...@@ -125,22 +122,18 @@ connection default; ...@@ -125,22 +122,18 @@ connection default;
DROP USER mysqltest_1@localhost; DROP USER mysqltest_1@localhost;
disconnect con1; disconnect con1;
#--exec rmdir $MYSQLTEST_VARDIR/tmp/test || true
#--exec rmdir $MYSQLTEST_VARDIR/tmp/mysqltest2 || true
# #
# Bug #24633 SQL MODE "NO_DIR_IN_CREATE" does not work with partitioned tables # Bug #24633 SQL MODE "NO_DIR_IN_CREATE" does not work with partitioned tables
# #
disable_query_log; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval create table t2 (i int ) eval create table t2 (i int )
partition by range (i) partition by range (i)
( (
partition p01 values less than (1000) partition p01 values less than (1000)
data directory="$MYSQLTEST_VARDIR/tmp/" data directory="$MYSQLTEST_VARDIR/tmp"
index directory="$MYSQLTEST_VARDIR/tmp/" index directory="$MYSQLTEST_VARDIR/tmp"
); );
enable_query_log;
set @org_mode=@@sql_mode; set @org_mode=@@sql_mode;
set @@sql_mode='NO_DIR_IN_CREATE'; set @@sql_mode='NO_DIR_IN_CREATE';
...@@ -153,6 +146,7 @@ partition by range (i) ...@@ -153,6 +146,7 @@ partition by range (i)
index directory='/not/existing' index directory='/not/existing'
); );
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
show create table t2; show create table t2;
DROP TABLE t1, t2; DROP TABLE t1, t2;
set @@sql_mode=@org_mode; set @@sql_mode=@org_mode;
......
...@@ -38,9 +38,8 @@ drop table t2; ...@@ -38,9 +38,8 @@ drop table t2;
# We use t9 here to not crash with tables generated by the backup test # We use t9 here to not crash with tables generated by the backup test
# #
disable_query_log; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval create table t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="$MYSQLTEST_VARDIR/tmp" index directory="$MYSQLTEST_VARDIR/run"; eval create table t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="$MYSQLTEST_VARDIR/tmp" index directory="$MYSQLTEST_VARDIR/run";
enable_query_log;
insert into t9 select * from t1; insert into t9 select * from t1;
check table t9; check table t9;
...@@ -66,7 +65,6 @@ drop table t1; ...@@ -66,7 +65,6 @@ drop table t1;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
SHOW CREATE TABLE t9; SHOW CREATE TABLE t9;
disable_query_log;
--error 1103,1103 --error 1103,1103
create table t1 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="tmp"; create table t1 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="tmp";
...@@ -81,13 +79,14 @@ create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, p ...@@ -81,13 +79,14 @@ create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, p
create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="not-hard-path"; create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="not-hard-path";
# Should fail becasue the file t9.MYI already exist in 'run' # Should fail becasue the file t9.MYI already exist in 'run'
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error 1,1,1105 --error 1,1,1105
eval create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="$MYSQLTEST_VARDIR/run"; eval create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="$MYSQLTEST_VARDIR/run";
# Should fail becasue the file t9.MYD already exist in 'tmp' # Should fail becasue the file t9.MYD already exist in 'tmp'
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error 1,1 --error 1,1
eval create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="$MYSQLTEST_VARDIR/tmp"; eval create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="$MYSQLTEST_VARDIR/tmp";
enable_query_log;
# Check moving table t9 from default database to mysqltest; # Check moving table t9 from default database to mysqltest;
# In this case the symlinks should be removed. # In this case the symlinks should be removed.
...@@ -103,20 +102,17 @@ drop database mysqltest; ...@@ -103,20 +102,17 @@ drop database mysqltest;
# #
create table t1 (a int not null) engine=myisam; create table t1 (a int not null) engine=myisam;
disable_query_log; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval alter table t1 data directory="$MYSQLTEST_VARDIR/tmp"; eval alter table t1 data directory="$MYSQLTEST_VARDIR/tmp";
enable_query_log;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
show create table t1; show create table t1;
alter table t1 add b int; alter table t1 add b int;
disable_query_log; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval alter table t1 data directory="$MYSQLTEST_VARDIR/log"; eval alter table t1 data directory="$MYSQLTEST_VARDIR/log";
enable_query_log;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
show create table t1; show create table t1;
disable_query_log; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval alter table t1 index directory="$MYSQLTEST_VARDIR/log"; eval alter table t1 index directory="$MYSQLTEST_VARDIR/log";
enable_query_log;
show create table t1; show create table t1;
drop table t1; drop table t1;
...@@ -125,11 +121,9 @@ drop table t1; ...@@ -125,11 +121,9 @@ drop table t1;
# #
--write_file $MYSQLTEST_VARDIR/tmp/t1.MYI --write_file $MYSQLTEST_VARDIR/tmp/t1.MYI
EOF EOF
--replace_result $MYSQLTEST_VARDIR TEST_DIR
# If $MYSQLTEST_VARDIR is a symbolic link, the low level MyISAm error --replace_result $MYSQLTEST_VARDIR TEST_DIR $MYSQLTEST_VARDIR TEST_DIR
# message contains the real path of $MYSQLTEST_VARDIR. Try to catch this. --error 1,1
--replace_regex /write to file '\/.*\/tmp/write to file 'TEST_DIR\/tmp/
--error 1
eval CREATE TABLE t1(a INT) eval CREATE TABLE t1(a INT)
DATA DIRECTORY='$MYSQLTEST_VARDIR/tmp' DATA DIRECTORY='$MYSQLTEST_VARDIR/tmp'
INDEX DIRECTORY='$MYSQLTEST_VARDIR/tmp'; INDEX DIRECTORY='$MYSQLTEST_VARDIR/tmp';
...@@ -150,18 +144,16 @@ connect (session1,localhost,root,,); ...@@ -150,18 +144,16 @@ connect (session1,localhost,root,,);
connect (session2,localhost,root,,); connect (session2,localhost,root,,);
connection session1; connection session1;
disable_query_log; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval create temporary table t1 (a int) engine=myisam data directory="$MYSQLTEST_VARDIR/log" select 9 a; eval create temporary table t1 (a int) engine=myisam data directory="$MYSQLTEST_VARDIR/log" select 9 a;
enable_query_log;
# If running test suite with a non standard tmp dir, the "show create table" # If running test suite with a non standard tmp dir, the "show create table"
# will print "DATA_DIRECTORY=". Use replace_result to mask it out # will print "DATA_DIRECTORY=". Use replace_result to mask it out
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
show create table t1; show create table t1;
connection session2; connection session2;
disable_query_log; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval create temporary table t1 (a int) engine=myisam data directory="$MYSQLTEST_VARDIR/log" select 99 a; eval create temporary table t1 (a int) engine=myisam data directory="$MYSQLTEST_VARDIR/log" select 99 a;
enable_query_log;
# If running test suite with a non standard tmp dir, the "show create table" # If running test suite with a non standard tmp dir, the "show create table"
# will print "DATA_DIRECTORY=". Use replace_result to mask it out # will print "DATA_DIRECTORY=". Use replace_result to mask it out
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
......
...@@ -1646,6 +1646,15 @@ void ha_partition::change_table_ptr(TABLE *table_arg, TABLE_SHARE *share) ...@@ -1646,6 +1646,15 @@ void ha_partition::change_table_ptr(TABLE *table_arg, TABLE_SHARE *share)
{ {
(*file_array)->change_table_ptr(table_arg, share); (*file_array)->change_table_ptr(table_arg, share);
} while (*(++file_array)); } while (*(++file_array));
if (m_added_file && m_added_file[0])
{
/* if in middle of a drop/rename etc */
file_array= m_added_file;
do
{
(*file_array)->change_table_ptr(table_arg, share);
} while (*(++file_array));
}
} }
/* /*
......
...@@ -1312,11 +1312,11 @@ bool check_partition_dirs(partition_info *part_info) ...@@ -1312,11 +1312,11 @@ bool check_partition_dirs(partition_info *part_info)
return 0; return 0;
dd_err: dd_err:
my_error(ER_WRONG_ARGUMENTS,MYF(0),"DATA DIRECORY"); my_error(ER_WRONG_ARGUMENTS,MYF(0),"DATA DIRECTORY");
return 1; return 1;
id_err: id_err:
my_error(ER_WRONG_ARGUMENTS,MYF(0),"INDEX DIRECORY"); my_error(ER_WRONG_ARGUMENTS,MYF(0),"INDEX DIRECTORY");
return 1; return 1;
} }
......
...@@ -747,6 +747,7 @@ void close_handle_and_leave_table_as_lock(TABLE *table) ...@@ -747,6 +747,7 @@ void close_handle_and_leave_table_as_lock(TABLE *table)
table->db_stat= 0; // Mark file closed table->db_stat= 0; // Mark file closed
release_table_share(table->s, RELEASE_NORMAL); release_table_share(table->s, RELEASE_NORMAL);
table->s= share; table->s= share;
table->file->change_table_ptr(table, table->s);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment