| 1 |
# Init: Clear binary logs from previous tests. |
| 2 |
RESET MASTER; |
| 3 |
==== R1: Error for corrupted file ==== |
| 4 |
# Create a corrupted binary log. |
| 5 |
# Adding debug point 'set_query_log_event_size_to_5' to @@GLOBAL.debug |
| 6 |
CREATE TABLE t (a INT); |
| 7 |
# Removing debug point 'set_query_log_event_size_to_5' from @@GLOBAL.debug |
| 8 |
# Verify that mysqlbinlog fails |
| 9 |
include/save_binlog_position.inc |
| 10 |
include/assert_command_output.inc |
| 11 |
# Rotate and verify that mysqlbinlog still fails. |
| 12 |
FLUSH BINARY LOGS; |
| 13 |
include/assert_command_output.inc |
| 14 |
# Clean up. |
| 15 |
DROP TABLE t; |
| 16 |
RESET MASTER; |
| 17 |
==== R2.1: No error for truncated file when IN_USE flag is set ==== |
| 18 |
# Create a truncated binary log. |
| 19 |
CREATE TABLE t (a INT); |
| 20 |
include/save_binlog_position.inc |
| 21 |
include/assert_command_output.inc |
| 22 |
# Clean up. |
| 23 |
DROP TABLE t; |
| 24 |
RESET MASTER; |
| 25 |
==== R2.2: Error for truncated file when IN_USE flag is not set ==== |
| 26 |
# Create a truncated binary log. |
| 27 |
CREATE TABLE t (a INT); |
| 28 |
include/save_binlog_position.inc |
| 29 |
FLUSH BINARY LOGS; |
| 30 |
# Rotate and verify that mysqlbinlog now fails. |
| 31 |
include/assert_command_output.inc |
| 32 |
# Clean up. |
| 33 |
DROP TABLE t; |
| 34 |
RESET MASTER; |