File: encryption_threads_shutdown.test

package info (click to toggle)
mariadb 1%3A11.8.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 772,520 kB
  • sloc: ansic: 2,414,714; cpp: 1,791,394; asm: 381,336; perl: 62,905; sh: 49,647; pascal: 40,897; java: 39,363; python: 20,791; yacc: 20,432; sql: 17,907; xml: 12,344; ruby: 8,544; cs: 6,542; makefile: 6,145; ada: 1,879; lex: 1,193; javascript: 996; objc: 80; tcl: 73; awk: 46; php: 22
file content (46 lines) | stat: -rw-r--r-- 2,023 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# This test is for MDEV-24612 fix
--source include/have_innodb.inc
--source include/not_embedded.inc

call mtr.add_suppression("Creating system tablespace with existing redo log file is not recommended.");
call mtr.add_suppression("InnoDB: Database creation was aborted");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
call mtr.add_suppression("Fewer engines are enabled now than were before the crash");

--let $MYSQLD_DATADIR=`SELECT @@datadir`
--let $DATA= $MYSQLD_DATADIR/ibdata1
--let $DATACOPY=$MYSQLTEST_VARDIR/tmp/ibdata1
--let $UNDO_1= $MYSQLD_DATADIR/undo001
--let $UNDO_2= $MYSQLD_DATADIR/undo002
--let $UNDO_3= $MYSQLD_DATADIR/undo003
--let $UNDO_1_COPY=$MYSQLTEST_VARDIR/tmp/undo001
--let $UNDO_2_COPY=$MYSQLTEST_VARDIR/tmp/undo002
--let $UNDO_3_COPY=$MYSQLTEST_VARDIR/tmp/undo003

CREATE TABLE t(a INT) ENGINE=InnoDB;
--source include/kill_mysqld.inc
# Move the file to cause srv_init_abort_low() call from srv_start()
--move_file $DATA $DATACOPY
--move_file $UNDO_1 $UNDO_1_COPY
--move_file $UNDO_2 $UNDO_2_COPY
--move_file $UNDO_3 $UNDO_3_COPY

# If the bug is not fixed, the server will hang here. Note that the test is
# unstable because the condition
# "srv_n_fil_crypt_threads_started != srv_n_fil_crypt_threads" can be true
# in fil_crypt_set_thread_cnt() functions if encryption threads have not yet
# been finished. To make the test stable we need to add debug code which would
# check that all encryption threads were finished before the "while" loop
# with the above condition. And in this test we can't detect if the  debug code
# itself caused the hang or the code we are testing did it.
--source include/start_mysqld.inc
--error ER_UNKNOWN_STORAGE_ENGINE
SELECT * FROM t;
--source include/kill_mysqld.inc
--move_file $DATACOPY $DATA
--move_file $UNDO_1_COPY $UNDO_1
--move_file $UNDO_2_COPY $UNDO_2
--move_file $UNDO_3_COPY $UNDO_3
--source include/start_mysqld.inc
DROP TABLE t;