mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-13625: Add the test innodb.innodb-wl5980-debug
This commit is contained in:
51
mysql-test/suite/innodb/t/innodb-wl5980-debug.test
Normal file
51
mysql-test/suite/innodb/t/innodb-wl5980-debug.test
Normal file
@ -0,0 +1,51 @@
|
||||
#
|
||||
# This testcase is to check the various debug injection points
|
||||
# to make sure error conditions react corectly and acheive
|
||||
# better code coverage.
|
||||
#
|
||||
|
||||
# Not supported in embedded
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
# These messages are expected in the log
|
||||
call mtr.add_suppression("Cannot find space id [0-9]+ in the tablespace memory cache");
|
||||
call mtr.add_suppression("Cannot rename table 'test/t1' to 'test/t2' since the dictionary cache already contains 'test/t2'.");
|
||||
|
||||
# Set up some variables
|
||||
LET $MYSQL_DATA_DIR = `select @@datadir`;
|
||||
LET $data_directory_clause = DATA DIRECTORY='$MYSQL_TMP_DIR/alt_dir';
|
||||
--enable_query_log
|
||||
|
||||
--echo #
|
||||
--echo # WL5980 Remote tablespace debug error injection tests.
|
||||
--echo #
|
||||
|
||||
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
|
||||
eval CREATE TABLE t1 (a int KEY, b text) ENGINE=Innodb $data_directory_clause ;
|
||||
INSERT INTO t1 VALUES (1, 'tablespace');
|
||||
SELECT * FROM t1;
|
||||
|
||||
--echo #
|
||||
--echo # Test the second injection point in fil_rename_tablespace().
|
||||
--echo # Make sure the table is useable after this failure.
|
||||
--echo #
|
||||
SET @save_dbug=@@debug_dbug;
|
||||
SET debug_dbug="+d,fil_rename_tablespace_failure_2";
|
||||
--disable_result_log
|
||||
--error ER_ERROR_ON_RENAME
|
||||
RENAME TABLE t1 TO t2;
|
||||
--enable_result_log
|
||||
SET debug_dbug=@save_dbug;
|
||||
INSERT INTO t1 VALUES (2, 'tablespace');
|
||||
SELECT * FROM t1;
|
||||
|
||||
--echo #
|
||||
--echo # Cleanup
|
||||
--echo #
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--rmdir $MYSQL_TMP_DIR/alt_dir/test
|
||||
--rmdir $MYSQL_TMP_DIR/alt_dir
|
Reference in New Issue
Block a user