Commit 6af00b2c authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-16678: Ignore #sql-ib tables in --suite=parts

We missed these in commit 89633995
and commit ccd87d34.
parent 34dafb7e
#
# Verify that the DATA/INDEX DIR is stored and used if ALTER to MyISAM.
#
DROP TABLE IF EXISTS t1;
SET @file_per_table= @@GLOBAL.innodb_file_per_table;
SET @strict_mode= @@SESSION.innodb_strict_mode;
SET SESSION innodb_strict_mode = ON;
#
# InnoDB only supports DATA DIRECTORY with innodb_file_per_table=ON
......@@ -88,7 +89,6 @@ t1 CREATE TABLE `t1` (
(PARTITION `p0` DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = MyISAM,
PARTITION `p1` DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = MyISAM)
# Verifying .frm, .par and MyISAM files (.MYD, MYI)
---- MYSQLD_DATADIR/test
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
......@@ -325,3 +325,5 @@ DROP TABLE t1, t2;
#
# Cleanup
#
SET GLOBAL innodb_file_per_table=@file_per_table;
SET SESSION innodb_strict_mode=@strict_mode;
......@@ -39,17 +39,11 @@
# Does not work with --embedded
--source include/not_embedded.inc
--disable_query_log
let $MYSQLD_DATADIR= `select @@datadir`;
# These values can change during the test
LET $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
LET $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`;
--enable_query_log
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
SET @file_per_table= @@GLOBAL.innodb_file_per_table;
SET @strict_mode= @@SESSION.innodb_strict_mode;
--mkdir $MYSQLTEST_VARDIR/mysql-test-data-dir
--mkdir $MYSQLTEST_VARDIR/mysql-test-idx-dir
......@@ -99,9 +93,17 @@ SHOW WARNINGS;
--echo # Verifying .frm, .par, .isl & .ibd files
--echo ---- MYSQLD_DATADIR/test
--list_files $MYSQLD_DATADIR/test
--let $regexp=/#sql-ib[0-9a-f]+\.ibd\n//
--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQLD_DATADIR/test
--replace_regex $regexp
--cat_file $MYSQLD_DATADIR.files.txt
--remove_file $MYSQLD_DATADIR.files.txt
--echo ---- MYSQLTEST_VARDIR/mysql-test-data-dir/test
--list_files $MYSQLTEST_VARDIR/mysql-test-data-dir/test
--let $regexp=/#sql-ib[0-9a-f]+\.ibd\n//
--list_files_write_file $MYSQLTEST_VARDIR/files.txt $MYSQLTEST_VARDIR/mysql-test-data-dir/test
--replace_regex $regexp
--cat_file $MYSQLTEST_VARDIR/files.txt
--remove_file $MYSQLTEST_VARDIR/files.txt
--echo # The ibd tablespaces should not be directly under the DATA DIRECTORY
--echo ---- MYSQLTEST_VARDIR/mysql-test-data-dir
--list_files $MYSQLTEST_VARDIR/mysql-test-data-dir
......@@ -120,8 +122,11 @@ ALTER TABLE t1 engine=MyISAM;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
SHOW CREATE TABLE t1;
--echo # Verifying .frm, .par and MyISAM files (.MYD, MYI)
--echo ---- MYSQLD_DATADIR/test
--list_files $MYSQLD_DATADIR/test
--let $regexp=/#sql-ib[0-9a-f]+\.ibd\n//
--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQLD_DATADIR/test
--replace_regex $regexp
--cat_file $MYSQLD_DATADIR.files.txt
--remove_file $MYSQLD_DATADIR.files.txt
--echo ---- MYSQLTEST_VARDIR/mysql-test-data-dir
--list_files $MYSQLTEST_VARDIR/mysql-test-data-dir
--echo ---- MYSQLTEST_VARDIR/mysql-test-idx-dir
......@@ -137,13 +142,21 @@ ALTER TABLE t1 engine=InnoDB;
SHOW CREATE TABLE t1;
--echo # Verifying .frm, .par, .isl and InnoDB .ibd files
--echo ---- MYSQLD_DATADIR/test
--list_files $MYSQLD_DATADIR/test
--let $regexp=/#sql-ib[0-9a-f]+\.ibd\n//
--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQLD_DATADIR/test
--replace_regex $regexp
--cat_file $MYSQLD_DATADIR.files.txt
--remove_file $MYSQLD_DATADIR.files.txt
--echo ---- MYSQLTEST_VARDIR/mysql-test-data-dir
--list_files $MYSQLTEST_VARDIR/mysql-test-data-dir
--echo ---- MYSQLTEST_VARDIR/mysql-test-idx-dir
--list_files $MYSQLTEST_VARDIR/mysql-test-idx-dir
--echo ---- MYSQLTEST_VARDIR/mysql-test-data-dir/test
--list_files $MYSQLTEST_VARDIR/mysql-test-data-dir/test
--let $regexp=/#sql-ib[0-9a-f]+\.ibd\n//
--list_files_write_file $MYSQLTEST_VARDIR/files.txt $MYSQLTEST_VARDIR/mysql-test-data-dir/test
--replace_regex $regexp
--cat_file $MYSQLTEST_VARDIR/files.txt
--remove_file $MYSQLTEST_VARDIR/files.txt
DROP TABLE t1;
......@@ -175,7 +188,7 @@ eval CREATE TABLE t2
myval VARCHAR(10),
PRIMARY KEY (myid)
) ENGINE=INNODB DATA DIRECTORY = '$data_dir_path';
ALTER TABLE t1 EXCHANGE PARTITION p0001 WITH TABLE t2;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
......@@ -205,7 +218,7 @@ eval CREATE TABLE t2
insert into t1 values (1, 'one');
insert into t2 values (2, 'two'), (3, 'threee'), (4, 'four');
select * from t1;
ALTER TABLE t1 EXCHANGE PARTITION p0001 WITH TABLE t2;
......@@ -241,7 +254,7 @@ eval CREATE TABLE t2
insert into t1 values (1, 'one');
insert into t2 values (2, 'two'), (3, 'threee'), (4, 'four');
select * from t1;
ALTER TABLE t1 EXCHANGE PARTITION p0001 WITH TABLE t2;
......@@ -277,7 +290,7 @@ eval CREATE TABLE t2
insert into t1 values (1, 'one');
insert into t2 values (2, 'two'), (3, 'threee'), (4, 'four');
select * from t1;
ALTER TABLE t1 EXCHANGE PARTITION p0001 WITH TABLE t2;
......@@ -296,8 +309,5 @@ DROP TABLE t1, t2;
--rmdir $MYSQLTEST_VARDIR/mysql-test-data-dir
--rmdir $MYSQLTEST_VARDIR/mysql-test-idx-dir
--disable_query_log
EVAL SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig;
EVAL SET SESSION innodb_strict_mode=$innodb_strict_mode_orig;
--enable_query_log
SET GLOBAL innodb_file_per_table=@file_per_table;
SET SESSION innodb_strict_mode=@strict_mode;
......@@ -52,7 +52,11 @@ insert into t1 values (1), (11), (21), (33);
SELECT * FROM t1;
SHOW CREATE TABLE t1;
--replace_result #p# #P# #sp# #SP#
--list_files $MYSQLD_DATADIR/test
--let $regexp=/#sql-ib[0-9a-f]+\.ibd\n//
--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQLD_DATADIR/test
--replace_regex $regexp
--cat_file $MYSQLD_DATADIR.files.txt
--remove_file $MYSQLD_DATADIR.files.txt
SET DEBUG_SYNC='before_open_in_get_all_tables SIGNAL parked WAIT_FOR open';
SET DEBUG_SYNC='partition_open_error SIGNAL alter WAIT_FOR finish';
......
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