Commit 0a5f3802 authored by Luis Soares's avatar Luis Soares

BUG#59444

Refactoring effort on test case rpl_show_relaylog_events
requested by reviewers.
parent c0de0932
# 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
# 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
......@@ -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= ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment