| 1 |
# Coverage Tests for WL#10956 |
| 2 |
--source include/not_valgrind.inc |
| 3 |
--source include/have_debug.inc |
| 4 |
--source include/have_binlog_format_row.inc |
| 5 |
call mtr.add_suppression("Binary logging not possible"); |
| 6 |
call mtr.add_suppression("Attempting backtrace"); |
| 7 |
RESET MASTER; |
| 8 |
|
| 9 |
CREATE TABLE t1(c1 INT); |
| 10 |
--let $start_pos = query_get_value(SHOW MASTER STATUS, Position, 1) |
| 11 |
|
| 12 |
SET debug = "+d,simulate_init_io_cache_failure"; |
| 13 |
--error ER_ERROR_WHEN_EXECUTING_COMMAND |
| 14 |
SHOW BINLOG EVENTS; |
| 15 |
SET debug = "-d,simulate_init_io_cache_failure"; |
| 16 |
|
| 17 |
SET debug = "+d,simulate_allocate_failure"; |
| 18 |
--error ER_ERROR_WHEN_EXECUTING_COMMAND |
| 19 |
SHOW BINLOG EVENTS; |
| 20 |
SET debug = "-d,simulate_allocate_failure"; |
| 21 |
|
| 22 |
SET debug = "+d,simulate_seek_failure"; |
| 23 |
# Replace the numeric value of start_pos to make it future change proof |
| 24 |
--replace_result $start_pos START_POS |
| 25 |
--error ER_ERROR_WHEN_EXECUTING_COMMAND |
| 26 |
eval SHOW BINLOG EVENTS FROM $start_pos; |
| 27 |
SET debug = "-d,simulate_seek_failure"; |
| 28 |
|
| 29 |
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
| 30 |
SET debug = "+d,simulate_ostream_write_failure"; |
| 31 |
--error ER_BINLOG_LOGGING_IMPOSSIBLE |
| 32 |
INSERT INTO t1 VALUES(1); |
| 33 |
|
| 34 |
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
| 35 |
--enable_reconnect |
| 36 |
--source include/wait_until_connected_again.inc |
| 37 |
|
| 38 |
--error 1 |
| 39 |
--exec $MYSQL_BINLOG file_not_exist >/dev/null |
| 40 |
|
| 41 |
--error 1,12 |
| 42 |
--exec $MYSQL_BINLOG -#d,simulate_init_io_cache_failure - > /dev/null 2>&1 |
| 43 |
|
| 44 |
--error 1,12 |
| 45 |
--exec $MYSQL_BINLOG -#d,simulate_init_io_cache_failure binlog.000001 > /dev/null 2>&1 |
| 46 |
|
| 47 |
--error 1,12 |
| 48 |
--exec $MYSQL_BINLOG --start-position=100000000 binlog.000001 > /dev/null 2>&1 |
| 49 |
DROP TABLE t1; |
| 50 |
|