diff options
Diffstat (limited to 'mysql-test/extra')
3 files changed, 46 insertions, 84 deletions
diff --git a/mysql-test/extra/rpl_tests/rpl_show_binlog_events.inc b/mysql-test/extra/rpl_tests/rpl_show_binlog_events.inc new file mode 100644 index 00000000000..4530f8c639a --- /dev/null +++ b/mysql-test/extra/rpl_tests/rpl_show_binlog_events.inc @@ -0,0 +1,17 @@ +# Include file for rpl_show_relaylog_events.inc + +--let $log_type= BINLOG +if ($is_relay_log) { + --let $log_type= RELAYLOG +} +--let $args= +if ($binlog_file != '') { + --let $args= IN <FILE> +} +if ($binlog_limit) { + --let $args= $args LIMIT $binlog_limit +} +--echo ******** [$CURRENT_CONNECTION] SHOW $log_type EVENTS $args ******** +--source include/show_events.inc + + diff --git a/mysql-test/extra/rpl_tests/rpl_show_log_events_with_varying_options.inc b/mysql-test/extra/rpl_tests/rpl_show_log_events_with_varying_options.inc new file mode 100644 index 00000000000..411f388aaf3 --- /dev/null +++ b/mysql-test/extra/rpl_tests/rpl_show_log_events_with_varying_options.inc @@ -0,0 +1,11 @@ +# Include file for rpl_show_log_events.inc + +--let $binlog_limit= +--source extra/rpl_tests/rpl_show_binlog_events.inc +--let $binlog_limit= 1 +--source extra/rpl_tests/rpl_show_binlog_events.inc +--let $binlog_limit= 1,3 +--source extra/rpl_tests/rpl_show_binlog_events.inc +--let $binlog_limit= +--let $binlog_file= +--source extra/rpl_tests/rpl_show_binlog_events.inc diff --git a/mysql-test/extra/rpl_tests/rpl_show_relaylog_events.inc b/mysql-test/extra/rpl_tests/rpl_show_relaylog_events.inc index d230b743ae8..b94648479c6 100644 --- a/mysql-test/extra/rpl_tests/rpl_show_relaylog_events.inc +++ b/mysql-test/extra/rpl_tests/rpl_show_relaylog_events.inc @@ -7,103 +7,37 @@ CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (2); INSERT INTO t1 VALUES (3); -INSERT INTO t1 VALUES (4); -INSERT INTO t1 VALUES (5); -INSERT INTO t1 VALUES (6); --- echo [MASTER] ********* SHOW BINLOG EVENTS IN ... ********* -let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1); --- source include/show_binlog_events.inc +--let $is_relay_log= 0 +--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1) +--source extra/rpl_tests/rpl_show_log_events_with_varying_options.inc --- echo [MASTER] ********* SHOW BINLOG EVENTS ********* -let $binlog_file= ; --- source include/show_binlog_events.inc - --- echo [MASTER] ********* SHOW BINLOG EVENTS ... LIMIT rows ********* -let $binlog_limit= 3; --- source include/show_binlog_events.inc - --- echo [MASTER] ********* SHOW BINLOG EVENTS ... LIMIT offset,rows ********* -let $binlog_limit= 1,4; --- source include/show_binlog_events.inc - -# clear show_binlog_event/show_relaylog_events parameters -let $binlog_limit= ; - --- sync_slave_with_master - --- echo [SLAVE] ********* SHOW BINLOG EVENTS IN ... ********* -let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1); --- source include/show_binlog_events.inc - --- echo [SLAVE] ********* SHOW BINLOG EVENTS ********* -let $binlog_file= ; --- source include/show_binlog_events.inc - --- echo [SLAVE] ********* SHOW BINLOG EVENTS ... LIMIT rows ********* -let $binlog_limit= 3; --- source include/show_binlog_events.inc - --- echo [SLAVE] ********* SHOW BINLOG EVENTS ... LIMIT offset,rows ********* -let $binlog_limit= 1,4; --- source include/show_binlog_events.inc - -# clear show_binlog_event/show_relaylog_events parameters -let $binlog_limit= ; +--sync_slave_with_master +--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1) +--source extra/rpl_tests/rpl_show_log_events_with_varying_options.inc --- echo [SLAVE] ********* SHOW RELAYLOG EVENTS IN ... ********* -let $binlog_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1); --- source include/show_relaylog_events.inc - --- echo [SLAVE] ********* SHOW RELAYLOG EVENTS ********* -let $binlog_file= ; --- source include/show_relaylog_events.inc - --- echo [MASTER] ********* SHOW RELAYLOG EVENTS ... LIMIT rows ********* -let $binlog_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1); -let $binlog_limit= 3; --- source include/show_relaylog_events.inc - --- echo [MASTER] ********* SHOW RELAYLOG EVENTS ... LIMIT offset,rows ********* -let $binlog_limit= 1,3; --- source include/show_relaylog_events.inc +--let $is_relay_log= 1 +--let $binlog_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1) +--source extra/rpl_tests/rpl_show_log_events_with_varying_options.inc FLUSH LOGS; -let $binlog_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1); -- connection master FLUSH LOGS; DROP TABLE t1; -# clear show_binlog_event/show_relaylog_events parameters -let $binlog_file= ; -let $binlog_limit= ; - --- echo [MASTER] ********* SHOW BINLOG EVENTS IN ... ********* -let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1); --- source include/show_binlog_events.inc - --- echo [MASTER] ********* SHOW BINLOG EVENTS ********* -let $binlog_file= ; --- source include/show_binlog_events.inc +--let $is_relay_log= 0 +--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1) +--source extra/rpl_tests/rpl_show_log_events_with_varying_options.inc --- sync_slave_with_master +--sync_slave_with_master +--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1) +--source extra/rpl_tests/rpl_show_log_events_with_varying_options.inc --- echo [SLAVE] ********* SHOW BINLOG EVENTS IN ... ********* -let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1); --- source include/show_binlog_events.inc +--let $is_relay_log= 1 +--let $binlog_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1) +--source extra/rpl_tests/rpl_show_log_events_with_varying_options.inc --- echo [SLAVE] ********* SHOW BINLOG EVENTS ********* -let $binlog_file= ; --- source include/show_binlog_events.inc - --- echo [SLAVE] ********* SHOW RELAYLOG EVENTS IN ... ********* -let $binlog_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1); --- source include/show_relaylog_events.inc - --- echo [SLAVE] ********* SHOW RELAYLOG EVENTS ********* -let $binlog_file= ; --- source include/show_relaylog_events.inc # clear show_binlog_event/show_relaylog_events parameters let $binlog_file= ; |