| 1 |
# The test verifies server binlog-based recovery. |
| 2 |
# |
| 3 |
# MDEV-23832 checksum error at server binlog recovery should not crash |
| 4 |
|
| 5 |
# The test logic really requires --log-bin. |
| 6 |
--source include/have_binlog_format_mixed.inc |
| 7 |
--source include/have_debug.inc |
| 8 |
|
| 9 |
--let $do_checksum = `SELECT @@global.master_verify_checksum` |
| 10 |
--let $debug_dbug_saved = `SELECT @@global.debug_dbug` |
| 11 |
--let $binlog_checksum = `SELECT @@global.binlog_checksum` |
| 12 |
set @@global.binlog_checksum = CRC32; |
| 13 |
|
| 14 |
call mtr.add_suppression("Replication event checksum verification failed"); |
| 15 |
call mtr.add_suppression("Error in Log_event::read_log_event"); |
| 16 |
|
| 17 |
# Proof of no crash follows. |
| 18 |
# There's no need for actual bin-loggable queries to the server |
| 19 |
--let $restart_parameters= --master_verify_checksum=ON --debug_dbug=+d,corrupt_read_log_event_char |
| 20 |
--let $shutdown_timeout=0 |
| 21 |
--source include/restart_mysqld.inc |
| 22 |
--let $restart_parameters= |
| 23 |
--let $shutdown_timeout= |
| 24 |
|
| 25 |
# |
| 26 |
# Cleanup |
| 27 |
|
| 28 |
--replace_regex /= .*/= VALUE/ |
| 29 |
--eval set @@global.debug_dbug = "$debug_dbug_saved" |
| 30 |
|
| 31 |
--replace_result $do_checksum DO_CHECKSUM |
| 32 |
--eval set @@global.master_verify_checksum = $do_checksum |
| 33 |
--replace_result $binlog_checksum BINLOG_CHECKSUM |
| 34 |
--eval set @@global.binlog_checksum = $binlog_checksum |
| 35 |
# |
| 36 |
--echo # EOF the test |
| 37 |
# |