File: rpl_mysql_manager_race_condition.result

package info (click to toggle)
mariadb 1%3A11.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 765,428 kB
  • sloc: ansic: 2,382,827; cpp: 1,803,532; asm: 378,315; perl: 63,176; sh: 46,496; pascal: 40,776; java: 39,363; yacc: 20,428; python: 19,506; sql: 17,864; xml: 12,463; ruby: 8,544; makefile: 6,059; cs: 5,855; ada: 1,700; lex: 1,193; javascript: 1,039; objc: 80; tcl: 73; awk: 46; php: 22
file content (58 lines) | stat: -rw-r--r-- 2,241 bytes parent folder | download | duplicates (4)
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
47
48
49
50
51
52
53
54
55
56
57
58
include/master-slave.inc
[connection master]
connection master;
# Create a GTID event so the binlog background thread will submit a
# mysql handler job the next time mysqld is restarted.
create table t1 (a int);
include/save_master_gtid.inc
connection slave;
include/sync_with_master_gtid.inc
# Set a debug point that forces the main mysqld thread to sleep before
# anything is initialized for the mysql handle manager
# Restart the slave mysqld instance so it re-initializes with the
# binlog background thread submitting a mysql handler job and the
# mysql handler initialization suspending for a second. Without the fix
# associated with this test/patch, the following restart will error
# with a failed assertion.
include/rpl_restart_server.inc [server_number=2 parameters: --debug_dbug="+d,delay_start_handle_manager"]
include/start_slave.inc
#
# MDEV-33799
# Ensure that when the binary log is used for recovery (as tc log), that
# the recovery process cannot start the binlog background thread before
# the mysql handle manager has started.
connection slave;
# Add test suppresssions so crash recovery messages don't fail the test
set session sql_log_bin=0;
call mtr.add_suppression("mariadbd: Got error '145.*");
call mtr.add_suppression("Checking table:.*");
call mtr.add_suppression("mysql.gtid_slave_pos:.*hasn't closed the table properly");
call mtr.add_suppression("Can't init tc log");
call mtr.add_suppression("Aborting");
set session sql_log_bin=1;
# Create slave-side only table
create table t2 (a int) engine=innodb;
# Crash mariadbd when binlogging transaction to corrupt database state
connection slave1;
set @@session.debug_dbug="+d,crash_before_writing_xid";
insert into t2 values (1);
connection slave;
connection slave1;
Got one of the listed errors
# Restart mariadbd in recovery mode. Note --tc-heuristic-recover
# forces mysqld to exit with error, so we run mariadbd via CLI
# MYSQLD_LAST_CMD --debug_dbug="+d,delay_start_handle_manager" --tc-heuristic-recover=COMMIT
connection server_2;
connection slave1;
connection slave;
include/start_slave.inc
#
# Cleanup
#
connection master;
drop table t1;
include/save_master_gtid.inc
connection slave;
include/sync_with_master_gtid.inc
drop table t2;
include/rpl_end.inc