Commit d76252b4 authored by unknown's avatar unknown

Update partition test to use the new command "file_exist"

parent f1d53222
...@@ -1132,41 +1132,15 @@ drop table t1; ...@@ -1132,41 +1132,15 @@ drop table t1;
create table t1 (a int) engine myisam create table t1 (a int) engine myisam
partition by range (a) partition by range (a)
subpartition by hash (a) subpartition by hash (a)
(partition p0 VALUES LESS THAN (1) DATA DIRECTORY = 'hello/master-data/tmpdata' INDEX DIRECTORY = 'hello/master-data/tmpinx' (partition p0 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpdata' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpinx'
(SUBPARTITION subpart00, SUBPARTITION subpart01)); (SUBPARTITION subpart00, SUBPARTITION subpart01));
hello/master-data/test/t1.frm Checking if file exists before alter
hello/master-data/test/t1.par
hello/master-data/test/t1#P#p0#SP#subpart00.MYD
hello/master-data/test/t1#P#p0#SP#subpart00.MYI
hello/master-data/test/t1#P#p0#SP#subpart01.MYD
hello/master-data/test/t1#P#p0#SP#subpart01.MYI
hello/master-data/tmpdata/t1#P#p0#SP#subpart00.MYD
hello/master-data/tmpdata/t1#P#p0#SP#subpart01.MYD
hello/master-data/tmpinx/t1#P#p0#SP#subpart00.MYI
hello/master-data/tmpinx/t1#P#p0#SP#subpart01.MYI
ALTER TABLE t1 REORGANIZE PARTITION p0 INTO ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
(partition p1 VALUES LESS THAN (1) DATA DIRECTORY = 'hello/master-data/tmpdata' INDEX DIRECTORY = 'hello/master-data/tmpinx' (partition p1 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpdata' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpinx'
(SUBPARTITION subpart10, SUBPARTITION subpart11), (SUBPARTITION subpart10, SUBPARTITION subpart11),
partition p2 VALUES LESS THAN (2) DATA DIRECTORY = 'hello/master-data/tmpdata' INDEX DIRECTORY = 'hello/master-data/tmpinx' partition p2 VALUES LESS THAN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpdata' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpinx'
(SUBPARTITION subpart20, SUBPARTITION subpart21)); (SUBPARTITION subpart20, SUBPARTITION subpart21));
hello/master-data/test/t1.frm Checking if file exists after alter
hello/master-data/test/t1.par
hello/master-data/test/t1#P#p1#SP#subpart10.MYD
hello/master-data/test/t1#P#p1#SP#subpart10.MYI
hello/master-data/test/t1#P#p1#SP#subpart11.MYD
hello/master-data/test/t1#P#p1#SP#subpart11.MYI
hello/master-data/test/t1#P#p2#SP#subpart20.MYD
hello/master-data/test/t1#P#p2#SP#subpart20.MYI
hello/master-data/test/t1#P#p2#SP#subpart21.MYD
hello/master-data/test/t1#P#p2#SP#subpart21.MYI
hello/master-data/tmpdata/t1#P#p1#SP#subpart10.MYD
hello/master-data/tmpdata/t1#P#p1#SP#subpart11.MYD
hello/master-data/tmpdata/t1#P#p2#SP#subpart20.MYD
hello/master-data/tmpdata/t1#P#p2#SP#subpart21.MYD
hello/master-data/tmpinx/t1#P#p1#SP#subpart10.MYI
hello/master-data/tmpinx/t1#P#p1#SP#subpart11.MYI
hello/master-data/tmpinx/t1#P#p2#SP#subpart20.MYI
hello/master-data/tmpinx/t1#P#p2#SP#subpart21.MYI
drop table t1; drop table t1;
create table t1 (a bigint unsigned not null, primary key(a)) create table t1 (a bigint unsigned not null, primary key(a))
engine = myisam engine = myisam
......
...@@ -1332,37 +1332,51 @@ eval SET @inx_dir = 'INDEX DIRECTORY = ''$MYSQLTEST_VARDIR/master-data/tmpinx''' ...@@ -1332,37 +1332,51 @@ eval SET @inx_dir = 'INDEX DIRECTORY = ''$MYSQLTEST_VARDIR/master-data/tmpinx'''
let $inx_directory = `select @inx_dir`; let $inx_directory = `select @inx_dir`;
--enable_query_log --enable_query_log
--replace_result $MYSQLTEST_VARDIR "hello" --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval create table t1 (a int) engine myisam eval create table t1 (a int) engine myisam
partition by range (a) partition by range (a)
subpartition by hash (a) 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));
--replace_result $MYSQLTEST_VARDIR "hello" --echo Checking if file exists before alter
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1.* || true --file_exist $MYSQLTEST_VARDIR/master-data/test/t1.frm
--replace_result $MYSQLTEST_VARDIR "hello" --file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1#* || true --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart00.MYD
--replace_result $MYSQLTEST_VARDIR "hello" --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart00.MYI
--exec ls $MYSQLTEST_VARDIR/master-data/tmpdata/t1#* || true --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart01.MYD
--replace_result $MYSQLTEST_VARDIR "hello" --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart01.MYI
--exec ls $MYSQLTEST_VARDIR/master-data/tmpinx/t1#* || true --file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p0#SP#subpart00.MYD
--replace_result $MYSQLTEST_VARDIR "hello" --file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p0#SP#subpart01.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p0#SP#subpart00.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p0#SP#subpart01.MYI
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval ALTER TABLE t1 REORGANIZE PARTITION p0 INTO eval ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
(partition p1 VALUES LESS THAN (1) $data_directory $inx_directory (partition p1 VALUES LESS THAN (1) $data_directory $inx_directory
(SUBPARTITION subpart10, SUBPARTITION subpart11), (SUBPARTITION subpart10, SUBPARTITION subpart11),
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));
--replace_result $MYSQLTEST_VARDIR "hello" --echo Checking if file exists after alter
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1.* || true --file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm
--replace_result $MYSQLTEST_VARDIR "hello" --file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1#* || true --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart10.MYD
--replace_result $MYSQLTEST_VARDIR "hello" --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart10.MYI
--exec ls $MYSQLTEST_VARDIR/master-data/tmpdata/t1#* || true --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart11.MYD
--replace_result $MYSQLTEST_VARDIR "hello" --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart11.MYI
--exec ls $MYSQLTEST_VARDIR/master-data/tmpinx/t1#* || true --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart20.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart20.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart21.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart21.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p1#SP#subpart10.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p1#SP#subpart11.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p2#SP#subpart20.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p2#SP#subpart21.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p1#SP#subpart10.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p1#SP#subpart11.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p2#SP#subpart20.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p2#SP#subpart21.MYI
drop table t1; drop table t1;
--exec rmdir $MYSQLTEST_VARDIR/master-data/tmpdata || true --exec rmdir $MYSQLTEST_VARDIR/master-data/tmpdata || true
......
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