| 1 |
# This test is for MDEV-24612 fix |
| 2 |
--source include/have_innodb.inc |
| 3 |
--source include/not_embedded.inc |
| 4 |
|
| 5 |
call mtr.add_suppression("Creating system tablespace with existing redo log file is not recommended."); |
| 6 |
call mtr.add_suppression("InnoDB: Database creation was aborted"); |
| 7 |
call mtr.add_suppression("Plugin 'InnoDB' init function returned error."); |
| 8 |
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed."); |
| 9 |
call mtr.add_suppression("Fewer engines are enabled now than were before the crash"); |
| 10 |
|
| 11 |
--let $MYSQLD_DATADIR=`SELECT @@datadir` |
| 12 |
--let $DATA= $MYSQLD_DATADIR/ibdata1 |
| 13 |
--let $DATACOPY=$MYSQLTEST_VARDIR/tmp/ibdata1 |
| 14 |
--let $UNDO_1= $MYSQLD_DATADIR/undo001 |
| 15 |
--let $UNDO_2= $MYSQLD_DATADIR/undo002 |
| 16 |
--let $UNDO_3= $MYSQLD_DATADIR/undo003 |
| 17 |
--let $UNDO_1_COPY=$MYSQLTEST_VARDIR/tmp/undo001 |
| 18 |
--let $UNDO_2_COPY=$MYSQLTEST_VARDIR/tmp/undo002 |
| 19 |
--let $UNDO_3_COPY=$MYSQLTEST_VARDIR/tmp/undo003 |
| 20 |
|
| 21 |
CREATE TABLE t(a INT) ENGINE=InnoDB; |
| 22 |
--source include/kill_mysqld.inc |
| 23 |
# Move the file to cause srv_init_abort_low() call from srv_start() |
| 24 |
--move_file $DATA $DATACOPY |
| 25 |
--move_file $UNDO_1 $UNDO_1_COPY |
| 26 |
--move_file $UNDO_2 $UNDO_2_COPY |
| 27 |
--move_file $UNDO_3 $UNDO_3_COPY |
| 28 |
|
| 29 |
# If the bug is not fixed, the server will hang here. Note that the test is |
| 30 |
# unstable because the condition |
| 31 |
# "srv_n_fil_crypt_threads_started != srv_n_fil_crypt_threads" can be true |
| 32 |
# in fil_crypt_set_thread_cnt() functions if encryption threads have not yet |
| 33 |
# been finished. To make the test stable we need to add debug code which would |
| 34 |
# check that all encryption threads were finished before the "while" loop |
| 35 |
# with the above condition. And in this test we can't detect if the debug code |
| 36 |
# itself caused the hang or the code we are testing did it. |
| 37 |
--source include/start_mysqld.inc |
| 38 |
--error ER_UNKNOWN_STORAGE_ENGINE |
| 39 |
SELECT * FROM t; |
| 40 |
--source include/kill_mysqld.inc |
| 41 |
--move_file $DATACOPY $DATA |
| 42 |
--move_file $UNDO_1_COPY $UNDO_1 |
| 43 |
--move_file $UNDO_2_COPY $UNDO_2 |
| 44 |
--move_file $UNDO_3_COPY $UNDO_3 |
| 45 |
--source include/start_mysqld.inc |
| 46 |
DROP TABLE t; |