File: binlog_check_flush_log_assertion.test

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (52 lines) | stat: -rw-r--r-- 1,723 bytes parent folder | download
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
# ==== Purpose ====
#
# Verify that 'FLUSH LOGS' does not cause assertion failure any more,
# even if there is no binlog file before executing it.
#
# ==== Implementation ====
#
# 1) SET GLOBAL debug='d,error_unique_log_filename' to
#    cause 'FLUSH LOGS' and 'RESET MASTER' commands to error out.
# 2) Execute 'FLUSH LOGS' to verify that it does not cause
#    assertion failure any more.
#
# ==== References ====
#
# Bug #20592961  'FLUSH LOGS' POST FAULT INJECTION HITS ASSERT `! IS_SET()' AT SQL_ERROR.CC:381
# Bug #22732184  HEAP-USE-AFTER-FREE IN BINLOG.BINLOG_CHECK_FLUSH_LOG_ASSERTION

# Test in this file is binlog format agnostic, thus no need
# to rerun them for every format.
--source include/have_binlog_format_row.inc
--source include/have_debug.inc

--disable_query_log
call mtr.add_suppression("Can't generate a unique log-filename");
call mtr.add_suppression("MYSQL_BIN_LOG::open failed to generate new file name.");
call mtr.add_suppression("Failed to locate old binlog or relay log files");
call mtr.add_suppression('Could not open .*');
--enable_query_log
SET GLOBAL binlog_error_action= IGNORE_ERROR;
--let $debug_point= error_unique_log_filename
--source include/add_debug_point.inc

--error ER_NO_UNIQUE_LOGFILE
FLUSH LOGS;

# Restart the server to enable binary log.
--source include/restart_mysqld.inc
SET GLOBAL binlog_error_action= IGNORE_ERROR;
--source include/add_debug_point.inc

--error ER_NO_UNIQUE_LOGFILE
RESET MASTER;

--source include/remove_debug_point.inc

--error ER_UNKNOWN_TARGET_BINLOG
RESET MASTER;
SET GLOBAL binlog_error_action= ABORT_SERVER;

# Verify that 'FLUSH LOGS' does not cause assertion failure any more,
# even if there is no binlog before executing it.
FLUSH LOGS;