Debian Codegraph @

mysql-test/suite/binlog/t/binlog_half_crash_safe_ddl.test

raw
1 # ==== Purpose ====
2 # Prove successful server recovery after simulated crash while
3 # there were general DDL queries in processing.
4 # The test is destined for eventual merge with binlog_crash_safe_ddl.
5 #
6 # ==== Implementation ====
7 # Closely follows @c see binlog_crash_safe_ddl.test.
8 #
9 # Unlike the referred (mostly) acl specific file this one provides merely
10 # "stub" checks after some of simulated crashes for cases that are not fully
11 # 2pc-ready.
12 # TODO: WL#9536 to refine, complete or reuse
13 # the stub checks.
14 #
15 # ==== References ====
16 # WL#9175 Correct recovery of DDL statements/transactions by binary log
17 # WL#9536 is responsible for adding to 2pc support to some
18 # of DDL:s. The current testing skips the crash-recovery testing in those case
19 # with tagging them as todo objects for a host WL.
20 #
21 # ==== Exempts ====
22 # The following DDL commands are excluded from testing:
23 #
24 # SERVER (Create etc)
25 # An excerpt from Docs: In MySQL 5.7, 'CREATE SERVER' is not written to the binary log,
26 # regardless of the logging format that is in use.
27 #
28 # LOGFILE-GROUP (Create etc)
29 # Not supported by Innodb.
30 #
31 # ALTER TABLESPACE
32 # Not supported by Innodb.
33 #
34 # === Limitations ===
35 # --force-restart is required to run the test.
36 #
37 # When the object deletion was interrupted by crash
38 # there could be errors on object recreation attempt like
39 # 1007: Can't create database '...'; database exists
40 # due to
41 # Bug #25663287 DROP DATABASE DOESN'T GETS RECOVERED CORRECTLY UPON POST BINLOG CRASH/RESTART
42 # or asserts like in
43 # Bug #25651042 TANSACTION DOES NOT POST-CRASH RECOVER IN INNODB EVEN IF PREPARED AND BINLOGGED
44 #
45
46 --source include/not_valgrind.inc
47 --source include/not_crashrep.inc
48 --source include/have_log_bin.inc
49 --source include/have_debug.inc
50 --source include/have_binlog_format_mixed.inc
51
52 --disable_query_log
53 call mtr.add_suppression("Could not find a valid tablespace file for");
54 --enable_query_log
55
56 # The *internal* var is used by gtid_step_assert.inc
57 --let $gtid_mode_on= `SELECT @@GLOBAL.GTID_MODE = 'ON'`
58 # To use by gtid_assert
59 --let $gtid_mode= `SELECT @@GLOBAL.GTID_MODE`
60 --source include/gtid_utils.inc
61 # Instructing gtid_step_assert called by sourced file
62 # to work in gtid-mode OFF as well.
63 # Besides, there's a reason for a bug to fix 'cos setting $gtid_mode
64 # turns out insufficient for $gtid_step_assert to keep the value 1 for
65 # an internal "_"-var of include/gtid_step_assert.inc.
66 --let $gtid_step_gtid_mode_agnostic=`SELECT '$gtid_mode' != 'ON'`
67
68 # The post_prepare crash is simulated only when the correspoding feature
69 # is fully 2pc-supported. The default set of simulation control parameters
70 # below assumes a feature can't be rolled back, but can be committed
71 # once found prepared and logged.
72 --let $do_pre_binlog=0
73 --let $do_post_binlog=1
74 --let $do_only_regular_logging=0
75 # todo: the $pre_binlog_crash_check:s are to be activated/refined once
76 # the corresponding has learned how to rollback (WL9536).
77 # E.g CREATE|DROP|ALTER|RENAME table.
78
79 --let $table=t_2
80 --source extra/binlog_tests/binlog_ddl_half_atomic.inc
81
82 # Cleanup.
83 --source include/gtid_utils_end.inc