Commit 2edc2f96 authored by Luis Soares's avatar Luis Soares

Automerge from bug branch into latest mysql-5.5.

parents cf946cd0 69465fcf
# 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
-- connection master
-- source include/rpl_reset.inc
-- connection master
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] ********* SOW BINLOG EVENTS IN ... *********
-- source include/show_binlog_events.inc
-- echo [MASTER] ********* SOW BINLOG EVENTS *********
let $binlog_file= ;
-- source include/show_binlog_events.inc
-- echo [MASTER] ********* SOW BINLOG EVENTS ... LIMIT rows *********
let $binlog_limit= 3;
-- source include/show_binlog_events.inc
-- echo [MASTER] ********* SOW 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] ********* SOW BINLOG EVENTS IN ... *********
-- source include/show_binlog_events.inc
-- echo [SLAVE] ********* SOW BINLOG EVENTS *********
let $binlog_file= ;
-- source include/show_binlog_events.inc
-- echo [SLAVE] ********* SOW BINLOG EVENTS ... LIMIT rows *********
let $binlog_limit= 3;
-- source include/show_binlog_events.inc
-- echo [SLAVE] ********* SOW 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= ;
-- echo [SLAVE] ********* SOW RELAYLOG EVENTS IN ... *********
let $binlog_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1);
-- source include/show_relaylog_events.inc
-- echo [SLAVE] ********* SOW RELAYLOG EVENTS *********
let $binlog_file= ;
-- source include/show_relaylog_events.inc
-- echo [MASTER] ********* SOW 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] ********* SOW RELAYLOG EVENTS ... LIMIT offset,rows *********
let $binlog_limit= 1,3;
-- source include/show_relaylog_events.inc
# PART I
#
# SHOWs contents of binary logs on the master and both, binary and
# relay logs, on the slave.
#
--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
--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
--source extra/rpl_tests/rpl_show_log_events_with_varying_options.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
#
# PART II
#
# Although this second part of the test may seem redudant it is
# actually needed to assert that SHOW RELAYLOG EVENTS works properly
# with respect to the ordering of the relay log in relay-log.index.
#
# If no file is specified with "IN" then first relay log file in
# relay-log.index (ie, the oldest one) should be picked and its
# contents displayed. The same happens for SHOW BINLOG EVENTS, so we
# show them both. All in all, this is the reason for re-assert after
# MASTER and SLAVE's FLUSH LOGS operations.
#
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] ********* SOW BINLOG EVENTS IN ... *********
let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
-- source include/show_binlog_events.inc
-- echo [MASTER] ********* SOW 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] ********* SOW 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] ********* SOW BINLOG EVENTS *********
let $binlog_file= ;
-- source include/show_binlog_events.inc
-- echo [SLAVE] ********* SOW RELAYLOG EVENTS IN ... *********
-- source include/show_relaylog_events.inc
-- echo [SLAVE] ********* SOW RELAYLOG EVENTS *********
let $binlog_file= ;
-- source include/show_relaylog_events.inc
# clear show_binlog_event/show_relaylog_events parameters
let $binlog_file= ;
......
......@@ -74,6 +74,7 @@ let $_fake_relay_index= $_fake_datadir/$_fake_filename.index;
let $_fake_relay_log_purge= `SELECT @@global.relay_log_purge`;
RESET SLAVE;
let $_orphan_relay_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1);
# Create relay log file.
--copy_file $fake_relay_log $_fake_relay_log
......@@ -102,6 +103,8 @@ RESET SLAVE;
# Setup replication from existing relay log.
eval CHANGE MASTER TO MASTER_HOST='dummy.localdomain', RELAY_LOG_FILE='$_fake_filename-fake.000001', RELAY_LOG_POS=4;
# remove the orphan log file (became spurious)
-- remove_file $_fake_datadir/$_orphan_relay_file
--let $include_filename= setup_fake_relay_log.inc
--source include/end_include_file.inc
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