|
| 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 | +--error ER_ERROR_WHEN_EXECUTING_COMMAND |
| 24 | +eval SHOW BINLOG EVENTS FROM $start_pos; |
| 25 | +SET debug = "-d,simulate_seek_failure"; |
| 26 | + |
| 27 | +--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
| 28 | +SET debug = "+d,simulate_ostream_write_failure"; |
| 29 | +--error ER_BINLOG_LOGGING_IMPOSSIBLE |
| 30 | +INSERT INTO t1 VALUES(1); |
| 31 | + |
| 32 | +--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
| 33 | +--enable_reconnect |
| 34 | +--source include/wait_until_connected_again.inc |
| 35 | + |
| 36 | +--error 1 |
| 37 | +--exec $MYSQL_BINLOG file_not_exist >/dev/null |
| 38 | + |
| 39 | +--error 1,12 |
| 40 | +--exec $MYSQL_BINLOG -#d,simulate_init_io_cache_failure - > /dev/null 2>&1 |
| 41 | + |
| 42 | +--error 1,12 |
| 43 | +--exec $MYSQL_BINLOG -#d,simulate_init_io_cache_failure binlog.000001 > /dev/null 2>&1 |
| 44 | + |
| 45 | +--error 1,12 |
| 46 | +--exec $MYSQL_BINLOG --start-position=100000000 binlog.000001 > /dev/null 2>&1 |
| 47 | +DROP TABLE t1; |
| 48 | + |
0 commit comments