Bug #49741 test files contain explicit references to bin/relay-log positions
Some of the test cases reference to binlog position and these position numbers are written into result explicitly. It is difficult to maintain if log event format changes. There are a couple of cases explicit position number appears, we handle them in different ways A. 'CHANGE MASTER ...' with MASTER_LOG_POS or/and RELAY_LOG_POS options Use --replace_result to mask them. B. 'SHOW BINLOG EVENT ...' Replaced by show_binlog_events.inc or wait_for_binlog_event.inc. show_binlog_events.inc file's function is enhanced by given $binlog_file and $binlog_limit. C. 'SHOW SLAVE STATUS', 'show_slave_status.inc' and 'show_slave_status2.inc' For the test cases just care a few items in the result of 'SHOW SLAVE STATUS', only the items related to each test case are showed. 'show_slave_status.inc' is rebuild, only the given items in $status_items will be showed. 'check_slave_is_running.inc' and 'check_slave_no_error.inc' and 'check_slave_param.inc' are auxiliary files helping to show running status and error information easily. mysql-test/extra/binlog_tests/binlog.test: It only cares whether current binlog file index is changed, so it is ok with 'show_master_status.inc' instead of 'show mater status'. mysql-test/extra/binlog_tests/blackhole.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/extra/rpl_tests/rpl_deadlock.test: Use 'check_slave_is_running.inc' instead of 'show_slave_status2.inc'. mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test: Use 'check_slave_is_running.inc' instead of 'show slave status' statement. mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test: Use 'wait_for_slave_sql_error.inc' and 'ait_for_slave_sql_error_and_skip.inc' instead of 'show slave status'. mysql-test/extra/rpl_tests/rpl_flsh_tbls.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test: It is need now to give a error number, so use 'wait_for_slave_io_to_stop.inc' instead of 'wait_for_slave_io_error.inc'. mysql-test/extra/rpl_tests/rpl_insert_delayed.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/extra/rpl_tests/rpl_log.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. se 'check_slave_is_running.inc' instead of 'show slave status' statement. mysql-test/extra/rpl_tests/rpl_max_relay_size.test: se 'check_slave_is_running.inc' instead of 'show slave status' statement. mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/extra/rpl_tests/rpl_reset_slave.test: Use 'show_slave_status.inc' instead of 'show_slave_status2.inc' statement. Use 'check_slave_no_error.inc' to simplify the check that there is no error. mysql-test/extra/rpl_tests/rpl_row_basic.test: Use 'check_slave_is_running.inc' to verify that Slave threads are running well. Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening. mysql-test/extra/rpl_tests/rpl_row_tabledefs.test: Use 'show_slave_error_status_and_skip.inc' instead of 'show slave status'. mysql-test/include/check_slave_is_running.inc: To make sure both sql and io thread are running well. If not, the test will be aborted. mysql-test/include/check_slave_no_error.inc: To make sure both sql and io thread have no error. If not, the test will be aborted. mysql-test/include/get_relay_log_pos.inc: According to the position of a log event in master binlog file, find the peer position of a log event in relay log file. mysql-test/include/rpl_stmt_seq.inc: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/include/show_binlog_events.inc: Add two options $binlog_file and $binlog_limit for showing binlog events from different binlog files or/and given different limits on position or row number. mysql-test/include/show_rpl_debug_info.inc: Add 'SELECT NOW()' in the debug information. mysql-test/include/show_slave_status.inc: It's more clean and tidy Only the given columns of slave status are printed. mysql-test/include/test_fieldsize.inc: Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening. There is no need to print the result of 'show slave stutus'. mysql-test/include/wait_for_binlog_event.inc: Use show_rpl_debug_info.inc instead of 'SHOW BINLOG EVENTS'. mysql-test/include/wait_for_slave_io_error.inc: Add $slave_io_errno and $show_slave_io_error, it waits only a given error. mysql-test/include/wait_for_slave_param.inc: Use die instead of exit. mysql-test/include/wait_for_slave_sql_error.inc: Add $slave_sql_errno and $show_slave_sql_error, it waits only a given error. mysql-test/include/wait_for_status_var.inc: Use die instead of exit. mysql-test/r/flush_block_commit_notembedded.result: It checks whether somethings are binlogged, so we using 'show_binlog_event.inc' instead of 'show master status'. mysql-test/r/multi_update.result: It checks whether somethings are binlogged, so we using 'show_binlog_event.inc' instead of 'show master status'. mysql-test/suite/binlog/r/binlog_innodb.result: It checks whether somethings are binlogged, so we using 'show_binlog_event.inc' instead of 'show master status'. mysql-test/suite/binlog/r/binlog_row_binlog.result: Position in the result of 'show master status' is replaced by '#'. mysql-test/suite/binlog/r/binlog_stm_binlog.result: Position in the result of 'show master status' is replaced by '#'. mysql-test/suite/binlog/t/binlog_innodb.test: It checks whether somethings are binlogged, so we use 'show_binlog_event.inc' instead of 'show master status'. mysql-test/suite/binlog/t/binlog_stm_binlog.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/bugs/r/rpl_bug36391.result: Position in the result of 'show master status' is replaced by '#'. mysql-test/suite/bugs/t/rpl_bug12691.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/bugs/t/rpl_bug36391.test: 'show master status' is replaced by 'show_master_status.inc'. Position in the result of 'show master status' is replaced by '#'. mysql-test/suite/engines/funcs/r/rpl_000015.result: It checks whether somethings are binlogged, so we using 'show_binlog_event.inc' instead of 'show master status'. mysql-test/suite/engines/funcs/t/rpl_000015.test: Use 'check_slave_is_running.inc' to verify that Slave threads are running well. mysql-test/suite/engines/funcs/t/rpl_REDIRECT.test: Use 'query_vertical SHOW SLAVE STATUS' instead of 'show slave status'. There is no status columns in the result file, for no slave exists on master's server. mysql-test/suite/engines/funcs/t/rpl_change_master.test: This test just care whether Read_Master_Log_Pos is equal to Exec_Master_Log_Pos after 'CHANGE MASTER ..'. So 'show slave status' is removed and just check the value of Read_Master_Log_Pos and Exec_Master_Log_Pos. mysql-test/suite/engines/funcs/t/rpl_empty_master_crash.test: We doesn't really need the statement. mysql-test/suite/engines/funcs/t/rpl_flushlog_loop.test: Just show Relay_Log_File, running status and error informations. Use 'check_slave_is_running.inc' to verify that Slave threads are running well. mysql-test/suite/engines/funcs/t/rpl_loaddata_s.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/engines/funcs/t/rpl_log_pos.test: Mask the explicit positions in the result file. Use 'check_slave_no_error.inc' to simplify the check that there is no error. Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening. There is no need to print the result of 'show slave stutus'. mysql-test/suite/engines/funcs/t/rpl_rbr_to_sbr.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/engines/funcs/t/rpl_row_drop.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/engines/funcs/t/rpl_row_inexist_tbl.test: Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening. There is no need to print the result of 'show slave stutus'. mysql-test/suite/engines/funcs/t/rpl_row_until.test: Use 'check_slave_param.inc' to check whether SQL Thread stop at a right position, and use binlog position variables instead of explicit number in the 'CHANGE MASTER' statements. Mask the explicit binary log positions in the result file. mysql-test/suite/engines/funcs/t/rpl_server_id1.test: Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening. There is no need to print the result of 'show slave stutus'. Use 'check_slave_no_error.inc' to simplify the check that there is no error. mysql-test/suite/engines/funcs/t/rpl_server_id2.test: It doesn't really need in this test. mysql-test/suite/engines/funcs/t/rpl_slave_status.test: Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening. There is no need to print the result of 'show slave stutus'. mysql-test/suite/engines/funcs/t/rpl_switch_stm_row_mixed.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/manual/t/rpl_replication_delay.test: Use 'show_slave_status.inc' instead of 'show slave status'. mysql-test/suite/parts/t/rpl_partition.test: Use 'check_slave_is_running.inc' instead of 'show slave status' statement. mysql-test/suite/rpl/include/rpl_mixed_ddl.inc: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/rpl/include/rpl_mixed_dml.inc: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/rpl/t/rpl_000015.test: Use 'show_slave_status.inc' instead of 'show_slave_status2.inc'. mysql-test/suite/rpl/t/rpl_binlog_grant.test: Use 'wait_for_binlog_event.inc' instead of 'show binlog events' statement. mysql-test/suite/rpl/t/rpl_bug33931.test: Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening. There is no need to print the result of 'show slave stutus'. mysql-test/suite/rpl/t/rpl_change_master.test: This test just care whether Read_Master_Log_Pos is equal to Exec_Master_Log_Pos after 'CHANGE MASTER ..'. So 'show slave status' is removed and just check the value of Read_Master_Log_Pos and Exec_Master_Log_Pos. mysql-test/suite/rpl/t/rpl_critical_errors.test: Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening. There is no need to print the result of 'show slave stutus'. mysql-test/suite/rpl/t/rpl_dual_pos_advance.test: Mask the explicit position numbers in result file. It is restricted running on SBR, for it want to binlog 'set @a=1' statement. mysql-test/suite/rpl/t/rpl_empty_master_crash.test: It doesn't need in this test. mysql-test/suite/rpl/t/rpl_flushlog_loop.test: UUse 'check_slave_is_running.inc' and 'show_slave_status.inc' instead of 'show slave status' statement. mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test: Use 'wait_for_slave_io_error.inc' to wait the given io thread error happening. mysql-test/suite/rpl/t/rpl_grant.test: It doesn't need in this test. mysql-test/suite/rpl/t/rpl_incident.test: Use 'check_slave_is_running.inc' instead of 'show slave status' statement. mysql-test/suite/rpl/t/rpl_known_bugs_detection.test: Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening. There is no need to print the result of 'show slave stutus'. mysql-test/suite/rpl/t/rpl_loaddata_fatal.test: Use 'wait_for_slave_sql_error_and_skip.inc' to wait the given sql thread error happening and then skip the event. There is no need to print the result of 'show slave stutus'. mysql-test/suite/rpl/t/rpl_log_pos.test: Use 'wait_for_slave_io_error.inc' to wait the given io thread error happening. There is no need to print the result of 'show slave status'. mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/rpl/t/rpl_replicate_do.test: Use 'show_slave_status.inc' instead of 'show slave status'. mysql-test/suite/rpl/t/rpl_rotate_logs.test: Use 'show_slave_status.inc' instead of 'show_slave_status2.inc'. mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/rpl/t/rpl_row_create_table.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/rpl/t/rpl_row_drop.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/rpl/t/rpl_row_until.test: Use 'check_slave_param.inc' to check whether SQL Thread stop at a right position, and use binlog position variables instead of explicit number in the 'CHANGE MASTER' statements. mysql-test/suite/rpl/t/rpl_skip_error.test: Use 'check_slave_is_running.inc' instead of 'show slave status' statement. mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test: Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening. There is no need to print the result of 'show slave status'. mysql-test/suite/rpl/t/rpl_slave_skip.test: Use 'check_slave_param.inc' to check whether SQL Thread stop at a right position, and mask the explicit position number in the 'CHANGE MASTER' statements. mysql-test/suite/rpl/t/rpl_sp.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/suite/rpl/t/rpl_ssl.test: Use 'show_slave_status.inc' instead of 'show slave status'. mysql-test/suite/rpl/t/rpl_ssl1.test: Use 'show_slave_status.inc' instead of 'show slave status'. mysql-test/suite/rpl/t/rpl_stm_until.test: Use 'check_slave_param.inc' to check whether SQL Thread stop at a right position, and use binlog position variables instead of explicit number in the 'CHANGE MASTER' statements. mysql-test/suite/rpl/t/rpl_temporary_errors.test: Use 'check_slave_is_running.inc' instead of 'show slave status' statement. mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test: Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening. There is no need to print the result of 'show slave status'. mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test: Use 'check_slave_is_running.inc' instead of 'show slave status' statement. mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test: Use 'check_slave_is_running.inc' instead of 'show slave status' statement. mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test: Use 'check_slave_is_running.inc' instead of 'show slave status' statement. mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test: Mask master_log_pos and master_log_file mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test: Use 'check_slave_is_running.inc' instead of 'show slave status' statement. mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/t/alter_table-big.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/t/create-big.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/t/ctype_cp932_binlog_stm.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement. mysql-test/t/flush_block_commit_notembedded.test: It checks whether somethings are binlogged, so we using 'show_binlog_event.inc' instead of 'show master status'. mysql-test/t/multi_update.test: It checks whether somethings are binlogged, so we using 'wait_binlog_event.inc' instead of 'show master status'. mysql-test/t/sp_trans_log.test: Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
This commit is contained in:
parent
f4e46c5ce1
commit
7e80f1c5dc
@ -41,13 +41,10 @@ while ($1)
|
|||||||
--enable_query_log
|
--enable_query_log
|
||||||
commit;
|
commit;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
--replace_column 2 # 5 #
|
--source include/show_binlog_events.inc
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
|
||||||
show binlog events in 'master-bin.000001' from 106;
|
--source include/show_binlog_events.inc
|
||||||
--replace_column 2 # 5 #
|
--let $binlog_file=
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
|
||||||
show binlog events in 'master-bin.000002' from 106;
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug#22540 - Incorrect value in column End_log_pos of
|
# Bug#22540 - Incorrect value in column End_log_pos of
|
||||||
@ -77,8 +74,7 @@ insert into t1 values (2);
|
|||||||
insert into t1 values (3);
|
insert into t1 values (3);
|
||||||
commit;
|
commit;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
|
--source include/show_binlog_events.inc
|
||||||
show binlog events from 0;
|
|
||||||
|
|
||||||
# now show that nothing breaks if we need to read from the cache more
|
# now show that nothing breaks if we need to read from the cache more
|
||||||
# than once, resulting in split event-headers
|
# than once, resulting in split event-headers
|
||||||
@ -100,8 +96,7 @@ while ($1)
|
|||||||
commit;
|
commit;
|
||||||
enable_query_log;
|
enable_query_log;
|
||||||
|
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
|
--source include/show_binlog_events.inc
|
||||||
show binlog events from 0;
|
|
||||||
|
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
@ -122,8 +117,7 @@ set @b= 14632475938453979136;
|
|||||||
execute stmt using @a, @b;
|
execute stmt using @a, @b;
|
||||||
deallocate prepare stmt;
|
deallocate prepare stmt;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
|
--source include/show_binlog_events.inc
|
||||||
show binlog events from 0;
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -249,14 +243,15 @@ reset master;
|
|||||||
drop table if exists t3;
|
drop table if exists t3;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
create table t3 (a int(11) NOT NULL AUTO_INCREMENT, b text, PRIMARY KEY (a) ) engine=innodb;
|
create table t3 (a int(11) NOT NULL AUTO_INCREMENT, b text, PRIMARY KEY (a) ) engine=innodb;
|
||||||
show master status;
|
source include/show_master_status.inc;
|
||||||
let $it=4;
|
let $it=4;
|
||||||
while ($it)
|
while ($it)
|
||||||
{
|
{
|
||||||
insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
|
insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
|
||||||
dec $it;
|
dec $it;
|
||||||
}
|
}
|
||||||
show master status /* must show new binlog index after rotating */;
|
# must show new binlog index after rotating;
|
||||||
|
source include/show_master_status.inc;
|
||||||
drop table t3;
|
drop table t3;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
|
@ -125,12 +125,7 @@ select * from t1;
|
|||||||
select * from t2;
|
select * from t2;
|
||||||
select * from t3;
|
select * from t3;
|
||||||
|
|
||||||
let $VERSION=`select version()`;
|
--source include/show_binlog_events.inc
|
||||||
--replace_result $VERSION VERSION
|
|
||||||
--replace_column 2 # 4 # 5 #
|
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
|
||||||
--replace_regex /file_id=[0-9]+/file_id=#/
|
|
||||||
show binlog events;
|
|
||||||
|
|
||||||
drop table t1,t2,t3;
|
drop table t1,t2,t3;
|
||||||
|
|
||||||
@ -168,18 +163,21 @@ set autocommit=0;
|
|||||||
start transaction;
|
start transaction;
|
||||||
insert into t1 values(1);
|
insert into t1 values(1);
|
||||||
commit;
|
commit;
|
||||||
|
|
||||||
|
let $master_log_pos_1= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||||
|
|
||||||
start transaction;
|
start transaction;
|
||||||
insert into t1 values(2);
|
insert into t1 values(2);
|
||||||
rollback;
|
rollback;
|
||||||
|
|
||||||
|
let $master_log_pos_2= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||||
|
if (`SELECT $master_log_pos_2 <> $master_log_pos_1`)
|
||||||
|
{
|
||||||
|
echo $master_log_pos_1 $master_log_pos_2;
|
||||||
|
die Rollbacked transaction has been binlogged;
|
||||||
|
}
|
||||||
|
|
||||||
set autocommit=1;
|
set autocommit=1;
|
||||||
|
|
||||||
let $VERSION=`select version()`;
|
|
||||||
--replace_result $VERSION VERSION
|
|
||||||
--replace_column 2 # 4 # 5 #
|
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
|
||||||
--replace_regex /file_id=[0-9]+/file_id=#/
|
|
||||||
show binlog events;
|
|
||||||
|
|
||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -61,7 +61,7 @@ sync_with_master;
|
|||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
SELECT * FROM t3;
|
SELECT * FROM t3;
|
||||||
# Check that no error is reported
|
# Check that no error is reported
|
||||||
--source include/show_slave_status2.inc
|
source include/check_slave_is_running.inc;
|
||||||
--echo
|
--echo
|
||||||
|
|
||||||
# 2) Test lock wait timeout
|
# 2) Test lock wait timeout
|
||||||
@ -89,7 +89,7 @@ sync_with_master;
|
|||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
SELECT * FROM t3;
|
SELECT * FROM t3;
|
||||||
# Check that no error is reported
|
# Check that no error is reported
|
||||||
--source include/show_slave_status2.inc
|
source include/check_slave_is_running.inc;
|
||||||
--echo
|
--echo
|
||||||
|
|
||||||
# 3) Test lock wait timeout and purged relay log
|
# 3) Test lock wait timeout and purged relay log
|
||||||
@ -103,6 +103,7 @@ SET global max_relay_log_size=0;
|
|||||||
--source include/stop_slave.inc
|
--source include/stop_slave.inc
|
||||||
DELETE FROM t2;
|
DELETE FROM t2;
|
||||||
# Set slave position to the BEGIN log event
|
# Set slave position to the BEGIN log event
|
||||||
|
--replace_result $master_pos_begin MASTER_POS_BEGIN
|
||||||
eval CHANGE MASTER TO MASTER_LOG_POS=$master_pos_begin;
|
eval CHANGE MASTER TO MASTER_LOG_POS=$master_pos_begin;
|
||||||
BEGIN;
|
BEGIN;
|
||||||
# Hold lock
|
# Hold lock
|
||||||
@ -119,7 +120,7 @@ sync_with_master;
|
|||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
SELECT * FROM t3;
|
SELECT * FROM t3;
|
||||||
# Check that no error is reported
|
# Check that no error is reported
|
||||||
--source include/show_slave_status2.inc
|
source include/check_slave_is_running.inc;
|
||||||
--echo
|
--echo
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
|
@ -146,12 +146,7 @@ SELECT COUNT(*) FROM t1;
|
|||||||
--echo
|
--echo
|
||||||
SELECT * FROM t1 ORDER BY f3 LIMIT 20;
|
SELECT * FROM t1 ORDER BY f3 LIMIT 20;
|
||||||
|
|
||||||
--echo
|
--source include/check_slave_is_running.inc
|
||||||
--echo * Show Slave Status *
|
|
||||||
--echo
|
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
|
||||||
--query_vertical show slave status;
|
|
||||||
--echo
|
|
||||||
|
|
||||||
### Altering table def scenario
|
### Altering table def scenario
|
||||||
--echo
|
--echo
|
||||||
@ -431,16 +426,14 @@ connection master;
|
|||||||
delete from t4;
|
delete from t4;
|
||||||
delete from t31;
|
delete from t31;
|
||||||
|
|
||||||
--echo
|
|
||||||
--echo ** Check slave status **
|
|
||||||
--echo
|
|
||||||
#connection slave;
|
#connection slave;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
select * from t31;
|
select * from t31;
|
||||||
|
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--echo
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
--echo ** Check slave status **
|
||||||
--query_vertical show slave status;
|
--echo
|
||||||
|
--source include/check_slave_is_running.inc
|
||||||
|
|
||||||
#### Clean Up ####
|
#### Clean Up ####
|
||||||
|
|
||||||
@ -493,16 +486,15 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
|
|||||||
|
|
||||||
--echo
|
--echo
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
--echo *** Expect slave to fail with Error 1523 ***
|
--echo *** Expect slave to fail with Error 1535 ***
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
--echo
|
--echo
|
||||||
connection slave;
|
connection slave;
|
||||||
source include/wait_for_slave_sql_to_stop.inc;
|
# 1535 = ER_BINLOG_ROW_WRONG_TABLE_DEF
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_sql_errno= 1535
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
--let $slave_skip_counter= 2
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--let $show_slave_sql_error= 1
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
--echo
|
--echo
|
||||||
--echo *** Drop t10 ***
|
--echo *** Drop t10 ***
|
||||||
@ -550,16 +542,15 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
|
|||||||
|
|
||||||
--echo
|
--echo
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
--echo *** Expect slave to fail with Error 1523 ***
|
--echo *** Expect slave to fail with Error 1535 ***
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
--echo
|
--echo
|
||||||
connection slave;
|
connection slave;
|
||||||
source include/wait_for_slave_sql_to_stop.inc;
|
# 1535 = ER_BINLOG_ROW_WRONG_TABLE_DEF
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_sql_errno= 1535
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
--let $slave_skip_counter= 2
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--let $show_slave_sql_error= 1
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
--echo
|
--echo
|
||||||
--echo *** Drop t11 ***
|
--echo *** Drop t11 ***
|
||||||
@ -697,10 +688,10 @@ SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1;
|
|||||||
# Remove below once fixed
|
# Remove below once fixed
|
||||||
#***************************
|
#***************************
|
||||||
connection slave;
|
connection slave;
|
||||||
source include/wait_for_slave_sql_to_stop.inc;
|
# 1091 = ER_CANT_DROP_FIELD_OR_KEY
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_sql_errno= 1091
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error.inc
|
||||||
#***************************
|
#***************************
|
||||||
|
|
||||||
STOP SLAVE;
|
STOP SLAVE;
|
||||||
@ -763,10 +754,10 @@ SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1;
|
|||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
--echo
|
--echo
|
||||||
connection slave;
|
connection slave;
|
||||||
source include/wait_for_slave_sql_to_stop.inc;
|
# 1054 = ER_BAD_FIELD_ERROR
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_sql_errno= 1054
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error.inc
|
||||||
STOP SLAVE;
|
STOP SLAVE;
|
||||||
RESET SLAVE;
|
RESET SLAVE;
|
||||||
|
|
||||||
@ -840,10 +831,10 @@ SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1;
|
|||||||
--echo *****************
|
--echo *****************
|
||||||
--echo
|
--echo
|
||||||
connection slave;
|
connection slave;
|
||||||
source include/wait_for_slave_sql_to_stop.inc;
|
# 1072 = ER_KEY_COLUMN_DOES_NOT_EXITS
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_sql_errno= 1072
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error.inc
|
||||||
STOP SLAVE;
|
STOP SLAVE;
|
||||||
RESET SLAVE;
|
RESET SLAVE;
|
||||||
|
|
||||||
|
@ -96,10 +96,9 @@ SELECT * FROM t2 ORDER BY a;
|
|||||||
--echo *** Start Slave ***
|
--echo *** Start Slave ***
|
||||||
connection slave;
|
connection slave;
|
||||||
START SLAVE;
|
START SLAVE;
|
||||||
source include/wait_for_slave_sql_to_stop.inc;
|
--let $slave_sql_errno= 1535
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $show_slave_sql_error= 1
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
--source include/wait_for_slave_sql_error.inc
|
||||||
--query_vertical SHOW SLAVE STATUS
|
|
||||||
STOP SLAVE;
|
STOP SLAVE;
|
||||||
RESET SLAVE;
|
RESET SLAVE;
|
||||||
SELECT * FROM t2 ORDER BY a;
|
SELECT * FROM t2 ORDER BY a;
|
||||||
@ -149,12 +148,10 @@ INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TEST
|
|||||||
--echo *** Expect slave to fail with Error 1522 ***
|
--echo *** Expect slave to fail with Error 1522 ***
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
connection slave;
|
connection slave;
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_sql_errno= 1535
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_skip_counter= 2
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
--echo *** Drop t3 ***
|
--echo *** Drop t3 ***
|
||||||
connection master;
|
connection master;
|
||||||
@ -194,12 +191,10 @@ INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'),
|
|||||||
--echo *** Expect slave to fail with Error 1522 ***
|
--echo *** Expect slave to fail with Error 1522 ***
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
connection slave;
|
connection slave;
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_sql_errno= 1535
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_skip_counter= 2
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
--echo *** Drop t4 ***
|
--echo *** Drop t4 ***
|
||||||
connection master;
|
connection master;
|
||||||
@ -239,12 +234,10 @@ INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098),
|
|||||||
--echo *** Expect slave to fail with Error 1522 ***
|
--echo *** Expect slave to fail with Error 1522 ***
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
connection slave;
|
connection slave;
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_sql_errno= 1535
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_skip_counter= 2
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
--echo *** Drop t5 ***
|
--echo *** Drop t5 ***
|
||||||
connection master;
|
connection master;
|
||||||
@ -285,10 +278,9 @@ INSERT INTO t6 () VALUES(1,'Kyle',200.23,1),
|
|||||||
--echo *** Expect slave to fail with Error 1522 ***
|
--echo *** Expect slave to fail with Error 1522 ***
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
connection slave;
|
connection slave;
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_sql_errno= 1535
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $show_slave_sql_error= 1
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
--source include/wait_for_slave_sql_error.inc
|
||||||
--query_vertical SHOW SLAVE STATUS
|
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
|
||||||
#START SLAVE;
|
#START SLAVE;
|
||||||
|
|
||||||
@ -387,12 +379,10 @@ INSERT INTO t8 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
|
|||||||
### Uncomment once bug is fixed
|
### Uncomment once bug is fixed
|
||||||
|
|
||||||
#connection slave;
|
#connection slave;
|
||||||
#wait_for_slave_to_stop;
|
#--let $slave_sql_errno= SOMETHING
|
||||||
#--replace_result $MASTER_MYPORT MASTER_PORT
|
#--let $slave_skip_counter= 2
|
||||||
#--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
#--let $show_slave_sql_error= 1
|
||||||
#--query_vertical SHOW SLAVE STATUS
|
#--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
#SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
#START SLAVE;
|
|
||||||
|
|
||||||
--echo *** Drop t8 ***
|
--echo *** Drop t8 ***
|
||||||
connection master;
|
connection master;
|
||||||
@ -451,12 +441,10 @@ if (`SELECT $engine_type != 'NDB'`)
|
|||||||
# todo: fix Bug #43992 slave sql thread can't tune own sql_mode ...
|
# todo: fix Bug #43992 slave sql thread can't tune own sql_mode ...
|
||||||
# and add/restore waiting for stop test
|
# and add/restore waiting for stop test
|
||||||
|
|
||||||
#--source include/wait_for_slave_sql_to_stop.inc
|
#--let $slave_sql_errno= SOMETHING
|
||||||
#--replace_result $MASTER_MYPORT MASTER_PORT
|
#--let $slave_skip_counter= 2
|
||||||
#--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
#--let $show_slave_sql_error= 1
|
||||||
#--query_vertical SHOW SLAVE STATUS
|
#--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
#SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
#START SLAVE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#--echo *** Drop t9 ***
|
#--echo *** Drop t9 ***
|
||||||
@ -494,12 +482,10 @@ INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
|
|||||||
--echo *** Expect slave to fail with Error 1522 ***
|
--echo *** Expect slave to fail with Error 1522 ***
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
connection slave;
|
connection slave;
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_sql_errno= 1535
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_skip_counter= 2
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
--echo *** Drop t10 ***
|
--echo *** Drop t10 ***
|
||||||
connection master;
|
connection master;
|
||||||
@ -538,12 +524,10 @@ INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
|
|||||||
--echo *** Expect slave to fail with Error 1522 ***
|
--echo *** Expect slave to fail with Error 1522 ***
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
connection slave;
|
connection slave;
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_sql_errno= 1535
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_skip_counter= 2
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
--echo *** Drop t11 ***
|
--echo *** Drop t11 ***
|
||||||
connection master;
|
connection master;
|
||||||
@ -810,12 +794,10 @@ ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5;
|
|||||||
--echo *** Expect slave to fail with Error 1060 ***
|
--echo *** Expect slave to fail with Error 1060 ***
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
connection slave;
|
connection slave;
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_sql_errno= 1060
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_skip_counter= 1
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
--echo *** Try to insert in master ****
|
--echo *** Try to insert in master ****
|
||||||
connection master;
|
connection master;
|
||||||
@ -921,12 +903,10 @@ INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX');
|
|||||||
--echo *** Expect slave to fail with Error 1522 ***
|
--echo *** Expect slave to fail with Error 1522 ***
|
||||||
--echo ********************************************
|
--echo ********************************************
|
||||||
connection slave;
|
connection slave;
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_sql_errno= 1535
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_skip_counter= 2
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
--echo ** DROP table t17 ***
|
--echo ** DROP table t17 ***
|
||||||
connection master;
|
connection master;
|
||||||
|
@ -20,19 +20,15 @@ rename table t1 to t5, t2 to t1;
|
|||||||
# first don't write it to the binlog, to test the NO_WRITE_TO_BINLOG keyword.
|
# first don't write it to the binlog, to test the NO_WRITE_TO_BINLOG keyword.
|
||||||
flush no_write_to_binlog tables;
|
flush no_write_to_binlog tables;
|
||||||
# Check that it's not in the binlog.
|
# Check that it's not in the binlog.
|
||||||
--replace_result $SERVER_VERSION SERVER_VERSION
|
let $binlog_start= $rename_event_pos;
|
||||||
--replace_column 2 # 5 #
|
source include/show_binlog_events.inc;
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
|
||||||
eval SHOW BINLOG EVENTS FROM $rename_event_pos ;
|
|
||||||
# Check that the master is not confused.
|
# Check that the master is not confused.
|
||||||
select * from t3;
|
select * from t3;
|
||||||
# This FLUSH should go into the binlog to not confuse the slave.
|
# This FLUSH should go into the binlog to not confuse the slave.
|
||||||
flush tables;
|
flush tables;
|
||||||
# Check that it's in the binlog.
|
# Check that it's in the binlog.
|
||||||
--replace_result $SERVER_VERSION SERVER_VERSION
|
let $wait_binlog_event= flush tables;
|
||||||
--replace_column 2 # 5 #
|
source include/wait_for_binlog_event.inc;
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
|
||||||
eval SHOW BINLOG EVENTS FROM $rename_event_pos ;
|
|
||||||
|
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
# Check that the slave is not confused.
|
# Check that the slave is not confused.
|
||||||
|
@ -68,7 +68,7 @@ eval SET DEBUG_SYNC=$debug_sync_action;
|
|||||||
|
|
||||||
# Show slave last IO errno
|
# Show slave last IO errno
|
||||||
connection slave;
|
connection slave;
|
||||||
source include/wait_for_slave_io_error.inc;
|
source include/wait_for_slave_io_to_stop.inc;
|
||||||
let $last_io_errno= query_get_value("show slave status", Last_IO_Errno, 1);
|
let $last_io_errno= query_get_value("show slave status", Last_IO_Errno, 1);
|
||||||
--echo Check network error happened here
|
--echo Check network error happened here
|
||||||
if (`SELECT '$last_io_errno' = '2013' || # CR_SERVER_LOST
|
if (`SELECT '$last_io_errno' = '2013' || # CR_SERVER_LOST
|
||||||
|
@ -90,7 +90,7 @@ connection master;
|
|||||||
# Bug #29571: INSERT DELAYED IGNORE written to binary log on the master but
|
# Bug #29571: INSERT DELAYED IGNORE written to binary log on the master but
|
||||||
# on the slave
|
# on the slave
|
||||||
#
|
#
|
||||||
if (`SELECT @@global.binlog_format != 'ROW'`)
|
if ($binlog_format_statement)
|
||||||
{
|
{
|
||||||
#flush the logs before the test
|
#flush the logs before the test
|
||||||
connection slave;
|
connection slave;
|
||||||
@ -103,22 +103,23 @@ CREATE TABLE t1(a int, UNIQUE(a));
|
|||||||
INSERT DELAYED IGNORE INTO t1 VALUES(1);
|
INSERT DELAYED IGNORE INTO t1 VALUES(1);
|
||||||
INSERT DELAYED IGNORE INTO t1 VALUES(1);
|
INSERT DELAYED IGNORE INTO t1 VALUES(1);
|
||||||
flush table t1; # to wait for INSERT DELAYED to be done
|
flush table t1; # to wait for INSERT DELAYED to be done
|
||||||
|
if ($binlog_format_statement)
|
||||||
if (`SELECT @@global.binlog_format != 'ROW'`)
|
|
||||||
{
|
{
|
||||||
#must show two INSERT DELAYED
|
#must show two INSERT DELAYED
|
||||||
--replace_column 1 x 2 x 3 x 4 x 5 x
|
--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
|
||||||
show binlog events in 'master-bin.000002' LIMIT 2,2;
|
--let $binlog_limit= 1,2
|
||||||
|
--source include/show_binlog_events.inc
|
||||||
}
|
}
|
||||||
select * from t1;
|
select * from t1;
|
||||||
|
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
echo On slave;
|
echo On slave;
|
||||||
if (`SELECT @@global.binlog_format != 'ROW'`)
|
if ($binlog_format_statement)
|
||||||
{
|
{
|
||||||
#must show two INSERT DELAYED
|
#must show two INSERT DELAYED
|
||||||
--replace_column 1 x 2 x 3 x 4 x 5 x
|
--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
|
||||||
show binlog events in 'slave-bin.000002' LIMIT 2,2;
|
--let $binlog_limit= 1,2
|
||||||
|
--source include/show_binlog_events.inc
|
||||||
}
|
}
|
||||||
select * from t1;
|
select * from t1;
|
||||||
|
|
||||||
|
@ -11,11 +11,9 @@
|
|||||||
# (otherwise RESET MASTER may come too early).
|
# (otherwise RESET MASTER may come too early).
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
source include/stop_slave.inc;
|
source include/stop_slave.inc;
|
||||||
--source include/wait_for_slave_to_stop.inc
|
|
||||||
reset master;
|
reset master;
|
||||||
reset slave;
|
reset slave;
|
||||||
start slave;
|
source include/start_slave.inc;
|
||||||
--source include/wait_for_slave_to_start.inc
|
|
||||||
|
|
||||||
let $VERSION=`select version()`;
|
let $VERSION=`select version()`;
|
||||||
|
|
||||||
@ -31,19 +29,17 @@ eval create table t1 (word char(20) not null)ENGINE=$engine_type;
|
|||||||
--replace_result $LOAD_FILE LOAD_FILE
|
--replace_result $LOAD_FILE LOAD_FILE
|
||||||
eval load data infile '$LOAD_FILE' into table t1 ignore 1 lines;
|
eval load data infile '$LOAD_FILE' into table t1 ignore 1 lines;
|
||||||
select count(*) from t1;
|
select count(*) from t1;
|
||||||
--replace_result $VERSION VERSION
|
source include/show_binlog_events.inc;
|
||||||
--replace_column 2 # 5 #
|
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
let $binlog_limit= 1;
|
||||||
show binlog events;
|
source include/show_binlog_events.inc;
|
||||||
--replace_column 2 # 5 #
|
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
let $binlog_limit= 2;
|
||||||
show binlog events from 106 limit 1;
|
source include/show_binlog_events.inc;
|
||||||
--replace_column 2 # 5 #
|
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
let $binlog_limit= 2,1;
|
||||||
show binlog events from 106 limit 2;
|
source include/show_binlog_events.inc;
|
||||||
--replace_column 2 # 5 #
|
let $binlog_limit=;
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
|
||||||
show binlog events from 106 limit 2,1;
|
|
||||||
flush logs;
|
flush logs;
|
||||||
|
|
||||||
# We need an extra update before doing save_master_pos.
|
# We need an extra update before doing save_master_pos.
|
||||||
@ -84,27 +80,24 @@ connection master;
|
|||||||
eval create table t2 (n int)ENGINE=$engine_type;
|
eval create table t2 (n int)ENGINE=$engine_type;
|
||||||
insert into t2 values (1);
|
insert into t2 values (1);
|
||||||
source include/show_binlog_events.inc;
|
source include/show_binlog_events.inc;
|
||||||
--replace_result $VERSION VERSION
|
|
||||||
--replace_regex /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/ /infile '.+'/infile 'words.dat'/
|
let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
|
||||||
--replace_column 2 # 5 #
|
source include/show_binlog_events.inc;
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
|
||||||
show binlog events in 'master-bin.000002';
|
|
||||||
--replace_column 2 #
|
--replace_column 2 #
|
||||||
show binary logs;
|
show binary logs;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
--source include/wait_for_slave_to_start.inc
|
|
||||||
--replace_column 2 #
|
--replace_column 2 #
|
||||||
show binary logs;
|
show binary logs;
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION
|
|
||||||
--replace_column 2 # 5 #
|
let $binlog_file=;
|
||||||
--replace_regex /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/ /INFILE '.+'/INFILE 'words.dat'/
|
source include/show_binlog_events.inc;
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
|
||||||
show binlog events in 'slave-bin.000001' from 4;
|
let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION
|
source include/show_binlog_events.inc;
|
||||||
--replace_column 2 # 5 #
|
let $binlog_file=;
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
|
||||||
show binlog events in 'slave-bin.000002' from 4;
|
source include/check_slave_is_running.inc;
|
||||||
source include/show_slave_status.inc;
|
|
||||||
|
|
||||||
# Need to recode the following
|
# Need to recode the following
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ set global max_relay_log_size=8192-1; # mapped to 4096
|
|||||||
select @@global.max_relay_log_size;
|
select @@global.max_relay_log_size;
|
||||||
start slave;
|
start slave;
|
||||||
sync_with_master;
|
sync_with_master;
|
||||||
source include/show_slave_status2.inc;
|
--source include/check_slave_is_running.inc
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Test 2
|
--echo # Test 2
|
||||||
@ -55,7 +55,7 @@ set global max_relay_log_size=(5*4096);
|
|||||||
query_vertical select @@global.max_relay_log_size;
|
query_vertical select @@global.max_relay_log_size;
|
||||||
start slave;
|
start slave;
|
||||||
sync_with_master;
|
sync_with_master;
|
||||||
source include/show_slave_status2.inc;
|
--source include/check_slave_is_running.inc
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Test 3: max_relay_log_size = 0
|
--echo # Test 3: max_relay_log_size = 0
|
||||||
@ -67,7 +67,7 @@ set global max_relay_log_size=0;
|
|||||||
query_vertical select @@global.max_relay_log_size;
|
query_vertical select @@global.max_relay_log_size;
|
||||||
start slave;
|
start slave;
|
||||||
sync_with_master;
|
sync_with_master;
|
||||||
source include/show_slave_status2.inc;
|
--source include/check_slave_is_running.inc
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
|
--echo # Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
|
||||||
@ -78,7 +78,6 @@ reset slave;
|
|||||||
# test of relay log rotation when the slave is stopped
|
# test of relay log rotation when the slave is stopped
|
||||||
# (to make sure it does not crash).
|
# (to make sure it does not crash).
|
||||||
flush logs;
|
flush logs;
|
||||||
source include/show_slave_status2.inc;
|
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Test 5
|
--echo # Test 5
|
||||||
@ -93,10 +92,8 @@ flush logs;
|
|||||||
# log we just closed. But a trick to achieve this is do an update on the master.
|
# log we just closed. But a trick to achieve this is do an update on the master.
|
||||||
connection master;
|
connection master;
|
||||||
create table t1 (a int);
|
create table t1 (a int);
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
--source include/check_slave_is_running.inc
|
||||||
sync_with_master;
|
|
||||||
source include/show_slave_status2.inc;
|
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
|
--echo # Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
|
||||||
@ -105,10 +102,8 @@ source include/show_slave_status2.inc;
|
|||||||
flush logs;
|
flush logs;
|
||||||
connection master;
|
connection master;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
--source include/check_slave_is_running.inc
|
||||||
sync_with_master;
|
|
||||||
source include/show_slave_status2.inc;
|
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
# test that the absence of relay logs does not make a master crash
|
# test that the absence of relay logs does not make a master crash
|
||||||
|
@ -56,24 +56,23 @@ connection master;
|
|||||||
--echo # since insert is done with transactional engine, expect a BEGIN
|
--echo # since insert is done with transactional engine, expect a BEGIN
|
||||||
--echo # at <start_pos>
|
--echo # at <start_pos>
|
||||||
--echo
|
--echo
|
||||||
--replace_result $start_pos <start_pos>
|
--let $binlog_start= $start_pos
|
||||||
--replace_column 5 #
|
--let $binlog_limit= 1
|
||||||
--eval show binlog events from $start_pos limit 1
|
--source include/show_binlog_events.inc
|
||||||
|
|
||||||
--echo
|
--echo
|
||||||
--echo # Now the insert, one step after
|
--echo # Now the insert, one step after
|
||||||
--echo
|
--echo
|
||||||
--replace_result $start_pos <start_pos>
|
--let $binlog_start= $start_pos
|
||||||
--replace_column 2 # 5 #
|
--let $binlog_limit= 1,1
|
||||||
--eval show binlog events from $start_pos limit 1,1
|
--source include/show_binlog_events.inc
|
||||||
|
|
||||||
--echo
|
--echo
|
||||||
--echo # and the COMMIT should be at <end_pos>
|
--echo # and the COMMIT should be at <end_pos>
|
||||||
--echo
|
--echo
|
||||||
--replace_result $start_pos <start_pos> $end_pos <end_pos>
|
--let $binlog_start= $start_pos
|
||||||
--replace_column 2 #
|
--let $binlog_limit= 2,1
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
--source include/show_binlog_events.inc
|
||||||
--eval show binlog events from $start_pos limit 2,1
|
|
||||||
|
|
||||||
--echo
|
--echo
|
||||||
|
|
||||||
@ -89,18 +88,17 @@ commit;
|
|||||||
--source include/select_ndb_apply_status.inc
|
--source include/select_ndb_apply_status.inc
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
--replace_result $start_pos <start_pos>
|
--let $binlog_start= $start_pos
|
||||||
--replace_column 5 #
|
--let $binlog_limit= 1
|
||||||
--eval show binlog events from $start_pos limit 1
|
--source include/show_binlog_events.inc
|
||||||
--echo
|
--echo
|
||||||
--replace_result $start_pos <start_pos>
|
--let $binlog_start= $start_pos
|
||||||
--replace_column 2 # 4 # 5 #
|
--let $binlog_limit= 1,2
|
||||||
--eval show binlog events from $start_pos limit 1,2
|
--source include/show_binlog_events.inc
|
||||||
--echo
|
--echo
|
||||||
--replace_result $start_pos <start_pos> $end_pos <end_pos>
|
--let $binlog_start= $start_pos
|
||||||
--replace_column 2 #
|
--let $binlog_limit= 3,1
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
--source include/show_binlog_events.inc
|
||||||
--eval show binlog events from $start_pos limit 3,1
|
|
||||||
|
|
||||||
--echo
|
--echo
|
||||||
|
|
||||||
|
@ -9,36 +9,32 @@
|
|||||||
# RESET SLAVE.
|
# RESET SLAVE.
|
||||||
|
|
||||||
-- source include/master-slave.inc
|
-- source include/master-slave.inc
|
||||||
connection master;
|
sync_slave_with_master;
|
||||||
save_master_pos;
|
let $status_items= Master_User, Master_Host;
|
||||||
connection slave;
|
source include/show_slave_status.inc;
|
||||||
sync_with_master;
|
|
||||||
source include/show_slave_status2.inc;
|
|
||||||
|
|
||||||
stop slave;
|
source include/stop_slave.inc;
|
||||||
change master to master_user='test';
|
change master to master_user='test';
|
||||||
source include/show_slave_status2.inc;
|
source include/show_slave_status.inc;
|
||||||
|
|
||||||
reset slave;
|
reset slave;
|
||||||
source include/show_slave_status2.inc;
|
source include/show_slave_status.inc;
|
||||||
|
|
||||||
start slave;
|
source include/start_slave.inc;
|
||||||
sync_with_master;
|
sync_with_master;
|
||||||
source include/show_slave_status2.inc;
|
source include/show_slave_status.inc;
|
||||||
|
|
||||||
# test of crash with temp tables & RESET SLAVE
|
# test of crash with temp tables & RESET SLAVE
|
||||||
# (test to see if RESET SLAVE clears temp tables in memory and disk)
|
# (test to see if RESET SLAVE clears temp tables in memory and disk)
|
||||||
stop slave;
|
source include/stop_slave.inc;
|
||||||
reset slave;
|
reset slave;
|
||||||
start slave;
|
source include/start_slave.inc;
|
||||||
connection master;
|
connection master;
|
||||||
create temporary table t1 (a int);
|
create temporary table t1 (a int);
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
source include/stop_slave.inc;
|
||||||
sync_with_master;
|
|
||||||
stop slave;
|
|
||||||
reset slave;
|
reset slave;
|
||||||
start slave;
|
source include/start_slave.inc;
|
||||||
sync_with_master;
|
sync_with_master;
|
||||||
show status like 'slave_open_temp_tables';
|
show status like 'slave_open_temp_tables';
|
||||||
|
|
||||||
@ -47,10 +43,9 @@ show status like 'slave_open_temp_tables';
|
|||||||
#
|
#
|
||||||
|
|
||||||
# clearing the status
|
# clearing the status
|
||||||
stop slave;
|
source include/stop_slave.inc;
|
||||||
reset slave;
|
reset slave;
|
||||||
let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
|
source include/check_slave_no_error.inc;
|
||||||
echo *** errno must be zero: $last_io_errno ***;
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# verifying start slave resets Last_IO_Error and Last_IO_Errno.
|
# verifying start slave resets Last_IO_Error and Last_IO_Errno.
|
||||||
@ -58,19 +53,13 @@ echo *** errno must be zero: $last_io_errno ***;
|
|||||||
|
|
||||||
change master to master_user='impossible_user_name';
|
change master to master_user='impossible_user_name';
|
||||||
start slave;
|
start slave;
|
||||||
|
let $slave_io_errno= 1045;
|
||||||
source include/wait_for_slave_io_error.inc;
|
source include/wait_for_slave_io_error.inc;
|
||||||
let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
|
|
||||||
--disable_query_log
|
|
||||||
eval SELECT $last_io_errno > 0 as ONE;
|
|
||||||
--enable_query_log
|
|
||||||
|
|
||||||
source include/stop_slave.inc;
|
source include/stop_slave.inc;
|
||||||
change master to master_user='root';
|
change master to master_user='root';
|
||||||
source include/start_slave.inc;
|
source include/start_slave.inc;
|
||||||
let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
|
source include/check_slave_no_error.inc;
|
||||||
let $last_io_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1);
|
|
||||||
--echo *** last errno must be zero: $last_io_errno ***
|
|
||||||
--echo *** last error must be blank: $last_io_error ***
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# verifying reset slave resets Last_{IO,SQL}_Err{or,no}
|
# verifying reset slave resets Last_{IO,SQL}_Err{or,no}
|
||||||
@ -79,19 +68,9 @@ let $last_io_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1);
|
|||||||
source include/stop_slave.inc;
|
source include/stop_slave.inc;
|
||||||
change master to master_user='impossible_user_name';
|
change master to master_user='impossible_user_name';
|
||||||
start slave;
|
start slave;
|
||||||
|
let $slave_io_errno= 1045;
|
||||||
source include/wait_for_slave_io_error.inc;
|
source include/wait_for_slave_io_error.inc;
|
||||||
let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
|
|
||||||
--disable_query_log
|
|
||||||
eval SELECT $last_io_errno > 0 as ONE;
|
|
||||||
--enable_query_log
|
|
||||||
|
|
||||||
source include/stop_slave.inc;
|
source include/stop_slave.inc;
|
||||||
reset slave;
|
reset slave;
|
||||||
let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
|
source include/check_slave_no_error.inc;
|
||||||
let $last_io_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1);
|
|
||||||
let $last_sql_errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
|
|
||||||
let $last_sql_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
|
|
||||||
--echo *** io last errno must be zero: $last_io_errno ***
|
|
||||||
--echo *** io last error must be blank: $last_io_error ***
|
|
||||||
--echo *** sql last errno must be zero: $last_sql_errno ***
|
|
||||||
--echo *** sql last error must be blank: $last_sql_error ***
|
|
||||||
|
@ -259,10 +259,7 @@ DELETE FROM t1;
|
|||||||
query_vertical SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
|
query_vertical SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
set @@global.slave_exec_mode= default;
|
set @@global.slave_exec_mode= default;
|
||||||
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
|
source include/check_slave_is_running.inc;
|
||||||
disable_query_log;
|
|
||||||
eval SELECT "$last_error" AS Last_SQL_Error;
|
|
||||||
enable_query_log;
|
|
||||||
query_vertical SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
|
query_vertical SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
|
||||||
|
|
||||||
# BUG#37076: TIMESTAMP/DATETIME values are not replicated correctly
|
# BUG#37076: TIMESTAMP/DATETIME values are not replicated correctly
|
||||||
@ -376,11 +373,10 @@ INSERT INTO t3 VALUES (1, "", 1);
|
|||||||
INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2);
|
INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2);
|
||||||
|
|
||||||
connection slave;
|
connection slave;
|
||||||
source include/wait_for_slave_sql_to_stop.inc;
|
# 1535 = ER_BINLOG_ROW_WRONG_TABLE_DEF
|
||||||
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
|
--let $slave_sql_errno= 1535
|
||||||
disable_query_log;
|
--let $show_slave_sql_error= 1
|
||||||
eval SELECT "$last_error" AS Last_SQL_Error;
|
--source include/wait_for_slave_sql_error.inc
|
||||||
enable_query_log;
|
|
||||||
connection master;
|
connection master;
|
||||||
RESET MASTER;
|
RESET MASTER;
|
||||||
connection slave;
|
connection slave;
|
||||||
@ -405,11 +401,10 @@ INSERT INTO t5 VALUES (1, "", 1);
|
|||||||
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
|
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
|
||||||
|
|
||||||
connection slave;
|
connection slave;
|
||||||
source include/wait_for_slave_sql_to_stop.inc;
|
# 1535 = ER_BINLOG_ROW_WRONG_TABLE_DEF
|
||||||
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
|
--let $slave_sql_errno= 1535
|
||||||
disable_query_log;
|
--let $show_slave_sql_error= 1
|
||||||
eval SELECT "$last_error" AS Last_SQL_Error;
|
--source include/wait_for_slave_sql_error.inc
|
||||||
enable_query_log;
|
|
||||||
connection master;
|
connection master;
|
||||||
RESET MASTER;
|
RESET MASTER;
|
||||||
connection slave;
|
connection slave;
|
||||||
@ -424,11 +419,10 @@ INSERT INTO t6 VALUES (1, "", 1);
|
|||||||
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
|
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
|
||||||
|
|
||||||
connection slave;
|
connection slave;
|
||||||
source include/wait_for_slave_sql_to_stop.inc;
|
# 1535 = ER_BINLOG_ROW_WRONG_TABLE_DEF
|
||||||
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
|
--let $slave_sql_errno= 1535
|
||||||
disable_query_log;
|
--let $show_slave_sql_error= 1
|
||||||
eval SELECT "$last_error" AS Last_SQL_Error;
|
--source include/wait_for_slave_sql_error.inc
|
||||||
enable_query_log;
|
|
||||||
connection master;
|
connection master;
|
||||||
RESET MASTER;
|
RESET MASTER;
|
||||||
connection slave;
|
connection slave;
|
||||||
|
@ -138,9 +138,7 @@ SELECT * FROM t2;
|
|||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
--echo **** On Slave ****
|
--echo **** On Slave ****
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--source include/check_slave_is_running.inc
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
|
|
||||||
--query_vertical SHOW SLAVE STATUS
|
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
INSERT INTO t9 VALUES (4);
|
INSERT INTO t9 VALUES (4);
|
||||||
@ -149,12 +147,10 @@ sync_slave_with_master;
|
|||||||
connection master;
|
connection master;
|
||||||
INSERT INTO t4 VALUES (4);
|
INSERT INTO t4 VALUES (4);
|
||||||
connection slave;
|
connection slave;
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_skip_counter= 2
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_sql_errno= 1535
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
INSERT INTO t9 VALUES (5);
|
INSERT INTO t9 VALUES (5);
|
||||||
@ -163,12 +159,10 @@ sync_slave_with_master;
|
|||||||
connection master;
|
connection master;
|
||||||
INSERT INTO t5 VALUES (5,10,25);
|
INSERT INTO t5 VALUES (5,10,25);
|
||||||
connection slave;
|
connection slave;
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_skip_counter= 2
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_sql_errno= 1535
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
INSERT INTO t9 VALUES (6);
|
INSERT INTO t9 VALUES (6);
|
||||||
@ -177,19 +171,15 @@ sync_slave_with_master;
|
|||||||
connection master;
|
connection master;
|
||||||
INSERT INTO t6 VALUES (6,12,36);
|
INSERT INTO t6 VALUES (6,12,36);
|
||||||
connection slave;
|
connection slave;
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_skip_counter= 2
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_sql_errno= 1535
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
|
--let $show_slave_sql_error= 1
|
||||||
--query_vertical SHOW SLAVE STATUS
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
INSERT INTO t9 VALUES (6);
|
INSERT INTO t9 VALUES (6);
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
--source include/check_slave_is_running.inc
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
|
|
||||||
--query_vertical SHOW SLAVE STATUS
|
|
||||||
|
|
||||||
# Testing some tables extra field that can be null and cannot be null
|
# Testing some tables extra field that can be null and cannot be null
|
||||||
# (but have default values)
|
# (but have default values)
|
||||||
|
18
mysql-test/include/check_slave_is_running.inc
Normal file
18
mysql-test/include/check_slave_is_running.inc
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# ==== Purpose ====
|
||||||
|
#
|
||||||
|
# Assert that the slave threads are running and don't have any errors.
|
||||||
|
#
|
||||||
|
# ==== Usage ====
|
||||||
|
#
|
||||||
|
# --source include/check_slave_running.inc
|
||||||
|
|
||||||
|
--echo Checking that both slave threads are running.
|
||||||
|
|
||||||
|
--let $slave_sql_running = query_get_value(SHOW SLAVE STATUS, Slave_SQL_Running, 1)
|
||||||
|
--let $slave_io_running = query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1)
|
||||||
|
|
||||||
|
if (`SELECT '$slave_sql_running' != 'Yes' OR '$slave_io_running' != 'Yes'`) {
|
||||||
|
--echo Slave not running: Slave_SQL_Running = $slave_sql_running Slave_IO_Running = $slave_io_running
|
||||||
|
--source include/show_rpl_debug_info.inc
|
||||||
|
--die Expected slave to be running, but it was not running.
|
||||||
|
}
|
17
mysql-test/include/check_slave_no_error.inc
Normal file
17
mysql-test/include/check_slave_no_error.inc
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# ==== Purpose ====
|
||||||
|
#
|
||||||
|
# Assert that Slave_SQL_Error and Slave_IO_Error are empty.
|
||||||
|
#
|
||||||
|
# ==== Usage ====
|
||||||
|
#
|
||||||
|
# --let $slave_param= Exec_Master_Log_Pos
|
||||||
|
# --let $slave_param_value= 4711
|
||||||
|
# --source include/check_slave_running.inc
|
||||||
|
|
||||||
|
--let $slave_param= Last_SQL_Errno
|
||||||
|
--let $slave_param_value= 0
|
||||||
|
--source include/check_slave_param.inc
|
||||||
|
|
||||||
|
--let $slave_param= Last_IO_Errno
|
||||||
|
--let $slave_param_value= 0
|
||||||
|
--source include/check_slave_param.inc
|
16
mysql-test/include/check_slave_param.inc
Normal file
16
mysql-test/include/check_slave_param.inc
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# ==== Purpose ====
|
||||||
|
#
|
||||||
|
# Assert that a given column in SHOW SLAVE STATUS has a given value.
|
||||||
|
#
|
||||||
|
# ==== Usage ====
|
||||||
|
#
|
||||||
|
# --let $slave_param= Exec_Master_Log_Pos
|
||||||
|
# --let $slave_param_value= 4711
|
||||||
|
# --source include/check_slave_param.inc
|
||||||
|
|
||||||
|
--let $_param_value= query_get_value(SHOW SLAVE STATUS, $slave_param, 1)
|
||||||
|
if (`SELECT '$_param_value' != '$slave_param_value'`) {
|
||||||
|
--echo Wrong value for $slave_param. Expected '$slave_param_value', got '$_param_value'
|
||||||
|
--source include/show_rpl_debug_info.inc
|
||||||
|
--die Wrong value for slave parameter
|
||||||
|
}
|
70
mysql-test/include/get_relay_log_pos.inc
Normal file
70
mysql-test/include/get_relay_log_pos.inc
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
# For a given event which is at position $master_log_pos in the the master's
|
||||||
|
# binary log, returns its position in the slave's relay log file
|
||||||
|
# $relay_log_file.
|
||||||
|
# The position is stored in the variable $relay_log_pos.
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
# let $relay_log_file= 'relay-log-bin.000001';
|
||||||
|
# let $master_log_pos= 106;
|
||||||
|
# source include/get_relay_log_pos.inc;
|
||||||
|
# # at this point, get_relay_log_pos.inc sets $relay_log_pos. echo position
|
||||||
|
# # in $relay_log_file: $relay_log_pos.
|
||||||
|
|
||||||
|
if (`SELECT '$relay_log_file' = ''`)
|
||||||
|
{
|
||||||
|
--die 'variable $relay_log_file is null'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (`SELECT '$master_log_pos' = ''`)
|
||||||
|
{
|
||||||
|
--die 'variable $master_log_pos is null'
|
||||||
|
}
|
||||||
|
|
||||||
|
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||||
|
let $_suffix= `SELECT UUID()`;
|
||||||
|
let $_tmp_file= $MYSQLTEST_VARDIR/tmp/mysqlbinlog.$_suffix;
|
||||||
|
--exec $MYSQL_BINLOG $MYSQLD_DATADIR/$relay_log_file > $_tmp_file
|
||||||
|
|
||||||
|
# All queries in this file should not be logged.
|
||||||
|
--disable_query_log
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
DROP TEMPORARY TABLE IF EXISTS mysqlbinlog_events;
|
||||||
|
DROP TEMPORARY TABLE IF EXISTS events_at;
|
||||||
|
DROP TEMPORARY TABLE IF EXISTS events_pos;
|
||||||
|
CREATE TEMPORARY TABLE mysqlbinlog_events(c1 INT AUTO_INCREMENT KEY, c2 varchar(256));
|
||||||
|
|
||||||
|
# Event position is in the comments output by mysqlbinlog, we load this
|
||||||
|
# comments into the table
|
||||||
|
# '# at 106'
|
||||||
|
# '# .... end_log_pos 46'
|
||||||
|
eval LOAD DATA LOCAL INFILE '$_tmp_file' INTO TABLE mysqlbinlog_events
|
||||||
|
LINES STARTING BY '#' (c2) SET c1 = NULL;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
# Event pos in relay log file is inserted into table events_at
|
||||||
|
CREATE TEMPORARY TABLE events_at(c1 INT AUTO_INCREMENT KEY, c2 varchar(256))
|
||||||
|
SELECT c2 FROM mysqlbinlog_events WHERE c2 LIKE ' at%' ORDER BY c1;
|
||||||
|
|
||||||
|
# Event pos in master log file is inserted into table events_pos
|
||||||
|
CREATE TEMPORARY TABLE events_pos(c1 INT AUTO_INCREMENT KEY, c2 varchar(256))
|
||||||
|
SELECT c2 FROM mysqlbinlog_events WHERE c2 LIKE '% end_log_pos %' ORDER BY c1;
|
||||||
|
|
||||||
|
# events_at events_pos
|
||||||
|
# c1------c2-------------------------- c1------c2------------------------
|
||||||
|
# 1 ev1's begin pos in relay log 1 ev1's end pos in master log
|
||||||
|
# 2 ev2's begin pos in relay log 2 ev2's end pos in master log
|
||||||
|
# 3 ev3's begin pos in relay log 3 ev3's end pos in master log
|
||||||
|
# events always keep the same sequence.
|
||||||
|
# Because event[N]'s end pos is equal to event[N+1]'s begin pos we want to
|
||||||
|
# find event's end pos in relay log, we can find the right relay_log_pos
|
||||||
|
# using the relationship that 'events_pos.c1 = events_at.c1 + 1'
|
||||||
|
#
|
||||||
|
# There is a fault that we can't get the relay log position of the last event,
|
||||||
|
# as it is not output by mysqlbinlog
|
||||||
|
let $relay_log_pos= `SELECT SUBSTRING(a.c2, 5)
|
||||||
|
FROM events_at a, events_pos b
|
||||||
|
WHERE a.c1=b.c1+1 and b.c2 LIKE '% $master_log_pos%'`;
|
||||||
|
DROP TEMPORARY TABLE mysqlbinlog_events, events_at, events_pos;
|
||||||
|
--remove_file $_tmp_file
|
||||||
|
--enable_query_log
|
@ -80,9 +80,8 @@ eval INSERT INTO t1 SET f1= $MAX + 1;
|
|||||||
SELECT MAX(f1) FROM t1;
|
SELECT MAX(f1) FROM t1;
|
||||||
if ($show_binlog)
|
if ($show_binlog)
|
||||||
{
|
{
|
||||||
--replace_result $VERSION VERSION
|
--let $binlog_file= master-bin.$_log_num_s
|
||||||
--replace_column 2 # 5 #
|
--source include/show_binlog_events.inc
|
||||||
eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s';
|
|
||||||
}
|
}
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
@ -93,9 +92,8 @@ connection slave;
|
|||||||
SELECT MAX(f1) FROM t1;
|
SELECT MAX(f1) FROM t1;
|
||||||
if ($show_binlog)
|
if ($show_binlog)
|
||||||
{
|
{
|
||||||
--replace_result $VERSION VERSION
|
--let $binlog_file= slave-bin.$_log_num_s
|
||||||
--replace_column 2 # 5 #
|
--source include/show_binlog_events.inc
|
||||||
eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
@ -111,9 +109,8 @@ let $my_stmt= ERROR: YOU FORGOT TO FILL IN THE STATEMENT;
|
|||||||
SELECT MAX(f1) FROM t1;
|
SELECT MAX(f1) FROM t1;
|
||||||
if ($show_binlog)
|
if ($show_binlog)
|
||||||
{
|
{
|
||||||
--replace_result $VERSION VERSION
|
--let $binlog_file= master-bin.$_log_num_s
|
||||||
--replace_column 2 # 5 #
|
--source include/show_binlog_events.inc
|
||||||
eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s';
|
|
||||||
}
|
}
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
@ -124,9 +121,8 @@ connection slave;
|
|||||||
SELECT MAX(f1) FROM t1;
|
SELECT MAX(f1) FROM t1;
|
||||||
if ($show_binlog)
|
if ($show_binlog)
|
||||||
{
|
{
|
||||||
--replace_result $VERSION VERSION
|
--let $binlog_file= slave-bin.$_log_num_s
|
||||||
--replace_column 2 # 5 #
|
--source include/show_binlog_events.inc
|
||||||
eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
@ -150,9 +146,8 @@ eval SELECT CONCAT(CONCAT('TEST-INFO: MASTER: The INSERT is ',
|
|||||||
--enable_query_log
|
--enable_query_log
|
||||||
if ($show_binlog)
|
if ($show_binlog)
|
||||||
{
|
{
|
||||||
--replace_result $VERSION VERSION
|
--let $binlog_file= master-bin.$_log_num_s
|
||||||
--replace_column 2 # 5 #
|
--source include/show_binlog_events.inc
|
||||||
eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s';
|
|
||||||
}
|
}
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
@ -171,9 +166,8 @@ eval SELECT CONCAT(CONCAT('TEST-INFO: SLAVE: The INSERT is ',
|
|||||||
--enable_query_log
|
--enable_query_log
|
||||||
if ($show_binlog)
|
if ($show_binlog)
|
||||||
{
|
{
|
||||||
--replace_result $VERSION VERSION
|
--let $binlog_file= slave-bin.$_log_num_s
|
||||||
--replace_column 2 # 5 #
|
--source include/show_binlog_events.inc
|
||||||
eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
|
@ -1,10 +1,45 @@
|
|||||||
# $binlog_start can be set by caller or take a default value
|
##############################################################################
|
||||||
|
# Show binary log events
|
||||||
|
#
|
||||||
|
# Useage:
|
||||||
|
# let $binlog_file= master-bin.000002;
|
||||||
|
# let $binlog_start= 106;
|
||||||
|
# let $binlog_limit= 1, 3;
|
||||||
|
# source include/show_binlog_events.inc;
|
||||||
|
#
|
||||||
|
# It shows the first binary log file if $binlog_file is not given.
|
||||||
|
#
|
||||||
|
# It shows events from the end position of the description event if
|
||||||
|
# $binlog_start is not given.
|
||||||
|
#
|
||||||
|
# It shows all of the events if $binlog_limit is not given.
|
||||||
|
# $binlog_format has the same semantic with 'LIMIT' option.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
if (!$binlog_start)
|
if (!$binlog_start)
|
||||||
{
|
{
|
||||||
let $binlog_start=106;
|
# If $binlog_start is not set, we will set it as the second event's position.
|
||||||
|
# The first event(Description Event) is always ignored. For description
|
||||||
|
# event's length might be changed because of adding new events, 'SHOW BINLOG
|
||||||
|
# EVENTS LIMIT 1' is used to get the right value.
|
||||||
|
--let $binlog_start= query_get_value(SHOW BINLOG EVENTS LIMIT 1, End_log_pos, 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
--let $_statement=show binlog events
|
||||||
|
if (`SELECT '$binlog_file' <> ''`)
|
||||||
|
{
|
||||||
|
--let $_statement= $_statement in '$binlog_file'
|
||||||
|
}
|
||||||
|
|
||||||
|
--let $_statement= $_statement from $binlog_start
|
||||||
|
|
||||||
|
if (`SELECT '$binlog_limit' <> ''`)
|
||||||
|
{
|
||||||
|
--let $_statement= $_statement limit $binlog_limit
|
||||||
|
}
|
||||||
|
|
||||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $binlog_start <binlog_start>
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $binlog_start <binlog_start>
|
||||||
--replace_column 2 # 4 # 5 #
|
--replace_column 2 # 4 # 5 #
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/
|
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/
|
||||||
--eval show binlog events from $binlog_start
|
--eval $_statement
|
||||||
|
@ -36,6 +36,7 @@ let $_con= $CURRENT_CONNECTION;
|
|||||||
--echo
|
--echo
|
||||||
--echo [on $_con]
|
--echo [on $_con]
|
||||||
--echo
|
--echo
|
||||||
|
SELECT NOW();
|
||||||
--echo **** SHOW SLAVE STATUS on $_con ****
|
--echo **** SHOW SLAVE STATUS on $_con ****
|
||||||
query_vertical SHOW SLAVE STATUS;
|
query_vertical SHOW SLAVE STATUS;
|
||||||
--echo
|
--echo
|
||||||
@ -70,6 +71,7 @@ if (`SELECT '$_master_con' != ''`)
|
|||||||
--echo [on $_master_con]
|
--echo [on $_master_con]
|
||||||
connection $_master_con;
|
connection $_master_con;
|
||||||
--echo
|
--echo
|
||||||
|
SELECT NOW();
|
||||||
--echo **** SHOW MASTER STATUS on $_master_con ****
|
--echo **** SHOW MASTER STATUS on $_master_con ****
|
||||||
query_vertical SHOW MASTER STATUS;
|
query_vertical SHOW MASTER STATUS;
|
||||||
--echo
|
--echo
|
||||||
|
@ -1,6 +1,25 @@
|
|||||||
# Include file to show the slave status, masking out some information
|
# Include file to show the slave status, masking out some information
|
||||||
# that varies depending on where the test is executed.
|
# that varies depending on where the test is executed.
|
||||||
|
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $_items=$status_items
|
||||||
--replace_column 1 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
|
if (`SELECT "XX$status_items" = "XX"`)
|
||||||
query_vertical SHOW SLAVE STATUS;
|
{
|
||||||
|
--die 'Variable status_items is NULL'
|
||||||
|
}
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
--vertical_results
|
||||||
|
|
||||||
|
while (`SELECT "XX$_items" <> "XX"`)
|
||||||
|
{
|
||||||
|
--let $_name= `SELECT SUBSTRING_INDEX('$_items', ',', 1)`
|
||||||
|
--let $_items= `SELECT LTRIM(SUBSTRING('$_items', LENGTH('$_name') + 2))`
|
||||||
|
|
||||||
|
--let $_value= query_get_value(SHOW SLAVE STATUS, $_name, 1)
|
||||||
|
|
||||||
|
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||||
|
--eval SELECT "$_value" AS $_name
|
||||||
|
}
|
||||||
|
|
||||||
|
--horizontal_results
|
||||||
|
--enable_query_log
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
# Include file to show the slave status, masking out some information
|
|
||||||
# that varies depending on where the test is executed.
|
|
||||||
|
|
||||||
# masked out log positions
|
|
||||||
|
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
|
||||||
--replace_column 1 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
|
||||||
query_vertical SHOW SLAVE STATUS;
|
|
@ -22,10 +22,9 @@ eval $test_insert;
|
|||||||
|
|
||||||
connection slave;
|
connection slave;
|
||||||
START SLAVE;
|
START SLAVE;
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_sql_errno= 1535
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $show_slave_sql_error= 1
|
||||||
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
--source include/wait_for_slave_sql_error.inc
|
||||||
--query_vertical SHOW SLAVE STATUS
|
|
||||||
|
|
||||||
# The following should be 0
|
# The following should be 0
|
||||||
SELECT COUNT(*) FROM t1;
|
SELECT COUNT(*) FROM t1;
|
||||||
|
@ -18,7 +18,7 @@ while (`SELECT INSTR("$_last_event","$wait_binlog_event") = 0`)
|
|||||||
dec $_loop_count;
|
dec $_loop_count;
|
||||||
if (!$_loop_count)
|
if (!$_loop_count)
|
||||||
{
|
{
|
||||||
SHOW BINLOG EVENTS;
|
--source include/show_rpl_debug_info.inc
|
||||||
--die ERROR: failed while waiting for $wait_binlog_event in binlog
|
--die ERROR: failed while waiting for $wait_binlog_event in binlog
|
||||||
}
|
}
|
||||||
real_sleep 0.1;
|
real_sleep 0.1;
|
||||||
|
@ -1,23 +1,48 @@
|
|||||||
# ==== Purpose ====
|
# ==== Purpose ====
|
||||||
#
|
#
|
||||||
# Waits until the IO thread of the current connection has got an
|
# Waits until the IO thread of the current connection has got an
|
||||||
# error, or until a timeout is reached.
|
# error, or until a timeout is reached. Also waits until the IO
|
||||||
|
# thread has completely stopped.
|
||||||
#
|
#
|
||||||
# ==== Usage ====
|
# ==== Usage ====
|
||||||
#
|
#
|
||||||
# source include/wait_for_slave_io_error.inc;
|
# source include/wait_for_slave_io_error.inc;
|
||||||
#
|
#
|
||||||
# Parameters to this macro are $slave_timeout and
|
# Parameters:
|
||||||
# $slave_keep_connection. See wait_for_slave_param.inc for
|
#
|
||||||
# descriptions.
|
# $slave_io_errno
|
||||||
|
# The expected IO error number. This is required.
|
||||||
|
# (After BUG#41956 has been fixed, this will be required to be a
|
||||||
|
# symbolic name instead of a number.)
|
||||||
|
#
|
||||||
|
# $show_slave_io_error
|
||||||
|
# If set, will print the error to the query log.
|
||||||
|
#
|
||||||
|
# $slave_timeout
|
||||||
|
# See wait_for_slave_param.inc for description.
|
||||||
|
#
|
||||||
|
# $master_connection
|
||||||
|
# See wait_for_slave_param.inc for description.
|
||||||
|
|
||||||
let $old_slave_param_comparison= $slave_param_comparison;
|
if (`SELECT '$slave_io_errno' = ''`) {
|
||||||
|
--die !!!ERROR IN TEST: you must set \$slave_io_errno before sourcing wait_for_slave_io_error.inc
|
||||||
|
}
|
||||||
|
|
||||||
let $slave_param= Last_IO_Errno;
|
let $slave_param= Slave_IO_Running;
|
||||||
let $slave_param_comparison= !=;
|
let $slave_param_value= No;
|
||||||
let $slave_param_value= 0;
|
let $slave_error_message= Failed while waiting for slave to stop the IO thread (expecting error in the IO thread);
|
||||||
let $slave_error_message= Failed while waiting for slave to produce an error in its sql thread;
|
|
||||||
source include/wait_for_slave_param.inc;
|
source include/wait_for_slave_param.inc;
|
||||||
let $slave_error_message= ;
|
|
||||||
|
|
||||||
let $slave_param_comparison= $old_slave_param_comparison;
|
let $_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
|
||||||
|
if (`SELECT '$_error' != '$slave_io_errno'`) {
|
||||||
|
--echo **** Slave stopped with wrong error code: $_error (expected $slave_io_errno) ****
|
||||||
|
source include/show_rpl_debug_info.inc;
|
||||||
|
--echo **** Slave stopped with wrong error code: $_error (expected $slave_io_errno) ****
|
||||||
|
--die Slave stopped with wrong error code
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($show_slave_io_error)
|
||||||
|
{
|
||||||
|
let $error= query_get_value("SHOW SLAVE STATUS", Last_IO_Error, 1);
|
||||||
|
echo Last_IO_Error = $error;
|
||||||
|
}
|
||||||
|
@ -78,5 +78,5 @@ if (!$_slave_timeout_counter)
|
|||||||
--echo Current connection is '$CURRENT_CONNECTION'
|
--echo Current connection is '$CURRENT_CONNECTION'
|
||||||
echo Note: the following output may have changed since the failure was detected;
|
echo Note: the following output may have changed since the failure was detected;
|
||||||
source include/show_rpl_debug_info.inc;
|
source include/show_rpl_debug_info.inc;
|
||||||
exit;
|
die;
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
# (After BUG#41956 has been fixed, this will be required to be a
|
# (After BUG#41956 has been fixed, this will be required to be a
|
||||||
# symbolic name instead of a number.)
|
# symbolic name instead of a number.)
|
||||||
#
|
#
|
||||||
|
# $show_slave_sql_error
|
||||||
|
# If set, will print the error to the query log.
|
||||||
|
#
|
||||||
# $slave_timeout
|
# $slave_timeout
|
||||||
# See wait_for_slave_param.inc for description.
|
# See wait_for_slave_param.inc for description.
|
||||||
#
|
#
|
||||||
@ -22,8 +25,7 @@
|
|||||||
# See wait_for_slave_param.inc for description.
|
# See wait_for_slave_param.inc for description.
|
||||||
|
|
||||||
if (`SELECT '$slave_sql_errno' = ''`) {
|
if (`SELECT '$slave_sql_errno' = ''`) {
|
||||||
--echo !!!ERROR IN TEST: you must set \$slave_sql_errno before sourcing wait_fro_slave_sql_error.inc
|
--die !!!ERROR IN TEST: you must set \$slave_sql_errno before sourcing wait_for_slave_sql_error.inc
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let $slave_param= Slave_SQL_Running;
|
let $slave_param= Slave_SQL_Running;
|
||||||
@ -33,7 +35,14 @@ source include/wait_for_slave_param.inc;
|
|||||||
|
|
||||||
let $_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
|
let $_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
|
||||||
if (`SELECT '$_error' != '$slave_sql_errno'`) {
|
if (`SELECT '$_error' != '$slave_sql_errno'`) {
|
||||||
--echo Slave stopped with wrong error code: $_error (expected $slave_sql_errno)
|
--echo **** Slave stopped with wrong error code: $_error (expected $slave_sql_errno) ****
|
||||||
source include/show_rpl_debug_info.inc;
|
source include/show_rpl_debug_info.inc;
|
||||||
exit;
|
--echo **** Slave stopped with wrong error code: $_error (expected $slave_sql_errno) ****
|
||||||
|
--die Slave stopped with wrong error code
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($show_slave_sql_error)
|
||||||
|
{
|
||||||
|
let $error= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
|
||||||
|
echo Last_SQL_Error = $error;
|
||||||
}
|
}
|
||||||
|
@ -22,17 +22,30 @@
|
|||||||
#
|
#
|
||||||
# $master_connection
|
# $master_connection
|
||||||
# See wait_for_slave_param.inc for description.
|
# See wait_for_slave_param.inc for description.
|
||||||
|
#
|
||||||
|
# $slave_skip_counter
|
||||||
|
# If set, skip this number of events. If not set, skip one event.
|
||||||
|
#
|
||||||
|
# $not_switch_connection If set, don't switch to slave and don't switch back
|
||||||
|
# master.
|
||||||
|
#
|
||||||
|
|
||||||
echo --source include/wait_for_slave_sql_error_and_skip.inc;
|
echo --source include/wait_for_slave_sql_error_and_skip.inc;
|
||||||
connection slave;
|
if (!$not_switch_connection)
|
||||||
source include/wait_for_slave_sql_error.inc;
|
|
||||||
if ($show_sql_error)
|
|
||||||
{
|
{
|
||||||
let $error= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
|
connection slave;
|
||||||
echo Last_SQL_Error = $error;
|
|
||||||
}
|
}
|
||||||
|
source include/wait_for_slave_sql_error.inc;
|
||||||
|
|
||||||
# skip the erroneous statement
|
# skip the erroneous statement
|
||||||
set global sql_slave_skip_counter=1;
|
if ($slave_skip_counter) {
|
||||||
|
eval SET GLOBAL SQL_SLAVE_SKIP_COUNTER= $slave_skip_counter;
|
||||||
|
}
|
||||||
|
if (!$slave_skip_counter) {
|
||||||
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||||
|
}
|
||||||
source include/start_slave.inc;
|
source include/start_slave.inc;
|
||||||
connection master;
|
if (!$not_switch_connection)
|
||||||
|
{
|
||||||
|
connection master;
|
||||||
|
}
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
if (`SELECT STRCMP('$status_type', '') * STRCMP(UPPER('$status_type'), 'SESSION') * STRCMP(UPPER('$status_type'), 'GLOBAL')`)
|
if (`SELECT STRCMP('$status_type', '') * STRCMP(UPPER('$status_type'), 'SESSION') * STRCMP(UPPER('$status_type'), 'GLOBAL')`)
|
||||||
{
|
{
|
||||||
--echo **** ERROR: Unknown type of variable status_type: allowed values are: SESSION or GLOBAL ****
|
--echo **** ERROR: Unknown type of variable status_type: allowed values are: SESSION or GLOBAL ****
|
||||||
exit;
|
die;
|
||||||
}
|
}
|
||||||
|
|
||||||
let $_status_timeout_counter= $status_timeout;
|
let $_status_timeout_counter= $status_timeout;
|
||||||
@ -60,7 +60,7 @@ while (`SELECT NOT('$_show_status_value' $_status_var_comparsion '$status_var_va
|
|||||||
--echo **** Showing STATUS, PROCESSLIST ****
|
--echo **** Showing STATUS, PROCESSLIST ****
|
||||||
eval SHOW $status_type STATUS LIKE '$status_var';
|
eval SHOW $status_type STATUS LIKE '$status_var';
|
||||||
SHOW PROCESSLIST;
|
SHOW PROCESSLIST;
|
||||||
exit;
|
die;
|
||||||
}
|
}
|
||||||
dec $_status_timeout_counter;
|
dec $_status_timeout_counter;
|
||||||
sleep 0.1;
|
sleep 0.1;
|
||||||
|
@ -122,5 +122,6 @@ if (!$success)
|
|||||||
--echo # Timeout in wait_until_count_sessions.inc
|
--echo # Timeout in wait_until_count_sessions.inc
|
||||||
--echo # Number of sessions expected: <= $count_sessions found: $current_sessions
|
--echo # Number of sessions expected: <= $count_sessions found: $current_sessions
|
||||||
SHOW PROCESSLIST;
|
SHOW PROCESSLIST;
|
||||||
|
--die Timeout in wait_until_count_sessions.inc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,11 +12,11 @@ alter table t1 enable keys;;
|
|||||||
insert into t2 values (1);
|
insert into t2 values (1);
|
||||||
insert into t1 values (1, 1, 1);
|
insert into t1 values (1, 1, 1);
|
||||||
set session debug="-d,sleep_alter_enable_indexes";
|
set session debug="-d,sleep_alter_enable_indexes";
|
||||||
show binlog events in 'master-bin.000001' from 106;
|
show binlog events from <binlog_start>;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Query 1 # use `test`; insert into t2 values (1)
|
master-bin.000001 # Query # # use `test`; insert into t2 values (1)
|
||||||
master-bin.000001 # Query 1 # use `test`; alter table t1 enable keys
|
master-bin.000001 # Query # # use `test`; alter table t1 enable keys
|
||||||
master-bin.000001 # Query 1 # use `test`; insert into t1 values (1, 1, 1)
|
master-bin.000001 # Query # # use `test`; insert into t1 values (1, 1, 1)
|
||||||
drop tables t1, t2;
|
drop tables t1, t2;
|
||||||
End of 5.0 tests
|
End of 5.0 tests
|
||||||
drop table if exists t1, t2, t3;
|
drop table if exists t1, t2, t3;
|
||||||
@ -41,17 +41,17 @@ alter table t2 change c vc varchar(100) default 'Test2', rename to t1;;
|
|||||||
rename table t1 to t3;
|
rename table t1 to t3;
|
||||||
drop table t3;
|
drop table t3;
|
||||||
set session debug="-d,sleep_alter_before_main_binlog";
|
set session debug="-d,sleep_alter_before_main_binlog";
|
||||||
show binlog events in 'master-bin.000001' from 106;
|
show binlog events from <binlog_start>;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Query 1 # use `test`; alter table t1 change i c char(10) default 'Test1'
|
master-bin.000001 # Query # # use `test`; alter table t1 change i c char(10) default 'Test1'
|
||||||
master-bin.000001 # Query 1 # use `test`; insert into t1 values ()
|
master-bin.000001 # Query # # use `test`; insert into t1 values ()
|
||||||
master-bin.000001 # Query 1 # use `test`; alter table t1 change c vc varchar(100) default 'Test2'
|
master-bin.000001 # Query # # use `test`; alter table t1 change c vc varchar(100) default 'Test2'
|
||||||
master-bin.000001 # Query 1 # use `test`; rename table t1 to t2
|
master-bin.000001 # Query # # use `test`; rename table t1 to t2
|
||||||
master-bin.000001 # Query 1 # use `test`; drop table t2
|
master-bin.000001 # Query # # use `test`; drop table t2
|
||||||
master-bin.000001 # Query 1 # use `test`; create table t1 (i int)
|
master-bin.000001 # Query # # use `test`; create table t1 (i int)
|
||||||
master-bin.000001 # Query 1 # use `test`; alter table t1 change i c char(10) default 'Test3', rename to t2
|
master-bin.000001 # Query # # use `test`; alter table t1 change i c char(10) default 'Test3', rename to t2
|
||||||
master-bin.000001 # Query 1 # use `test`; insert into t2 values ()
|
master-bin.000001 # Query # # use `test`; insert into t2 values ()
|
||||||
master-bin.000001 # Query 1 # use `test`; alter table t2 change c vc varchar(100) default 'Test2', rename to t1
|
master-bin.000001 # Query # # use `test`; alter table t2 change c vc varchar(100) default 'Test2', rename to t1
|
||||||
master-bin.000001 # Query 1 # use `test`; rename table t1 to t3
|
master-bin.000001 # Query # # use `test`; rename table t1 to t3
|
||||||
master-bin.000001 # Query 1 # use `test`; drop table t3
|
master-bin.000001 # Query # # use `test`; drop table t3
|
||||||
End of 5.1 tests
|
End of 5.1 tests
|
||||||
|
@ -175,12 +175,12 @@ t2 CREATE TABLE `t2` (
|
|||||||
`i` int(11) DEFAULT NULL
|
`i` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
drop table t2;
|
drop table t2;
|
||||||
show binlog events in 'master-bin.000001' from 106;
|
show binlog events from <binlog_start>;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Query 1 # use `test`; insert into t1 values (1)
|
master-bin.000001 # Query # # use `test`; insert into t1 values (1)
|
||||||
master-bin.000001 # Query 1 # use `test`; create table t2 like t1
|
master-bin.000001 # Query # # use `test`; create table t2 like t1
|
||||||
master-bin.000001 # Query 1 # use `test`; drop table t1
|
master-bin.000001 # Query # # use `test`; drop table t1
|
||||||
master-bin.000001 # Query 1 # use `test`; drop table t2
|
master-bin.000001 # Query # # use `test`; drop table t2
|
||||||
create table t1 (i int);
|
create table t1 (i int);
|
||||||
set session debug="-d,sleep_create_like_before_check_if_exists:+d,sleep_create_like_before_copy";
|
set session debug="-d,sleep_create_like_before_check_if_exists:+d,sleep_create_like_before_copy";
|
||||||
create table t2 like t1;;
|
create table t2 like t1;;
|
||||||
@ -197,11 +197,11 @@ reset master;
|
|||||||
create table t2 like t1;;
|
create table t2 like t1;;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
drop table t2;
|
drop table t2;
|
||||||
show binlog events in 'master-bin.000001' from 106;
|
show binlog events from <binlog_start>;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Query 1 # use `test`; create table t2 like t1
|
master-bin.000001 # Query # # use `test`; create table t2 like t1
|
||||||
master-bin.000001 # Query 1 # use `test`; drop table t1
|
master-bin.000001 # Query # # use `test`; drop table t1
|
||||||
master-bin.000001 # Query 1 # use `test`; drop table t2
|
master-bin.000001 # Query # # use `test`; drop table t2
|
||||||
create table t1 (i int);
|
create table t1 (i int);
|
||||||
set session debug="-d,sleep_create_like_before_copy:+d,sleep_create_like_before_ha_create";
|
set session debug="-d,sleep_create_like_before_copy:+d,sleep_create_like_before_ha_create";
|
||||||
reset master;
|
reset master;
|
||||||
@ -213,16 +213,16 @@ drop table t2;
|
|||||||
create table t2 like t1;;
|
create table t2 like t1;;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
drop table t2;
|
drop table t2;
|
||||||
show binlog events in 'master-bin.000001' from 106;
|
show binlog events from <binlog_start>;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Query 1 # use `test`; create table t2 like t1
|
master-bin.000001 # Query # # use `test`; create table t2 like t1
|
||||||
master-bin.000001 # Query 1 # use `test`; insert into t2 values (1)
|
master-bin.000001 # Query # # use `test`; insert into t2 values (1)
|
||||||
master-bin.000001 # Query 1 # use `test`; drop table t2
|
master-bin.000001 # Query # # use `test`; drop table t2
|
||||||
master-bin.000001 # Query 1 # use `test`; create table t2 like t1
|
master-bin.000001 # Query # # use `test`; create table t2 like t1
|
||||||
master-bin.000001 # Query 1 # use `test`; drop table t2
|
master-bin.000001 # Query # # use `test`; drop table t2
|
||||||
master-bin.000001 # Query 1 # use `test`; create table t2 like t1
|
master-bin.000001 # Query # # use `test`; create table t2 like t1
|
||||||
master-bin.000001 # Query 1 # use `test`; drop table t1
|
master-bin.000001 # Query # # use `test`; drop table t1
|
||||||
master-bin.000001 # Query 1 # use `test`; drop table t2
|
master-bin.000001 # Query # # use `test`; drop table t2
|
||||||
create table t1 (i int);
|
create table t1 (i int);
|
||||||
set session debug="-d,sleep_create_like_before_ha_create:+d,sleep_create_like_before_binlogging";
|
set session debug="-d,sleep_create_like_before_ha_create:+d,sleep_create_like_before_binlogging";
|
||||||
reset master;
|
reset master;
|
||||||
@ -234,14 +234,14 @@ drop table t2;
|
|||||||
create table t2 like t1;;
|
create table t2 like t1;;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
drop table t2;
|
drop table t2;
|
||||||
show binlog events in 'master-bin.000001' from 106;
|
show binlog events from <binlog_start>;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Query 1 # use `test`; create table t2 like t1
|
master-bin.000001 # Query # # use `test`; create table t2 like t1
|
||||||
master-bin.000001 # Query 1 # use `test`; insert into t2 values (1)
|
master-bin.000001 # Query # # use `test`; insert into t2 values (1)
|
||||||
master-bin.000001 # Query 1 # use `test`; drop table t2
|
master-bin.000001 # Query # # use `test`; drop table t2
|
||||||
master-bin.000001 # Query 1 # use `test`; create table t2 like t1
|
master-bin.000001 # Query # # use `test`; create table t2 like t1
|
||||||
master-bin.000001 # Query 1 # use `test`; drop table t2
|
master-bin.000001 # Query # # use `test`; drop table t2
|
||||||
master-bin.000001 # Query 1 # use `test`; create table t2 like t1
|
master-bin.000001 # Query # # use `test`; create table t2 like t1
|
||||||
master-bin.000001 # Query 1 # use `test`; drop table t1
|
master-bin.000001 # Query # # use `test`; drop table t1
|
||||||
master-bin.000001 # Query 1 # use `test`; drop table t2
|
master-bin.000001 # Query # # use `test`; drop table t2
|
||||||
set session debug="-d,sleep_create_like_before_binlogging";
|
set session debug="-d,sleep_create_like_before_binlogging";
|
||||||
|
@ -29,20 +29,20 @@ HEX(s1) HEX(s2) d
|
|||||||
466F6F2773206120426172 ED40ED41ED42 47.93
|
466F6F2773206120426172 ED40ED41ED42 47.93
|
||||||
DROP PROCEDURE bug18293|
|
DROP PROCEDURE bug18293|
|
||||||
DROP TABLE t4|
|
DROP TABLE t4|
|
||||||
SHOW BINLOG EVENTS FROM 370|
|
show binlog events from <binlog_start>|
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 370 Query 1 536 use `test`; CREATE TABLE t4 (s1 CHAR(50) CHARACTER SET latin1,
|
master-bin.000001 # Query # # use `test`; CREATE TABLE t4 (s1 CHAR(50) CHARACTER SET latin1,
|
||||||
s2 CHAR(50) CHARACTER SET cp932,
|
s2 CHAR(50) CHARACTER SET cp932,
|
||||||
d DECIMAL(10,2))
|
d DECIMAL(10,2))
|
||||||
master-bin.000001 536 Query 1 785 use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `bug18293`(IN ins1 CHAR(50),
|
master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `bug18293`(IN ins1 CHAR(50),
|
||||||
IN ins2 CHAR(50) CHARACTER SET cp932,
|
IN ins2 CHAR(50) CHARACTER SET cp932,
|
||||||
IN ind DECIMAL(10,2))
|
IN ind DECIMAL(10,2))
|
||||||
BEGIN
|
BEGIN
|
||||||
INSERT INTO t4 VALUES (ins1, ins2, ind);
|
INSERT INTO t4 VALUES (ins1, ins2, ind);
|
||||||
END
|
END
|
||||||
master-bin.000001 785 Query 1 1049 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172 COLLATE 'latin1_swedish_ci'), NAME_CONST('ins2',_cp932 0xED40ED41ED42 COLLATE 'cp932_japanese_ci'), NAME_CONST('ind',47.93))
|
master-bin.000001 # Query # # use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172 COLLATE 'latin1_swedish_ci'), NAME_CONST('ins2',_cp932 0xED40ED41ED42 COLLATE 'cp932_japanese_ci'), NAME_CONST('ind',47.93))
|
||||||
master-bin.000001 1049 Query 1 1138 use `test`; DROP PROCEDURE bug18293
|
master-bin.000001 # Query # # use `test`; DROP PROCEDURE bug18293
|
||||||
master-bin.000001 1138 Query 1 1217 use `test`; DROP TABLE t4
|
master-bin.000001 # Query # # use `test`; DROP TABLE t4
|
||||||
End of 5.0 tests
|
End of 5.0 tests
|
||||||
SHOW BINLOG EVENTS FROM 365;
|
SHOW BINLOG EVENTS FROM 365;
|
||||||
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error
|
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error
|
||||||
|
@ -7,15 +7,13 @@ SET AUTOCOMMIT=0;
|
|||||||
INSERT t1 VALUES (1);
|
INSERT t1 VALUES (1);
|
||||||
# Switch to connection con2
|
# Switch to connection con2
|
||||||
FLUSH TABLES WITH READ LOCK;
|
FLUSH TABLES WITH READ LOCK;
|
||||||
SHOW MASTER STATUS;
|
show binlog events from <binlog_start>;
|
||||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 106
|
|
||||||
# Switch to connection con1
|
# Switch to connection con1
|
||||||
COMMIT;
|
COMMIT;
|
||||||
# Switch to connection con2
|
# Switch to connection con2
|
||||||
SHOW MASTER STATUS;
|
show binlog events from <binlog_start>;
|
||||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 106
|
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
# Switch to connection con1
|
# Switch to connection con1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
@ -602,9 +602,6 @@ select * from t2 /* must be (3,1), (4,4) */;
|
|||||||
a b
|
a b
|
||||||
3 1
|
3 1
|
||||||
4 4
|
4 4
|
||||||
show master status /* there must be the UPDATE query event */;
|
|
||||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
|
||||||
master-bin.000001 206
|
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
insert into t1 values (1,2),(3,4),(4,4);
|
insert into t1 values (1,2),(3,4),(4,4);
|
||||||
@ -612,9 +609,6 @@ insert into t2 values (1,2),(3,4),(4,4);
|
|||||||
reset master;
|
reset master;
|
||||||
UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a;
|
UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a;
|
||||||
ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
|
ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
|
||||||
show master status /* there must be the UPDATE query event */;
|
|
||||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
|
||||||
master-bin.000001 221
|
|
||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
set @@session.binlog_format= @sav_binlog_format;
|
set @@session.binlog_format= @sav_binlog_format;
|
||||||
drop table if exists t1, t2, t3;
|
drop table if exists t1, t2, t3;
|
||||||
|
@ -14,13 +14,13 @@ end|
|
|||||||
reset master|
|
reset master|
|
||||||
insert into t2 values (bug23333(),1)|
|
insert into t2 values (bug23333(),1)|
|
||||||
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
||||||
show binlog events from 106 /* with fixes for #23333 will show there is the query */|
|
show binlog events from <binlog_start>|
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Query 1 # #
|
master-bin.000001 # Query # # BEGIN
|
||||||
master-bin.000001 # Table_map 1 # #
|
master-bin.000001 # Table_map # # table_id: # (test.t2)
|
||||||
master-bin.000001 # Table_map 1 # #
|
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||||
master-bin.000001 # Write_rows 1 # #
|
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||||
master-bin.000001 # Query 1 # #
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
select count(*),@a from t1 /* must be 1,1 */|
|
select count(*),@a from t1 /* must be 1,1 */|
|
||||||
count(*) @a
|
count(*) @a
|
||||||
1 1
|
1 1
|
||||||
|
@ -156,9 +156,9 @@ select * from t2 /* must be (3,1), (4,4) */;
|
|||||||
a b
|
a b
|
||||||
1 1
|
1 1
|
||||||
4 4
|
4 4
|
||||||
show master status /* there must no UPDATE in binlog */;
|
# There must no UPDATE in binlog;
|
||||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
show binlog events from <binlog_start>;
|
||||||
master-bin.000001 106
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
delete from t1;
|
delete from t1;
|
||||||
delete from t2;
|
delete from t2;
|
||||||
insert into t1 values (1,2),(3,4),(4,4);
|
insert into t1 values (1,2),(3,4),(4,4);
|
||||||
@ -166,8 +166,8 @@ insert into t2 values (1,2),(3,4),(4,4);
|
|||||||
reset master;
|
reset master;
|
||||||
UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a;
|
UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a;
|
||||||
ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
|
ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
|
||||||
show master status /* there must be no UPDATE query event */;
|
# There must be no UPDATE query event;
|
||||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
show binlog events from <binlog_start>;
|
||||||
master-bin.000001 106
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
End of tests
|
End of tests
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -104,9 +104,8 @@ select * from t2;
|
|||||||
a
|
a
|
||||||
select * from t3;
|
select * from t3;
|
||||||
a
|
a
|
||||||
show binlog events;
|
show binlog events from <binlog_start>;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Format_desc # # Server ver: VERSION, Binlog ver: 4
|
|
||||||
master-bin.000001 # Query # # use `test`; drop table t1,t2
|
master-bin.000001 # Query # # use `test`; drop table t1,t2
|
||||||
master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=blackhole
|
master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=blackhole
|
||||||
master-bin.000001 # Query # # BEGIN
|
master-bin.000001 # Query # # BEGIN
|
||||||
@ -126,7 +125,7 @@ master-bin.000001 # Query # # use `test`; replace into t1 values(100)
|
|||||||
master-bin.000001 # Query # # COMMIT
|
master-bin.000001 # Query # # COMMIT
|
||||||
master-bin.000001 # Query # # use `test`; create table t2 (a varchar(200)) engine=blackhole
|
master-bin.000001 # Query # # use `test`; create table t2 (a varchar(200)) engine=blackhole
|
||||||
master-bin.000001 # Query # # BEGIN
|
master-bin.000001 # Query # # BEGIN
|
||||||
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=581
|
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
||||||
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t2` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) ;file_id=#
|
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t2` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) ;file_id=#
|
||||||
master-bin.000001 # Query # # COMMIT
|
master-bin.000001 # Query # # COMMIT
|
||||||
master-bin.000001 # Query # # use `test`; alter table t1 add b int
|
master-bin.000001 # Query # # use `test`; alter table t1 add b int
|
||||||
@ -163,13 +162,6 @@ start transaction;
|
|||||||
insert into t1 values(2);
|
insert into t1 values(2);
|
||||||
rollback;
|
rollback;
|
||||||
set autocommit=1;
|
set autocommit=1;
|
||||||
show binlog events;
|
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
|
||||||
master-bin.000001 # Format_desc # # Server ver: VERSION, Binlog ver: 4
|
|
||||||
master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=blackhole
|
|
||||||
master-bin.000001 # Query # # BEGIN
|
|
||||||
master-bin.000001 # Query # # use `test`; insert into t1 values(1)
|
|
||||||
master-bin.000001 # Query # # COMMIT
|
|
||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
reset master;
|
reset master;
|
||||||
create table t1 (a int auto_increment, primary key (a)) engine=blackhole;
|
create table t1 (a int auto_increment, primary key (a)) engine=blackhole;
|
||||||
|
@ -155,7 +155,8 @@ reset master;
|
|||||||
UPDATE t2,t1 SET t2.a=t1.a+2;
|
UPDATE t2,t1 SET t2.a=t1.a+2;
|
||||||
# check
|
# check
|
||||||
select * from t2 /* must be (3,1), (4,4) */;
|
select * from t2 /* must be (3,1), (4,4) */;
|
||||||
show master status /* there must no UPDATE in binlog */;
|
--echo # There must no UPDATE in binlog;
|
||||||
|
source include/show_binlog_events.inc;
|
||||||
|
|
||||||
# B. testing multi_update::send_error() execution branch
|
# B. testing multi_update::send_error() execution branch
|
||||||
delete from t1;
|
delete from t1;
|
||||||
@ -165,7 +166,8 @@ insert into t2 values (1,2),(3,4),(4,4);
|
|||||||
reset master;
|
reset master;
|
||||||
--error ER_DUP_ENTRY
|
--error ER_DUP_ENTRY
|
||||||
UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a;
|
UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a;
|
||||||
show master status /* there must be no UPDATE query event */;
|
--echo # There must be no UPDATE query event;
|
||||||
|
source include/show_binlog_events.inc;
|
||||||
|
|
||||||
# cleanup bug#27716
|
# cleanup bug#27716
|
||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
|
@ -5,8 +5,7 @@ create table t1 (a int, b int) engine=innodb;
|
|||||||
begin;
|
begin;
|
||||||
insert into t1 values (1,2);
|
insert into t1 values (1,2);
|
||||||
commit;
|
commit;
|
||||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
|
source include/show_binlog_events.inc;
|
||||||
show binlog events;
|
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
# This is a wrapper for binlog.test so that the same test case can be used
|
# This is a wrapper for binlog.test so that the same test case can be used
|
||||||
|
@ -16,12 +16,11 @@ LOAD DATA INFILE FILENAME
|
|||||||
SELECT COUNT(*) FROM t1;
|
SELECT COUNT(*) FROM t1;
|
||||||
COUNT(*)
|
COUNT(*)
|
||||||
3
|
3
|
||||||
SHOW BINLOG EVENTS;
|
show binlog events from <binlog_start>;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Format_desc 1 # Server ver: #
|
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (b CHAR(10))
|
||||||
master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 (b CHAR(10))
|
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
||||||
master-bin.000001 # Begin_load_query 1 # ;file_id=#;block_len=#
|
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/rpl_bug12691.dat' INTO TABLE `t1` FIELDS TERMINATED BY '|' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`b`) ;file_id=#
|
||||||
master-bin.000001 # Execute_load_query 1 # use `test`; LOAD DATA INFILE FILENAME ;file_id=#
|
|
||||||
|
|
||||||
**** On Slave ****
|
**** On Slave ****
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||||
|
@ -13,5 +13,6 @@ Tables_in_test
|
|||||||
t1
|
t1
|
||||||
show master status;
|
show master status;
|
||||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||||
master-bin.000001 278
|
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
|
||||||
flush logs;
|
flush logs;
|
||||||
|
drop table t1;
|
||||||
|
@ -28,9 +28,7 @@ STOP SLAVE;
|
|||||||
|
|
||||||
SELECT COUNT(*) FROM t1;
|
SELECT COUNT(*) FROM t1;
|
||||||
|
|
||||||
--replace_column 2 # 5 #
|
source include/show_binlog_events.inc;
|
||||||
--replace_regex /Server ver: .+/Server ver: #/ /table_id: [0-9]+/table_id: #/ /COMMIT.+xid=[0-9]+.+/#/ /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/ /'.+'/FILENAME/
|
|
||||||
SHOW BINLOG EVENTS;
|
|
||||||
|
|
||||||
--save_master_pos
|
--save_master_pos
|
||||||
|
|
||||||
|
@ -21,8 +21,10 @@ create table t1(id int);
|
|||||||
|
|
||||||
show tables;
|
show tables;
|
||||||
|
|
||||||
show master status;
|
--source include/show_master_status.inc
|
||||||
|
|
||||||
flush logs;
|
flush logs;
|
||||||
|
|
||||||
--exec $MYSQL_BINLOG $MYSQL_TEST_DIR/var/log/master-bin.000001 | $MYSQL test
|
--exec $MYSQL_BINLOG $MYSQL_TEST_DIR/var/log/master-bin.000001 | $MYSQL test
|
||||||
|
|
||||||
|
drop table t1;
|
||||||
|
@ -10,166 +10,25 @@ File Position Binlog_Do_DB Binlog_Ignore_DB
|
|||||||
master-bin.000001 106
|
master-bin.000001 106
|
||||||
stop slave;
|
stop slave;
|
||||||
reset slave;
|
reset slave;
|
||||||
show slave status;
|
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry #
|
|
||||||
Master_Log_File
|
Master_Log_File
|
||||||
Read_Master_Log_Pos 4
|
Read_Master_Log_Pos 4
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File
|
Relay_Master_Log_File
|
||||||
Slave_IO_Running No
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos 0
|
Exec_Master_Log_Pos 0
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno 0
|
|
||||||
Last_IO_Error
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
change master to master_host='127.0.0.1';
|
change master to master_host='127.0.0.1';
|
||||||
show slave status;
|
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry #
|
|
||||||
Master_Log_File
|
Master_Log_File
|
||||||
Read_Master_Log_Pos 4
|
Read_Master_Log_Pos 4
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File
|
Relay_Master_Log_File
|
||||||
Slave_IO_Running No
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos 0
|
Exec_Master_Log_Pos 0
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno 0
|
|
||||||
Last_IO_Error
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
change master to master_host='127.0.0.1',master_user='root',
|
change master to master_host='127.0.0.1',master_user='root',
|
||||||
master_password='',master_port=MASTER_PORT;
|
master_password='',master_port=MASTER_PORT;
|
||||||
show slave status;
|
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry #
|
|
||||||
Master_Log_File
|
Master_Log_File
|
||||||
Read_Master_Log_Pos 4
|
Read_Master_Log_Pos 4
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File
|
Relay_Master_Log_File
|
||||||
Slave_IO_Running No
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos 0
|
Exec_Master_Log_Pos 0
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno 0
|
|
||||||
Last_IO_Error
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
start slave;
|
start slave;
|
||||||
show slave status;
|
|
||||||
Slave_IO_State Waiting for master to send event
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
Master_Log_File master-bin.000001
|
||||||
Read_Master_Log_Pos 106
|
|
||||||
Relay_Log_File slave-relay-bin.000002
|
|
||||||
Relay_Log_Pos 252
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
Relay_Master_Log_File master-bin.000001
|
||||||
Slave_IO_Running Yes
|
Checking that both slave threads are running.
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos 106
|
|
||||||
Relay_Log_Space 407
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno 0
|
|
||||||
Last_IO_Error
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
create table t1 (n int, PRIMARY KEY(n));
|
create table t1 (n int, PRIMARY KEY(n));
|
||||||
insert into t1 values (10),(45),(90);
|
insert into t1 values (10),(45),(90);
|
||||||
|
@ -4,8 +4,7 @@ reset master;
|
|||||||
reset slave;
|
reset slave;
|
||||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
start slave;
|
start slave;
|
||||||
SHOW SLAVE STATUS;
|
SHOW SLAVE STATUS;;
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
|
|
||||||
SHOW SLAVE HOSTS;
|
SHOW SLAVE HOSTS;
|
||||||
Server_id Host Port Rpl_recovery_rank Master_id
|
Server_id Host Port Rpl_recovery_rank Master_id
|
||||||
2 127.0.0.1 SLAVE_PORT 0 1
|
2 127.0.0.1 SLAVE_PORT 0 1
|
||||||
|
@ -11,13 +11,7 @@ stop slave sql_thread;
|
|||||||
insert into t1 values(1);
|
insert into t1 values(1);
|
||||||
insert into t1 values(2);
|
insert into t1 values(2);
|
||||||
stop slave;
|
stop slave;
|
||||||
show slave status;
|
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
|
|
||||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 191 # None 0 No # No 0 0
|
|
||||||
change master to master_user='root';
|
change master to master_user='root';
|
||||||
show slave status;
|
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
|
|
||||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 191 # None 0 No # No 0 0
|
|
||||||
start slave;
|
start slave;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
n
|
n
|
||||||
|
@ -4,8 +4,6 @@ reset master;
|
|||||||
reset slave;
|
reset slave;
|
||||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
start slave;
|
start slave;
|
||||||
show slave status;
|
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
|
|
||||||
load table t1 from master;
|
load table t1 from master;
|
||||||
ERROR 08S01: Error connecting to master: Master is not configured
|
ERROR 08S01: Error connecting to master: Master is not configured
|
||||||
load table t1 from master;
|
load table t1 from master;
|
||||||
|
@ -17,43 +17,6 @@ let $result_pattern= '%127.0.0.1%root%slave-bin.000001%slave-bin.000001%Yes%Yes%
|
|||||||
|
|
||||||
--source include/wait_slave_status.inc
|
--source include/wait_slave_status.inc
|
||||||
flush logs;
|
flush logs;
|
||||||
SHOW SLAVE STATUS;
|
Relay_Log_File mysqld-relay-bin.000003
|
||||||
Slave_IO_State #
|
Checking that both slave threads are running.
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port SLAVE_PORT
|
|
||||||
Connect_Retry 60
|
|
||||||
Master_Log_File slave-bin.000001
|
|
||||||
Read_Master_Log_Pos 106
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File slave-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos 106
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno 0
|
|
||||||
Last_IO_Error
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
STOP SLAVE;
|
STOP SLAVE;
|
||||||
|
@ -10,6 +10,6 @@ load data infile '../../std_data/rpl_loaddata.dat' into table test.t1;
|
|||||||
select count(*) from test.t1;
|
select count(*) from test.t1;
|
||||||
count(*)
|
count(*)
|
||||||
2
|
2
|
||||||
show binlog events from 106;
|
show binlog events from <binlog_start>;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
drop table test.t1;
|
drop table test.t1;
|
||||||
|
@ -4,39 +4,23 @@ reset master;
|
|||||||
reset slave;
|
reset slave;
|
||||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
start slave;
|
start slave;
|
||||||
show master status;
|
|
||||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
|
||||||
master-bin.000001 106 <Binlog_Ignore_DB>
|
|
||||||
show slave status;
|
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
|
|
||||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes 0 0 106 # None 0 No # No 0 0
|
|
||||||
stop slave;
|
stop slave;
|
||||||
change master to master_log_pos=106;
|
change master to master_log_pos=MASTER_LOG_POS;
|
||||||
start slave;
|
start slave;
|
||||||
stop slave;
|
stop slave;
|
||||||
change master to master_log_pos=106;
|
change master to master_log_pos=MASTER_LOG_POS;
|
||||||
show slave status;
|
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
|
|
||||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 No No 0 0 106 # None 0 No # No 0 0
|
|
||||||
start slave;
|
start slave;
|
||||||
show slave status;
|
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
|
|
||||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes 0 0 106 # None 0 No # No 0 0
|
|
||||||
stop slave;
|
stop slave;
|
||||||
change master to master_log_pos=177;
|
# impossible position leads to an error
|
||||||
|
change master to master_log_pos=MASTER_LOG_POS;
|
||||||
start slave;
|
start slave;
|
||||||
show slave status;
|
Last_IO_Error = Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position'
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
|
|
||||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 177 # # master-bin.000001 No Yes 0 0 177 # None 0 No # No 1236 Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position' 0
|
|
||||||
show master status;
|
|
||||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
|
||||||
master-bin.000001 106 <Binlog_Ignore_DB>
|
|
||||||
create table if not exists t1 (n int);
|
create table if not exists t1 (n int);
|
||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
create table t1 (n int);
|
create table t1 (n int);
|
||||||
insert into t1 values (1),(2),(3);
|
insert into t1 values (1),(2),(3);
|
||||||
stop slave;
|
stop slave;
|
||||||
change master to master_log_pos=206;
|
change master to master_log_pos=MASTER_LOG_POS;
|
||||||
start slave;
|
start slave;
|
||||||
select * from t1 ORDER BY n;
|
select * from t1 ORDER BY n;
|
||||||
n
|
n
|
||||||
|
@ -14,47 +14,16 @@ MIXED MIXED
|
|||||||
CREATE TABLE t1 (a INT, b LONG);
|
CREATE TABLE t1 (a INT, b LONG);
|
||||||
INSERT INTO t1 VALUES (1,1), (2,2);
|
INSERT INTO t1 VALUES (1,1), (2,2);
|
||||||
INSERT INTO t1 VALUES (3,UUID()), (4,UUID());
|
INSERT INTO t1 VALUES (3,UUID()), (4,UUID());
|
||||||
SHOW BINLOG EVENTS;
|
show binlog events from <binlog_start>;
|
||||||
**** On Slave ****
|
**** On Slave ****
|
||||||
SHOW SLAVE STATUS;
|
show binlog events from <binlog_start>;
|
||||||
Slave_IO_State #
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
Master_Host 127.0.0.1
|
slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG)
|
||||||
Master_User root
|
slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
|
||||||
Master_Port MASTER_PORT
|
slave-bin.000001 # Query # # BEGIN
|
||||||
Connect_Retry 1
|
slave-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||||
Master_Log_File master-bin.000001
|
slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||||
Read_Master_Log_Pos #
|
slave-bin.000001 # Query # # COMMIT
|
||||||
Relay_Log_File #
|
show binlog events from <binlog_start>;
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno 0
|
|
||||||
Last_IO_Error
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
SHOW BINLOG EVENTS;
|
|
||||||
DROP TABLE IF EXISTS t1;
|
DROP TABLE IF EXISTS t1;
|
||||||
SET GLOBAL BINLOG_FORMAT=@saved_binlog_format;
|
SET GLOBAL BINLOG_FORMAT=@saved_binlog_format;
|
||||||
|
@ -41,12 +41,11 @@ t1
|
|||||||
t2
|
t2
|
||||||
**** On Master ****
|
**** On Master ****
|
||||||
DROP TABLE t1,t2;
|
DROP TABLE t1,t2;
|
||||||
SHOW BINLOG EVENTS;
|
show binlog events from <binlog_start>;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 4 Format_desc 1 106 Server ver: VERSION, Binlog ver: 4
|
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a int)
|
||||||
master-bin.000001 106 Query 1 192 use `test`; CREATE TABLE t1 (a int)
|
master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a int)
|
||||||
master-bin.000001 192 Query 1 278 use `test`; CREATE TABLE t2 (a int)
|
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
|
||||||
master-bin.000001 278 Query 1 382 use `test`; DROP TABLE `t1` /* generated by server */
|
|
||||||
SHOW TABLES;
|
SHOW TABLES;
|
||||||
Tables_in_test
|
Tables_in_test
|
||||||
t2
|
t2
|
||||||
|
@ -17,43 +17,5 @@ a
|
|||||||
0
|
0
|
||||||
drop table t1;
|
drop table t1;
|
||||||
insert into t1 values (1);
|
insert into t1 values (1);
|
||||||
show slave status;
|
Last_SQL_Error = Error 'Table 'test.t1' doesn't exist' on opening tables
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_MYPORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table test.t2
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1146
|
|
||||||
Last_Error Error 'Table 'test.t1' doesn't exist' on opening tables
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno 0
|
|
||||||
Last_IO_Error
|
|
||||||
Last_SQL_Errno 1146
|
|
||||||
Last_SQL_Error Error 'Table 'test.t1' doesn't exist' on opening tables
|
|
||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
|
@ -24,45 +24,7 @@ select @@global.max_relay_log_size;
|
|||||||
@@global.max_relay_log_size
|
@@global.max_relay_log_size
|
||||||
4096
|
4096
|
||||||
start slave;
|
start slave;
|
||||||
SHOW SLAVE STATUS;
|
Checking that both slave threads are running.
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
#
|
#
|
||||||
# Test 2
|
# Test 2
|
||||||
#
|
#
|
||||||
@ -72,45 +34,7 @@ set global max_relay_log_size=(5*4096);
|
|||||||
select @@global.max_relay_log_size;
|
select @@global.max_relay_log_size;
|
||||||
@@global.max_relay_log_size 20480
|
@@global.max_relay_log_size 20480
|
||||||
start slave;
|
start slave;
|
||||||
SHOW SLAVE STATUS;
|
Checking that both slave threads are running.
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
#
|
#
|
||||||
# Test 3: max_relay_log_size = 0
|
# Test 3: max_relay_log_size = 0
|
||||||
#
|
#
|
||||||
@ -120,90 +44,13 @@ set global max_relay_log_size=0;
|
|||||||
select @@global.max_relay_log_size;
|
select @@global.max_relay_log_size;
|
||||||
@@global.max_relay_log_size 0
|
@@global.max_relay_log_size 0
|
||||||
start slave;
|
start slave;
|
||||||
SHOW SLAVE STATUS;
|
Checking that both slave threads are running.
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
#
|
#
|
||||||
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
|
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
|
||||||
#
|
#
|
||||||
stop slave;
|
stop slave;
|
||||||
reset slave;
|
reset slave;
|
||||||
flush logs;
|
flush logs;
|
||||||
SHOW SLAVE STATUS;
|
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File
|
|
||||||
Slave_IO_Running No
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
#
|
#
|
||||||
# Test 5
|
# Test 5
|
||||||
#
|
#
|
||||||
@ -211,89 +58,13 @@ reset slave;
|
|||||||
start slave;
|
start slave;
|
||||||
flush logs;
|
flush logs;
|
||||||
create table t1 (a int);
|
create table t1 (a int);
|
||||||
SHOW SLAVE STATUS;
|
Checking that both slave threads are running.
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
#
|
#
|
||||||
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
|
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
|
||||||
#
|
#
|
||||||
flush logs;
|
flush logs;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
SHOW SLAVE STATUS;
|
Checking that both slave threads are running.
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
flush logs;
|
flush logs;
|
||||||
show master status;
|
show master status;
|
||||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||||
|
@ -4,196 +4,37 @@ reset master;
|
|||||||
reset slave;
|
reset slave;
|
||||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
start slave;
|
start slave;
|
||||||
SHOW SLAVE STATUS;
|
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
Master_User root
|
||||||
Master_Port MASTER_PORT
|
Master_Host 127.0.0.1
|
||||||
Connect_Retry 1
|
include/stop_slave.inc
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
stop slave;
|
|
||||||
change master to master_user='test';
|
change master to master_user='test';
|
||||||
SHOW SLAVE STATUS;
|
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User test
|
Master_User test
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running No
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
reset slave;
|
|
||||||
SHOW SLAVE STATUS;
|
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
Master_Host 127.0.0.1
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File
|
|
||||||
Slave_IO_Running No
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
start slave;
|
|
||||||
SHOW SLAVE STATUS;
|
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
stop slave;
|
|
||||||
reset slave;
|
reset slave;
|
||||||
start slave;
|
Master_User root
|
||||||
|
Master_Host 127.0.0.1
|
||||||
|
include/start_slave.inc
|
||||||
|
Master_User root
|
||||||
|
Master_Host 127.0.0.1
|
||||||
|
include/stop_slave.inc
|
||||||
|
reset slave;
|
||||||
|
include/start_slave.inc
|
||||||
create temporary table t1 (a int);
|
create temporary table t1 (a int);
|
||||||
stop slave;
|
include/stop_slave.inc
|
||||||
reset slave;
|
reset slave;
|
||||||
start slave;
|
include/start_slave.inc
|
||||||
show status like 'slave_open_temp_tables';
|
show status like 'slave_open_temp_tables';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Slave_open_temp_tables 0
|
Slave_open_temp_tables 0
|
||||||
stop slave;
|
include/stop_slave.inc
|
||||||
reset slave;
|
reset slave;
|
||||||
*** errno must be zero: 0 ***
|
|
||||||
change master to master_user='impossible_user_name';
|
change master to master_user='impossible_user_name';
|
||||||
start slave;
|
start slave;
|
||||||
ONE
|
|
||||||
1
|
|
||||||
include/stop_slave.inc
|
include/stop_slave.inc
|
||||||
change master to master_user='root';
|
change master to master_user='root';
|
||||||
include/start_slave.inc
|
include/start_slave.inc
|
||||||
*** last errno must be zero: 0 ***
|
|
||||||
*** last error must be blank: ***
|
|
||||||
include/stop_slave.inc
|
include/stop_slave.inc
|
||||||
change master to master_user='impossible_user_name';
|
change master to master_user='impossible_user_name';
|
||||||
start slave;
|
start slave;
|
||||||
ONE
|
|
||||||
1
|
|
||||||
include/stop_slave.inc
|
include/stop_slave.inc
|
||||||
reset slave;
|
reset slave;
|
||||||
*** io last errno must be zero: 0 ***
|
|
||||||
*** io last error must be blank: ***
|
|
||||||
*** sql last errno must be zero: 0 ***
|
|
||||||
*** sql last error must be blank: ***
|
|
||||||
|
@ -12,193 +12,39 @@ create table t2(n int not null auto_increment primary key);
|
|||||||
insert into t2 values (1),(2);
|
insert into t2 values (1),(2);
|
||||||
insert into t2 values (3),(4);
|
insert into t2 values (3),(4);
|
||||||
drop table t2;
|
drop table t2;
|
||||||
start slave until master_log_file='master-bin.000001', master_log_pos=311;
|
start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_LOG_POS;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
n
|
n
|
||||||
1
|
1
|
||||||
2
|
2
|
||||||
3
|
3
|
||||||
4
|
4
|
||||||
show slave status;
|
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=MASTER_LOG_POS;
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_MYPORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File slave-relay-bin.000004
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running #
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition Master
|
|
||||||
Until_Log_File master-bin.000001
|
|
||||||
Until_Log_Pos 311
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno 0
|
|
||||||
Last_IO_Error
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
|
|
||||||
select * from t1;
|
select * from t1;
|
||||||
n 1
|
n
|
||||||
n 2
|
1
|
||||||
n 3
|
2
|
||||||
n 4
|
3
|
||||||
show slave status;
|
4
|
||||||
Slave_IO_State #
|
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=RELAY_LOG_POS;
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_MYPORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File slave-relay-bin.000004
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running #
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition Master
|
|
||||||
Until_Log_File master-no-such-bin.000001
|
|
||||||
Until_Log_Pos 291
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno 0
|
|
||||||
Last_IO_Error
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728;
|
|
||||||
select * from t2;
|
select * from t2;
|
||||||
show slave status;
|
n
|
||||||
Slave_IO_State #
|
1
|
||||||
Master_Host 127.0.0.1
|
2
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_MYPORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File slave-relay-bin.000004
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running #
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition Relay
|
|
||||||
Until_Log_File slave-relay-bin.000004
|
|
||||||
Until_Log_Pos 728
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno 0
|
|
||||||
Last_IO_Error
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
start slave;
|
start slave;
|
||||||
stop slave;
|
stop slave;
|
||||||
start slave until master_log_file='master-bin.000001', master_log_pos=740;
|
start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_LOG_POS;
|
||||||
show slave status;
|
start slave until master_log_file='master-bin', master_log_pos=MASTER_LOG_POS;
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_MYPORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File slave-relay-bin.000004
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition Master
|
|
||||||
Until_Log_File master-bin.000001
|
|
||||||
Until_Log_Pos 740
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno 0
|
|
||||||
Last_IO_Error
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
start slave until master_log_file='master-bin', master_log_pos=561;
|
|
||||||
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
|
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
|
||||||
start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;
|
start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_LOG_POS, relay_log_pos=RELAY_LOG_POS;
|
||||||
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
|
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
|
||||||
start slave until master_log_file='master-bin.000001';
|
start slave until master_log_file='master-bin.000001';
|
||||||
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
|
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
|
||||||
start slave until relay_log_file='slave-relay-bin.000002';
|
start slave until relay_log_file='slave-relay-bin.000002';
|
||||||
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
|
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
|
||||||
start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561;
|
start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=MASTER_LOG_POS;
|
||||||
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
|
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
|
||||||
start slave sql_thread;
|
start slave sql_thread;
|
||||||
start slave until master_log_file='master-bin.000001', master_log_pos=740;
|
start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_LOG_POS;
|
||||||
Warnings:
|
Warnings:
|
||||||
Level Note
|
Note 1254 Slave is already running
|
||||||
Code 1254
|
|
||||||
Message Slave is already running
|
|
||||||
|
@ -8,10 +8,8 @@ create table t1 (n int);
|
|||||||
reset master;
|
reset master;
|
||||||
stop slave;
|
stop slave;
|
||||||
change master to master_port=SLAVE_PORT;
|
change master to master_port=SLAVE_PORT;
|
||||||
show slave status;
|
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
|
|
||||||
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # # 0 0 0 106 None 0 No NULL No 0 0
|
|
||||||
start slave;
|
start slave;
|
||||||
|
Last_IO_Error = Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it).
|
||||||
insert into t1 values (1);
|
insert into t1 values (1);
|
||||||
show status like "slave_running";
|
show status like "slave_running";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
|
@ -8,9 +8,6 @@ create table t1 (n int);
|
|||||||
reset master;
|
reset master;
|
||||||
stop slave;
|
stop slave;
|
||||||
change master to master_port=SLAVE_PORT;
|
change master to master_port=SLAVE_PORT;
|
||||||
show slave status;
|
|
||||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
|
|
||||||
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 106 None 0 No NULL No 0 0
|
|
||||||
start slave;
|
start slave;
|
||||||
insert into t1 values (1);
|
insert into t1 values (1);
|
||||||
select * from t1;
|
select * from t1;
|
||||||
|
@ -18,44 +18,5 @@ drop user rpl@127.0.0.1;
|
|||||||
flush privileges;
|
flush privileges;
|
||||||
stop slave;
|
stop slave;
|
||||||
start slave;
|
start slave;
|
||||||
show slave status;
|
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User rpl
|
|
||||||
Master_Port MASTER_MYPORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running No
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master NULL
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
drop table t1;
|
drop table t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
@ -21,45 +21,7 @@ select @@global.max_relay_log_size;
|
|||||||
@@global.max_relay_log_size
|
@@global.max_relay_log_size
|
||||||
4096
|
4096
|
||||||
start slave;
|
start slave;
|
||||||
SHOW SLAVE STATUS;
|
Checking that both slave threads are running.
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
#
|
#
|
||||||
# Test 2
|
# Test 2
|
||||||
#
|
#
|
||||||
@ -69,45 +31,7 @@ set global max_relay_log_size=(5*4096);
|
|||||||
select @@global.max_relay_log_size;
|
select @@global.max_relay_log_size;
|
||||||
@@global.max_relay_log_size 20480
|
@@global.max_relay_log_size 20480
|
||||||
start slave;
|
start slave;
|
||||||
SHOW SLAVE STATUS;
|
Checking that both slave threads are running.
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
#
|
#
|
||||||
# Test 3: max_relay_log_size = 0
|
# Test 3: max_relay_log_size = 0
|
||||||
#
|
#
|
||||||
@ -117,90 +41,13 @@ set global max_relay_log_size=0;
|
|||||||
select @@global.max_relay_log_size;
|
select @@global.max_relay_log_size;
|
||||||
@@global.max_relay_log_size 0
|
@@global.max_relay_log_size 0
|
||||||
start slave;
|
start slave;
|
||||||
SHOW SLAVE STATUS;
|
Checking that both slave threads are running.
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
#
|
#
|
||||||
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
|
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
|
||||||
#
|
#
|
||||||
stop slave;
|
stop slave;
|
||||||
reset slave;
|
reset slave;
|
||||||
flush logs;
|
flush logs;
|
||||||
SHOW SLAVE STATUS;
|
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File
|
|
||||||
Slave_IO_Running No
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
#
|
#
|
||||||
# Test 5
|
# Test 5
|
||||||
#
|
#
|
||||||
@ -208,89 +55,13 @@ reset slave;
|
|||||||
start slave;
|
start slave;
|
||||||
flush logs;
|
flush logs;
|
||||||
create table t1 (a int);
|
create table t1 (a int);
|
||||||
SHOW SLAVE STATUS;
|
Checking that both slave threads are running.
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
#
|
#
|
||||||
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
|
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
|
||||||
#
|
#
|
||||||
flush logs;
|
flush logs;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
SHOW SLAVE STATUS;
|
Checking that both slave threads are running.
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
flush logs;
|
flush logs;
|
||||||
show master status;
|
show master status;
|
||||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||||
|
@ -4,196 +4,37 @@ reset master;
|
|||||||
reset slave;
|
reset slave;
|
||||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
start slave;
|
start slave;
|
||||||
SHOW SLAVE STATUS;
|
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
Master_User root
|
||||||
Master_Port MASTER_PORT
|
Master_Host 127.0.0.1
|
||||||
Connect_Retry 1
|
include/stop_slave.inc
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
stop slave;
|
|
||||||
change master to master_user='test';
|
change master to master_user='test';
|
||||||
SHOW SLAVE STATUS;
|
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User test
|
Master_User test
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running No
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
reset slave;
|
|
||||||
SHOW SLAVE STATUS;
|
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
Master_Host 127.0.0.1
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File
|
|
||||||
Slave_IO_Running No
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
start slave;
|
|
||||||
SHOW SLAVE STATUS;
|
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
stop slave;
|
|
||||||
reset slave;
|
reset slave;
|
||||||
start slave;
|
Master_User root
|
||||||
|
Master_Host 127.0.0.1
|
||||||
|
include/start_slave.inc
|
||||||
|
Master_User root
|
||||||
|
Master_Host 127.0.0.1
|
||||||
|
include/stop_slave.inc
|
||||||
|
reset slave;
|
||||||
|
include/start_slave.inc
|
||||||
create temporary table t1 (a int);
|
create temporary table t1 (a int);
|
||||||
stop slave;
|
include/stop_slave.inc
|
||||||
reset slave;
|
reset slave;
|
||||||
start slave;
|
include/start_slave.inc
|
||||||
show status like 'slave_open_temp_tables';
|
show status like 'slave_open_temp_tables';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Slave_open_temp_tables 1
|
Slave_open_temp_tables 1
|
||||||
stop slave;
|
include/stop_slave.inc
|
||||||
reset slave;
|
reset slave;
|
||||||
*** errno must be zero: 0 ***
|
|
||||||
change master to master_user='impossible_user_name';
|
change master to master_user='impossible_user_name';
|
||||||
start slave;
|
start slave;
|
||||||
ONE
|
|
||||||
1
|
|
||||||
include/stop_slave.inc
|
include/stop_slave.inc
|
||||||
change master to master_user='root';
|
change master to master_user='root';
|
||||||
include/start_slave.inc
|
include/start_slave.inc
|
||||||
*** last errno must be zero: 0 ***
|
|
||||||
*** last error must be blank: ***
|
|
||||||
include/stop_slave.inc
|
include/stop_slave.inc
|
||||||
change master to master_user='impossible_user_name';
|
change master to master_user='impossible_user_name';
|
||||||
start slave;
|
start slave;
|
||||||
ONE
|
|
||||||
1
|
|
||||||
include/stop_slave.inc
|
include/stop_slave.inc
|
||||||
reset slave;
|
reset slave;
|
||||||
*** io last errno must be zero: 0 ***
|
|
||||||
*** io last error must be blank: ***
|
|
||||||
*** sql last errno must be zero: 0 ***
|
|
||||||
*** sql last error must be blank: ***
|
|
||||||
|
@ -376,7 +376,7 @@ CREATE TABLE t12 (data LONG);
|
|||||||
LOCK TABLES t12 WRITE;
|
LOCK TABLES t12 WRITE;
|
||||||
INSERT INTO t12 VALUES(UUID());
|
INSERT INTO t12 VALUES(UUID());
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
show binlog events;
|
show binlog events from <binlog_start>;
|
||||||
show binlog events;
|
show binlog events from <binlog_start>;
|
||||||
drop database mysqltest1;
|
drop database mysqltest1;
|
||||||
set global binlog_format= @saved_binlog_format;
|
set global binlog_format= @saved_binlog_format;
|
||||||
|
@ -11,31 +11,25 @@ save_master_pos;
|
|||||||
connection slave;
|
connection slave;
|
||||||
stop slave;
|
stop slave;
|
||||||
reset slave;
|
reset slave;
|
||||||
--vertical_results
|
let $status_items= Master_Log_File, Read_Master_Log_Pos, Relay_Master_Log_File, Exec_Master_Log_Pos;
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
source include/show_slave_status.inc;
|
||||||
--replace_column 1 # 5 # 8 # 9 # 23 # 33 #
|
|
||||||
show slave status;
|
|
||||||
|
|
||||||
change master to master_host='127.0.0.1';
|
change master to master_host='127.0.0.1';
|
||||||
# The following needs to be cleaned up when change master is fixed
|
# The following needs to be cleaned up when change master is fixed
|
||||||
--vertical_results
|
source include/show_slave_status.inc;
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
|
||||||
--replace_column 1 # 5 # 8 # 9 # 23 # 33 #
|
|
||||||
show slave status;
|
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||||
eval change master to master_host='127.0.0.1',master_user='root',
|
eval change master to master_host='127.0.0.1',master_user='root',
|
||||||
master_password='',master_port=$MASTER_MYPORT;
|
master_password='',master_port=$MASTER_MYPORT;
|
||||||
--vertical_results
|
source include/show_slave_status.inc;
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
|
||||||
--replace_column 1 # 5 # 8 # 9 # 23 # 33 #
|
|
||||||
show slave status;
|
|
||||||
start slave;
|
start slave;
|
||||||
sync_with_master;
|
sync_with_master;
|
||||||
|
let $status_items= Master_Log_File, Relay_Master_Log_File;
|
||||||
|
source include/show_slave_status.inc;
|
||||||
|
source include/check_slave_is_running.inc;
|
||||||
|
|
||||||
--vertical_results
|
--vertical_results
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
|
||||||
--replace_column 1 # 5 # 8 # 9 # 23 # 33 #
|
|
||||||
--replace_column 33 #
|
|
||||||
show slave status;
|
|
||||||
connection master;
|
connection master;
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
|
@ -7,15 +7,11 @@ source include/master-slave.inc;
|
|||||||
--disable_ps_protocol
|
--disable_ps_protocol
|
||||||
|
|
||||||
#first, make sure the slave has had enough time to register
|
#first, make sure the slave has had enough time to register
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
|
||||||
sync_with_master;
|
|
||||||
|
|
||||||
#discover slaves
|
#discover slaves
|
||||||
connection master;
|
connection master;
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--query_vertical SHOW SLAVE STATUS;
|
||||||
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
|
|
||||||
SHOW SLAVE STATUS;
|
|
||||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||||
SHOW SLAVE HOSTS;
|
SHOW SLAVE HOSTS;
|
||||||
rpl_probe;
|
rpl_probe;
|
||||||
@ -25,9 +21,7 @@ enable_rpl_parse;
|
|||||||
create table t1 ( n int);
|
create table t1 ( n int);
|
||||||
insert into t1 values (1),(2),(3),(4);
|
insert into t1 values (1),(2),(3),(4);
|
||||||
disable_rpl_parse;
|
disable_rpl_parse;
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
|
||||||
sync_with_master;
|
|
||||||
insert into t1 values(5);
|
insert into t1 values(5);
|
||||||
connection master;
|
connection master;
|
||||||
enable_rpl_parse;
|
enable_rpl_parse;
|
||||||
|
@ -18,13 +18,26 @@ save_master_pos;
|
|||||||
connection slave;
|
connection slave;
|
||||||
--real_sleep 3 # wait for I/O thread to have read updates
|
--real_sleep 3 # wait for I/O thread to have read updates
|
||||||
stop slave;
|
stop slave;
|
||||||
--replace_result $MASTER_MYPORT MASTER_MYPORT
|
source include/wait_for_slave_to_stop.inc;
|
||||||
--replace_column 1 # 7 # 8 # 9 # 23 # 33 #
|
|
||||||
show slave status;
|
let $read_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1);
|
||||||
|
let $exec_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
|
||||||
|
if (`SELECT $read_pos = $exec_pos`)
|
||||||
|
{
|
||||||
|
source include/show_rpl_debug_info.inc;
|
||||||
|
echo 'Read_Master_Log_Pos: $read_pos' == 'Exec_Master_Log_Pos: $exec_pos';
|
||||||
|
die Failed because Read_Master_Log_Pos is equal to Exec_Master_Log_Pos;
|
||||||
|
}
|
||||||
change master to master_user='root';
|
change master to master_user='root';
|
||||||
--replace_result $MASTER_MYPORT MASTER_MYPORT
|
let $read_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1);
|
||||||
--replace_column 1 # 7 # 8 # 9 # 23 # 33 #
|
let $exec_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
|
||||||
show slave status;
|
if (`SELECT $read_pos <> $exec_pos`)
|
||||||
|
{
|
||||||
|
source include/show_rpl_debug_info.inc;
|
||||||
|
echo 'Read_Master_Log_Pos: $read_pos' <> 'Exec_Master_Log_Pos: $exec_pos';
|
||||||
|
die Failed because Read_Master_Log_Pos is not equal to Exec_Master_Log_Pos;
|
||||||
|
}
|
||||||
|
|
||||||
start slave;
|
start slave;
|
||||||
sync_with_master;
|
sync_with_master;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
source include/master-slave.inc;
|
source include/master-slave.inc;
|
||||||
|
|
||||||
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
|
|
||||||
show slave status;
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Load table should not succeed on the master as this is not a slave
|
# Load table should not succeed on the master as this is not a slave
|
||||||
#
|
#
|
||||||
|
@ -41,8 +41,7 @@ sleep 5;
|
|||||||
#
|
#
|
||||||
# Show status of slave
|
# Show status of slave
|
||||||
#
|
#
|
||||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
--let status_items= Relay_Log_File
|
||||||
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
|
--source include/show_slave_status.inc
|
||||||
--vertical_results
|
--source include/check_slave_is_running.inc
|
||||||
SHOW SLAVE STATUS;
|
|
||||||
STOP SLAVE;
|
STOP SLAVE;
|
||||||
|
@ -20,9 +20,7 @@ save_master_pos;
|
|||||||
connection slave;
|
connection slave;
|
||||||
sync_with_master;
|
sync_with_master;
|
||||||
select count(*) from test.t1; # check that LOAD was replicated
|
select count(*) from test.t1; # check that LOAD was replicated
|
||||||
--replace_column 2 # 5 #
|
source include/show_binlog_events.inc;
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
|
||||||
show binlog events from 106; # should be nothing
|
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
connection master;
|
connection master;
|
||||||
|
@ -11,36 +11,41 @@
|
|||||||
# Passes with rbr no problem, removed statement include [jbm]
|
# Passes with rbr no problem, removed statement include [jbm]
|
||||||
|
|
||||||
source include/master-slave.inc;
|
source include/master-slave.inc;
|
||||||
--replace_column 3 <Binlog_Ignore_DB>
|
let $master_log_pos= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||||
show master status;
|
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
|
||||||
--replace_column 1 # 8 # 9 # 23 # 33 #
|
|
||||||
show slave status;
|
|
||||||
stop slave;
|
stop slave;
|
||||||
change master to master_log_pos=106;
|
|
||||||
|
--replace_result $master_log_pos MASTER_LOG_POS
|
||||||
|
eval change master to master_log_pos=$master_log_pos;
|
||||||
start slave;
|
start slave;
|
||||||
sleep 5;
|
sleep 5;
|
||||||
stop slave;
|
stop slave;
|
||||||
change master to master_log_pos=106;
|
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--replace_result $master_log_pos MASTER_LOG_POS
|
||||||
--replace_column 1 # 8 # 9 # 23 # 33 #
|
eval change master to master_log_pos=$master_log_pos;
|
||||||
show slave status;
|
--let $slave_param= Read_Master_Log_Pos
|
||||||
|
--let $slave_param_value= $master_log_pos
|
||||||
|
--source include/wait_for_slave_param.inc
|
||||||
|
|
||||||
start slave;
|
start slave;
|
||||||
sleep 5;
|
sleep 5;
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
--let $slave_param= Read_Master_Log_Pos
|
||||||
--replace_column 1 # 8 # 9 # 23 # 33 #
|
--let $slave_param_value= $master_log_pos
|
||||||
show slave status;
|
--source include/wait_for_slave_param.inc
|
||||||
|
--source include/check_slave_no_error.inc
|
||||||
|
|
||||||
stop slave;
|
stop slave;
|
||||||
|
--echo # impossible position leads to an error
|
||||||
|
--replace_result 177 MASTER_LOG_POS
|
||||||
change master to master_log_pos=177;
|
change master to master_log_pos=177;
|
||||||
start slave;
|
start slave;
|
||||||
sleep 2;
|
sleep 2;
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
let $slave_io_errno= 1236;
|
||||||
--replace_column 1 # 8 # 9 # 23 # 33 #
|
let $show_slave_io_error= 1;
|
||||||
show slave status;
|
source include/wait_for_slave_io_error.inc;
|
||||||
connection master;
|
connection master;
|
||||||
--replace_column 3 <Binlog_Ignore_DB>
|
|
||||||
show master status;
|
let $master_log_pos= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||||
create table if not exists t1 (n int);
|
create table if not exists t1 (n int);
|
||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
create table t1 (n int);
|
create table t1 (n int);
|
||||||
@ -48,7 +53,9 @@ insert into t1 values (1),(2),(3);
|
|||||||
save_master_pos;
|
save_master_pos;
|
||||||
connection slave;
|
connection slave;
|
||||||
stop slave;
|
stop slave;
|
||||||
change master to master_log_pos=206;
|
|
||||||
|
--replace_result $master_log_pos MASTER_LOG_POS
|
||||||
|
eval change master to master_log_pos=$master_log_pos;
|
||||||
start slave;
|
start slave;
|
||||||
sync_with_master;
|
sync_with_master;
|
||||||
select * from t1 ORDER BY n;
|
select * from t1 ORDER BY n;
|
||||||
|
@ -15,25 +15,17 @@ SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT;
|
|||||||
CREATE TABLE t1 (a INT, b LONG);
|
CREATE TABLE t1 (a INT, b LONG);
|
||||||
INSERT INTO t1 VALUES (1,1), (2,2);
|
INSERT INTO t1 VALUES (1,1), (2,2);
|
||||||
INSERT INTO t1 VALUES (3,UUID()), (4,UUID());
|
INSERT INTO t1 VALUES (3,UUID()), (4,UUID());
|
||||||
let $VERSION=`select version()`;
|
|
||||||
--replace_result $VERSION VERSION
|
|
||||||
--replace_column 2 # 5 #
|
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
|
||||||
# Different number of binlog events are generated by different engines
|
# Different number of binlog events are generated by different engines
|
||||||
--disable_result_log
|
--disable_result_log
|
||||||
SHOW BINLOG EVENTS;
|
source include/show_binlog_events.inc;
|
||||||
--enable_result_log
|
--enable_result_log
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
--echo **** On Slave ****
|
--echo **** On Slave ****
|
||||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
source include/show_binlog_events.inc;
|
||||||
--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 #
|
|
||||||
--query_vertical SHOW SLAVE STATUS
|
|
||||||
--replace_result $VERSION VERSION
|
|
||||||
--replace_column 2 # 5 #
|
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
|
||||||
# Different number of binlog events are generated by different engines
|
# Different number of binlog events are generated by different engines
|
||||||
--disable_result_log
|
--disable_result_log
|
||||||
SHOW BINLOG EVENTS;
|
source include/show_binlog_events.inc;
|
||||||
--enable_result_log
|
--enable_result_log
|
||||||
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql
|
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql
|
||||||
--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql
|
--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql
|
||||||
|
@ -30,10 +30,7 @@ connection master;
|
|||||||
--echo **** On Master ****
|
--echo **** On Master ****
|
||||||
# Should drop the non-temporary table t1 and the temporary table t2
|
# Should drop the non-temporary table t1 and the temporary table t2
|
||||||
DROP TABLE t1,t2;
|
DROP TABLE t1,t2;
|
||||||
let $VERSION=`select version()`;
|
source include/show_binlog_events.inc;
|
||||||
--replace_result $VERSION VERSION
|
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
|
||||||
SHOW BINLOG EVENTS;
|
|
||||||
SHOW TABLES;
|
SHOW TABLES;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
--echo **** On Slave ****
|
--echo **** On Slave ****
|
||||||
|
@ -23,12 +23,10 @@ insert into t1 values (1);
|
|||||||
|
|
||||||
connection slave;
|
connection slave;
|
||||||
# slave should have stopped because can't find table t1
|
# slave should have stopped because can't find table t1
|
||||||
wait_for_slave_to_stop;
|
|
||||||
# see if we have a good error message:
|
# see if we have a good error message:
|
||||||
--replace_result $MASTER_MYPORT MASTER_MYPORT
|
--let $slave_sql_errno= 1146
|
||||||
--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 #
|
--let $show_slave_sql_error= 1
|
||||||
--vertical_results
|
--source include/wait_for_slave_sql_error.inc
|
||||||
show slave status;
|
|
||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
connection master;
|
connection master;
|
||||||
|
@ -18,44 +18,50 @@ connection master;
|
|||||||
# create some events on master
|
# create some events on master
|
||||||
create table t1(n int not null auto_increment primary key);
|
create table t1(n int not null auto_increment primary key);
|
||||||
insert into t1 values (1),(2),(3),(4);
|
insert into t1 values (1),(2),(3),(4);
|
||||||
|
let $master_log_pos_1= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
create table t2(n int not null auto_increment primary key);
|
create table t2(n int not null auto_increment primary key);
|
||||||
insert into t2 values (1),(2);
|
insert into t2 values (1),(2);
|
||||||
|
let $master_log_pos_2= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||||
insert into t2 values (3),(4);
|
insert into t2 values (3),(4);
|
||||||
drop table t2;
|
drop table t2;
|
||||||
|
|
||||||
# try to replicate all queries until drop of t1
|
# try to replicate all queries until drop of t1
|
||||||
connection slave;
|
connection slave;
|
||||||
start slave until master_log_file='master-bin.000001', master_log_pos=311;
|
--replace_result $master_log_pos_1 MASTER_LOG_POS
|
||||||
|
eval start slave until master_log_file='master-bin.000001', master_log_pos=$master_log_pos_1;
|
||||||
sleep 2;
|
sleep 2;
|
||||||
wait_for_slave_to_stop;
|
wait_for_slave_to_stop;
|
||||||
# here table should be still not deleted
|
# here table should be still not deleted
|
||||||
select * from t1;
|
select * from t1;
|
||||||
--vertical_results
|
--let $slave_param= Exec_Master_Log_Pos
|
||||||
--replace_result $MASTER_MYPORT MASTER_MYPORT
|
--let $slave_param_value= $master_log_pos_1
|
||||||
--replace_column 1 # 7 # 9 # 11 # 22 # 23 # 33 #
|
--source include/check_slave_param.inc
|
||||||
show slave status;
|
|
||||||
|
|
||||||
# this should fail right after start
|
# this should fail right after start
|
||||||
|
--replace_result 291 MASTER_LOG_POS
|
||||||
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
|
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
|
||||||
# again this table should be still not deleted
|
# again this table should be still not deleted
|
||||||
select * from t1;
|
select * from t1;
|
||||||
sleep 2;
|
sleep 2;
|
||||||
wait_for_slave_to_stop;
|
wait_for_slave_to_stop;
|
||||||
--vertical_results
|
--let $slave_param= Exec_Master_Log_Pos
|
||||||
--replace_result $MASTER_MYPORT MASTER_MYPORT
|
--let $slave_param_value= $master_log_pos_1
|
||||||
--replace_column 1 # 7 # 9 # 11 # 22 # 23 # 33 #
|
--source include/check_slave_param.inc
|
||||||
show slave status;
|
|
||||||
|
|
||||||
# try replicate all up to and not including the second insert to t2;
|
# try replicate all up to and not including the second insert to t2;
|
||||||
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728;
|
let $master_log_pos= $master_log_pos_2;
|
||||||
|
let $relay_log_file= slave-relay-bin.000004;
|
||||||
|
--source include/get_relay_log_pos.inc
|
||||||
|
--replace_result $relay_log_pos RELAY_LOG_POS
|
||||||
|
eval start slave until relay_log_file='$relay_log_file', relay_log_pos=$relay_log_pos;
|
||||||
sleep 2;
|
sleep 2;
|
||||||
wait_for_slave_to_stop;
|
wait_for_slave_to_stop;
|
||||||
select * from t2;
|
select * from t2;
|
||||||
--vertical_results
|
--let $slave_param= Exec_Master_Log_Pos
|
||||||
--replace_result $MASTER_MYPORT MASTER_MYPORT
|
--let $slave_param_value= $master_log_pos
|
||||||
--replace_column 1 # 7 # 9 # 11 # 22 # 23 # 33 #
|
--source include/check_slave_param.inc
|
||||||
show slave status;
|
|
||||||
|
|
||||||
# clean up
|
# clean up
|
||||||
start slave;
|
start slave;
|
||||||
@ -65,27 +71,32 @@ connection slave;
|
|||||||
sync_with_master;
|
sync_with_master;
|
||||||
stop slave;
|
stop slave;
|
||||||
|
|
||||||
|
--let $exec_log_pos_1= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1)
|
||||||
# this should stop immediately as we are already there
|
# this should stop immediately as we are already there
|
||||||
start slave until master_log_file='master-bin.000001', master_log_pos=740;
|
--replace_result $master_log_pos_2 MASTER_LOG_POS
|
||||||
|
eval start slave until master_log_file='master-bin.000001', master_log_pos=$master_log_pos_2;
|
||||||
sleep 2;
|
sleep 2;
|
||||||
wait_for_slave_to_stop;
|
wait_for_slave_to_stop;
|
||||||
# here the sql slave thread should be stopped
|
# here the sql slave thread should be stopped
|
||||||
--vertical_results
|
--let $slave_param= Exec_Master_Log_Pos
|
||||||
--replace_result $MASTER_MYPORT MASTER_MYPORT bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004
|
--let $slave_param_value= $exec_log_pos_1
|
||||||
--replace_column 1 # 7 # 9 # 22 # 23 # 33 #
|
--source include/check_slave_param.inc
|
||||||
show slave status;
|
|
||||||
|
|
||||||
#testing various error conditions
|
#testing various error conditions
|
||||||
|
--replace_result 561 MASTER_LOG_POS
|
||||||
--error 1277
|
--error 1277
|
||||||
start slave until master_log_file='master-bin', master_log_pos=561;
|
start slave until master_log_file='master-bin', master_log_pos=561;
|
||||||
|
--replace_result 561 MASTER_LOG_POS 12 RELAY_LOG_POS
|
||||||
--error 1277
|
--error 1277
|
||||||
start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;
|
start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;
|
||||||
--error 1277
|
--error 1277
|
||||||
start slave until master_log_file='master-bin.000001';
|
start slave until master_log_file='master-bin.000001';
|
||||||
--error 1277
|
--error 1277
|
||||||
start slave until relay_log_file='slave-relay-bin.000002';
|
start slave until relay_log_file='slave-relay-bin.000002';
|
||||||
|
--replace_result 561 MASTER_LOG_POS
|
||||||
--error 1277
|
--error 1277
|
||||||
start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561;
|
start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561;
|
||||||
# Warning should be given for second command
|
# Warning should be given for second command
|
||||||
start slave sql_thread;
|
start slave sql_thread;
|
||||||
|
--replace_result 740 MASTER_LOG_POS
|
||||||
start slave until master_log_file='master-bin.000001', master_log_pos=740;
|
start slave until master_log_file='master-bin.000001', master_log_pos=740;
|
||||||
|
@ -12,10 +12,13 @@ reset master;
|
|||||||
stop slave;
|
stop slave;
|
||||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||||
eval change master to master_port=$SLAVE_MYPORT;
|
eval change master to master_port=$SLAVE_MYPORT;
|
||||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
source include/check_slave_no_error.inc;
|
||||||
--replace_column 16 # 18 #
|
|
||||||
show slave status;
|
|
||||||
start slave;
|
start slave;
|
||||||
|
let $slave_io_errno= 1593;
|
||||||
|
let $show_slave_io_error= 1;
|
||||||
|
source include/wait_for_slave_io_error.inc;
|
||||||
|
|
||||||
insert into t1 values (1);
|
insert into t1 values (1);
|
||||||
# can't MASTER_POS_WAIT(), it does not work in this weird setup
|
# can't MASTER_POS_WAIT(), it does not work in this weird setup
|
||||||
# (when slave is its own master without --replicate-same-server-id)
|
# (when slave is its own master without --replicate-same-server-id)
|
||||||
|
@ -9,9 +9,6 @@ reset master;
|
|||||||
stop slave;
|
stop slave;
|
||||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||||
eval change master to master_port=$SLAVE_MYPORT;
|
eval change master to master_port=$SLAVE_MYPORT;
|
||||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
|
||||||
--replace_column 18 #
|
|
||||||
show slave status;
|
|
||||||
start slave;
|
start slave;
|
||||||
insert into t1 values (1);
|
insert into t1 values (1);
|
||||||
save_master_pos;
|
save_master_pos;
|
||||||
|
@ -22,9 +22,7 @@ drop table if exists t1;
|
|||||||
--enable_warnings
|
--enable_warnings
|
||||||
create table t1 (n int);
|
create table t1 (n int);
|
||||||
insert into t1 values (1);
|
insert into t1 values (1);
|
||||||
save_master_pos;
|
sync_slave_with_master;
|
||||||
connection slave;
|
|
||||||
sync_with_master;
|
|
||||||
select * from t1;
|
select * from t1;
|
||||||
|
|
||||||
# 3. Delete new replication user
|
# 3. Delete new replication user
|
||||||
@ -40,12 +38,8 @@ stop slave;
|
|||||||
start slave;
|
start slave;
|
||||||
|
|
||||||
# 5. Make sure Slave_IO_Running = No
|
# 5. Make sure Slave_IO_Running = No
|
||||||
--replace_result $MASTER_MYPORT MASTER_MYPORT
|
let $slave_io_errno= 1045;
|
||||||
# Column 1 is replaced, since the output can be either
|
source include/wait_for_slave_io_error.inc;
|
||||||
# "Connecting to master" or "Waiting for master update"
|
|
||||||
--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 35 # 36 #
|
|
||||||
--vertical_results
|
|
||||||
show slave status;
|
|
||||||
|
|
||||||
# Cleanup (Note that slave IO thread is not running)
|
# Cleanup (Note that slave IO thread is not running)
|
||||||
connection slave;
|
connection slave;
|
||||||
|
@ -501,9 +501,7 @@ INSERT INTO t12 VALUES(UUID());
|
|||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--disable_result_log
|
--disable_result_log
|
||||||
--replace_column 2 # 5 #
|
source include/show_binlog_events.inc;
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
|
||||||
show binlog events;
|
|
||||||
--enable_result_log
|
--enable_result_log
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
@ -520,9 +518,7 @@ diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_
|
|||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
--disable_result_log
|
--disable_result_log
|
||||||
--replace_column 2 # 5 #
|
source include/show_binlog_events.inc;
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
|
||||||
show binlog events;
|
|
||||||
--enable_result_log
|
--enable_result_log
|
||||||
|
|
||||||
# Now test that mysqlbinlog works fine on a binlog generated by the
|
# Now test that mysqlbinlog works fine on a binlog generated by the
|
||||||
|
@ -4,45 +4,8 @@ reset master;
|
|||||||
reset slave;
|
reset slave;
|
||||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
start slave;
|
start slave;
|
||||||
show slave status /* Second_behind reports 0 */;;
|
# Second_behind reports 0
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port 9306
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos 106
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos 106
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master 0
|
Seconds_Behind_Master 0
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno 0
|
|
||||||
Last_IO_Error
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1051 Unknown table 't1'
|
Note 1051 Unknown table 't1'
|
||||||
@ -50,87 +13,13 @@ create table t1 (f1 int);
|
|||||||
flush logs /* contaminate rli->last_master_timestamp */;
|
flush logs /* contaminate rli->last_master_timestamp */;
|
||||||
lock table t1 write;
|
lock table t1 write;
|
||||||
insert into t1 values (1);
|
insert into t1 values (1);
|
||||||
show slave status /* bug emulated: reports slave threads starting time about 3*3 not 3 secs */;;
|
# bug emulated: reports slave threads starting time about 3*3 not 3 secs
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port 9306
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos 367
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos 279
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master 9
|
Seconds_Behind_Master 9
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno 0
|
|
||||||
Last_IO_Error
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
unlock tables;
|
unlock tables;
|
||||||
flush logs /* this time rli->last_master_timestamp is not affected */;
|
flush logs /* this time rli->last_master_timestamp is not affected */;
|
||||||
lock table t1 write;
|
lock table t1 write;
|
||||||
insert into t1 values (2);
|
insert into t1 values (2);
|
||||||
show slave status /* reports the correct diff with master query time about 3+3 secs */;;
|
# reports the correct diff with master query time about 3+3 secs
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port 9306
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos 455
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos 367
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master 7
|
Seconds_Behind_Master 7
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno 0
|
|
||||||
Last_IO_Error
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
unlock tables;
|
unlock tables;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
@ -10,9 +10,9 @@ source include/master-slave.inc;
|
|||||||
connection master;
|
connection master;
|
||||||
#connection slave;
|
#connection slave;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
--replace_result $DEFAULT_MASTER_PORT DEFAULT_MASTER_PORT
|
--echo # Second_behind reports 0
|
||||||
--replace_column 1 # 8 # 9 # 23 #
|
let $status_items= Seconds_Behind_Master;
|
||||||
--query_vertical show slave status /* Second_behind reports 0 */;
|
source include/show_slave_status.inc;
|
||||||
sleep 3;
|
sleep 3;
|
||||||
|
|
||||||
### bug emulation
|
### bug emulation
|
||||||
@ -35,9 +35,8 @@ insert into t1 values (1);
|
|||||||
sleep 3;
|
sleep 3;
|
||||||
|
|
||||||
connection slave;
|
connection slave;
|
||||||
--replace_result $DEFAULT_MASTER_PORT DEFAULT_MASTER_PORT
|
--echo # bug emulated: reports slave threads starting time about 3*3 not 3 secs
|
||||||
--replace_column 1 # 8 # 9 # 23 #
|
source include/show_slave_status.inc;
|
||||||
--query_vertical show slave status /* bug emulated: reports slave threads starting time about 3*3 not 3 secs */;
|
|
||||||
unlock tables;
|
unlock tables;
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
@ -55,9 +54,8 @@ insert into t1 values (2);
|
|||||||
sleep 3;
|
sleep 3;
|
||||||
|
|
||||||
connection slave;
|
connection slave;
|
||||||
--replace_result $DEFAULT_MASTER_PORT DEFAULT_MASTER_PORT
|
--echo # reports the correct diff with master query time about 3+3 secs
|
||||||
--replace_column 1 # 8 # 9 # 23 #
|
source include/show_slave_status.inc;
|
||||||
--query_vertical show slave status /* reports the correct diff with master query time about 3+3 secs */;
|
|
||||||
unlock tables;
|
unlock tables;
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
|
@ -91,49 +91,7 @@ f1 f2 f3 f4
|
|||||||
27 27 27 next
|
27 27 27 next
|
||||||
29 29 29 second
|
29 29 29 second
|
||||||
30 30 30 next
|
30 30 30 next
|
||||||
|
Checking that both slave threads are running.
|
||||||
* Show Slave Status *
|
|
||||||
|
|
||||||
show slave status;;
|
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
|
|
||||||
|
|
||||||
***** Testing Altering table def scenario *****
|
***** Testing Altering table def scenario *****
|
||||||
|
|
||||||
@ -454,7 +412,9 @@ f1 f2 f3 f4
|
|||||||
update t31 set f5=555555555555555 where f3=6;
|
update t31 set f5=555555555555555 where f3=6;
|
||||||
update t31 set f2=2 where f3=2;
|
update t31 set f2=2 where f3=2;
|
||||||
update t31 set f1=NULL where f3=1;
|
update t31 set f1=NULL where f3=1;
|
||||||
update t31 set f3=0, f27=NULL, f35='f35 new value' where f3=3;
|
update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
|
||||||
|
Warnings:
|
||||||
|
Warning 1048 Column 'f3' cannot be null
|
||||||
|
|
||||||
** Delete from Master **
|
** Delete from Master **
|
||||||
|
|
||||||
@ -463,50 +423,12 @@ delete from t2;
|
|||||||
delete from t3;
|
delete from t3;
|
||||||
delete from t4;
|
delete from t4;
|
||||||
delete from t31;
|
delete from t31;
|
||||||
|
select * from t31;
|
||||||
|
f1 f2 f3 f4
|
||||||
|
|
||||||
** Check slave status **
|
** Check slave status **
|
||||||
|
|
||||||
select * from t31;
|
Checking that both slave threads are running.
|
||||||
f1 f2 f3 f4
|
|
||||||
show slave status;;
|
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
|
|
||||||
****************************************
|
****************************************
|
||||||
* columns in master at middle of table *
|
* columns in master at middle of table *
|
||||||
@ -539,50 +461,13 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
|
|||||||
(3,@b1,DEFAULT,'QA',DEFAULT);
|
(3,@b1,DEFAULT,'QA',DEFAULT);
|
||||||
|
|
||||||
********************************************
|
********************************************
|
||||||
*** Expect slave to fail with Error 1523 ***
|
*** Expect slave to fail with Error 1535 ***
|
||||||
********************************************
|
********************************************
|
||||||
|
|
||||||
SHOW SLAVE STATUS;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
Slave_IO_State #
|
Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
|
||||||
Master_Host 127.0.0.1
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||||
Master_User root
|
include/start_slave.inc
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1535
|
|
||||||
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1535
|
|
||||||
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
|
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
*** Drop t10 ***
|
*** Drop t10 ***
|
||||||
DROP TABLE t10;
|
DROP TABLE t10;
|
||||||
@ -614,50 +499,13 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
|
|||||||
(3,@b1,DEFAULT,'QA',DEFAULT);
|
(3,@b1,DEFAULT,'QA',DEFAULT);
|
||||||
|
|
||||||
********************************************
|
********************************************
|
||||||
*** Expect slave to fail with Error 1523 ***
|
*** Expect slave to fail with Error 1535 ***
|
||||||
********************************************
|
********************************************
|
||||||
|
|
||||||
SHOW SLAVE STATUS;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
Slave_IO_State #
|
Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
|
||||||
Master_Host 127.0.0.1
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||||
Master_User root
|
include/start_slave.inc
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1535
|
|
||||||
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1535
|
|
||||||
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
|
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
*** Drop t11 ***
|
*** Drop t11 ***
|
||||||
DROP TABLE t11;
|
DROP TABLE t11;
|
||||||
@ -768,45 +616,7 @@ c1 c3 hex(c4) c5 c6
|
|||||||
************
|
************
|
||||||
* Bug30415 *
|
* Bug30415 *
|
||||||
************
|
************
|
||||||
SHOW SLAVE STATUS;
|
Last_SQL_Error = Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1091
|
|
||||||
Last_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1091
|
|
||||||
Last_SQL_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
|
|
||||||
STOP SLAVE;
|
STOP SLAVE;
|
||||||
RESET SLAVE;
|
RESET SLAVE;
|
||||||
|
|
||||||
@ -854,45 +664,7 @@ c1 hex(c4) c5 c6 c7 c2
|
|||||||
*** Expect slave to fail with Error 1054 ***
|
*** Expect slave to fail with Error 1054 ***
|
||||||
********************************************
|
********************************************
|
||||||
|
|
||||||
SHOW SLAVE STATUS;
|
Last_SQL_Error = Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1054
|
|
||||||
Last_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1054
|
|
||||||
Last_SQL_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
|
|
||||||
STOP SLAVE;
|
STOP SLAVE;
|
||||||
RESET SLAVE;
|
RESET SLAVE;
|
||||||
|
|
||||||
@ -940,45 +712,7 @@ c1 hex(c4) c5 c6 c7
|
|||||||
*** BUG 30434 ***
|
*** BUG 30434 ***
|
||||||
*****************
|
*****************
|
||||||
|
|
||||||
SHOW SLAVE STATUS;
|
Last_SQL_Error = Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1072
|
|
||||||
Last_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1072
|
|
||||||
Last_SQL_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
|
|
||||||
STOP SLAVE;
|
STOP SLAVE;
|
||||||
RESET SLAVE;
|
RESET SLAVE;
|
||||||
|
|
||||||
@ -1230,49 +964,7 @@ f1 f2 f3 f4
|
|||||||
27 27 27 next
|
27 27 27 next
|
||||||
29 29 29 second
|
29 29 29 second
|
||||||
30 30 30 next
|
30 30 30 next
|
||||||
|
Checking that both slave threads are running.
|
||||||
* Show Slave Status *
|
|
||||||
|
|
||||||
show slave status;;
|
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
|
|
||||||
|
|
||||||
***** Testing Altering table def scenario *****
|
***** Testing Altering table def scenario *****
|
||||||
|
|
||||||
@ -1593,7 +1285,9 @@ f1 f2 f3 f4
|
|||||||
update t31 set f5=555555555555555 where f3=6;
|
update t31 set f5=555555555555555 where f3=6;
|
||||||
update t31 set f2=2 where f3=2;
|
update t31 set f2=2 where f3=2;
|
||||||
update t31 set f1=NULL where f3=1;
|
update t31 set f1=NULL where f3=1;
|
||||||
update t31 set f3=0, f27=NULL, f35='f35 new value' where f3=3;
|
update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
|
||||||
|
Warnings:
|
||||||
|
Warning 1048 Column 'f3' cannot be null
|
||||||
|
|
||||||
** Delete from Master **
|
** Delete from Master **
|
||||||
|
|
||||||
@ -1602,50 +1296,12 @@ delete from t2;
|
|||||||
delete from t3;
|
delete from t3;
|
||||||
delete from t4;
|
delete from t4;
|
||||||
delete from t31;
|
delete from t31;
|
||||||
|
select * from t31;
|
||||||
|
f1 f2 f3 f4
|
||||||
|
|
||||||
** Check slave status **
|
** Check slave status **
|
||||||
|
|
||||||
select * from t31;
|
Checking that both slave threads are running.
|
||||||
f1 f2 f3 f4
|
|
||||||
show slave status;;
|
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
|
|
||||||
****************************************
|
****************************************
|
||||||
* columns in master at middle of table *
|
* columns in master at middle of table *
|
||||||
@ -1678,50 +1334,13 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
|
|||||||
(3,@b1,DEFAULT,'QA',DEFAULT);
|
(3,@b1,DEFAULT,'QA',DEFAULT);
|
||||||
|
|
||||||
********************************************
|
********************************************
|
||||||
*** Expect slave to fail with Error 1523 ***
|
*** Expect slave to fail with Error 1535 ***
|
||||||
********************************************
|
********************************************
|
||||||
|
|
||||||
SHOW SLAVE STATUS;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
Slave_IO_State #
|
Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
|
||||||
Master_Host 127.0.0.1
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||||
Master_User root
|
include/start_slave.inc
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1535
|
|
||||||
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1535
|
|
||||||
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
|
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
*** Drop t10 ***
|
*** Drop t10 ***
|
||||||
DROP TABLE t10;
|
DROP TABLE t10;
|
||||||
@ -1753,50 +1372,13 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
|
|||||||
(3,@b1,DEFAULT,'QA',DEFAULT);
|
(3,@b1,DEFAULT,'QA',DEFAULT);
|
||||||
|
|
||||||
********************************************
|
********************************************
|
||||||
*** Expect slave to fail with Error 1523 ***
|
*** Expect slave to fail with Error 1535 ***
|
||||||
********************************************
|
********************************************
|
||||||
|
|
||||||
SHOW SLAVE STATUS;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
Slave_IO_State #
|
Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
|
||||||
Master_Host 127.0.0.1
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||||
Master_User root
|
include/start_slave.inc
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1535
|
|
||||||
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1535
|
|
||||||
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
|
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
|
|
||||||
*** Drop t11 ***
|
*** Drop t11 ***
|
||||||
DROP TABLE t11;
|
DROP TABLE t11;
|
||||||
@ -1907,45 +1489,7 @@ c1 c3 hex(c4) c5 c6
|
|||||||
************
|
************
|
||||||
* Bug30415 *
|
* Bug30415 *
|
||||||
************
|
************
|
||||||
SHOW SLAVE STATUS;
|
Last_SQL_Error = Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1091
|
|
||||||
Last_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1091
|
|
||||||
Last_SQL_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
|
|
||||||
STOP SLAVE;
|
STOP SLAVE;
|
||||||
RESET SLAVE;
|
RESET SLAVE;
|
||||||
|
|
||||||
@ -1993,45 +1537,7 @@ c1 hex(c4) c5 c6 c7 c2
|
|||||||
*** Expect slave to fail with Error 1054 ***
|
*** Expect slave to fail with Error 1054 ***
|
||||||
********************************************
|
********************************************
|
||||||
|
|
||||||
SHOW SLAVE STATUS;
|
Last_SQL_Error = Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1054
|
|
||||||
Last_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1054
|
|
||||||
Last_SQL_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
|
|
||||||
STOP SLAVE;
|
STOP SLAVE;
|
||||||
RESET SLAVE;
|
RESET SLAVE;
|
||||||
|
|
||||||
@ -2079,45 +1585,7 @@ c1 hex(c4) c5 c6 c7
|
|||||||
*** BUG 30434 ***
|
*** BUG 30434 ***
|
||||||
*****************
|
*****************
|
||||||
|
|
||||||
SHOW SLAVE STATUS;
|
Last_SQL_Error = Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1072
|
|
||||||
Last_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1072
|
|
||||||
Last_SQL_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
|
|
||||||
STOP SLAVE;
|
STOP SLAVE;
|
||||||
RESET SLAVE;
|
RESET SLAVE;
|
||||||
|
|
||||||
|
@ -26,21 +26,21 @@ from mysql.ndb_apply_status;
|
|||||||
# since insert is done with transactional engine, expect a BEGIN
|
# since insert is done with transactional engine, expect a BEGIN
|
||||||
# at <start_pos>
|
# at <start_pos>
|
||||||
|
|
||||||
show binlog events from <start_pos> limit 1;
|
show binlog events from <binlog_start> limit 1;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 <start_pos> Query 1 # BEGIN
|
master-bin.000001 # Query # # BEGIN
|
||||||
|
|
||||||
# Now the insert, one step after
|
# Now the insert, one step after
|
||||||
|
|
||||||
show binlog events from <start_pos> limit 1,1;
|
show binlog events from <binlog_start> limit 1,1;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Query 1 # use `test`; insert into t1 values (1,2)
|
master-bin.000001 # Query # # use `test`; insert into t1 values (1,2)
|
||||||
|
|
||||||
# and the COMMIT should be at <end_pos>
|
# and the COMMIT should be at <end_pos>
|
||||||
|
|
||||||
show binlog events from <start_pos> limit 2,1;
|
show binlog events from <binlog_start> limit 2,1;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Xid 1 <end_pos> COMMIT /* XID */
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
|
||||||
begin;
|
begin;
|
||||||
insert into t1 values (2,3);
|
insert into t1 values (2,3);
|
||||||
@ -51,18 +51,18 @@ select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos
|
|||||||
from mysql.ndb_apply_status;
|
from mysql.ndb_apply_status;
|
||||||
@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos
|
@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos
|
||||||
<log_name> <start_pos> <end_pos>
|
<log_name> <start_pos> <end_pos>
|
||||||
show binlog events from <start_pos> limit 1;
|
show binlog events from <binlog_start> limit 1;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 <start_pos> Query 1 # BEGIN
|
master-bin.000001 # Query # # BEGIN
|
||||||
|
|
||||||
show binlog events from <start_pos> limit 1,2;
|
show binlog events from <binlog_start> limit 1,2;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Query # # use `test`; insert into t1 values (2,3)
|
master-bin.000001 # Query # # use `test`; insert into t1 values (2,3)
|
||||||
master-bin.000001 # Query # # use `test`; insert into t2 values (3,4)
|
master-bin.000001 # Query # # use `test`; insert into t2 values (3,4)
|
||||||
|
|
||||||
show binlog events from <start_pos> limit 3,1;
|
show binlog events from <binlog_start> limit 3,1;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Xid 1 <end_pos> COMMIT /* XID */
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
|
||||||
DROP TABLE test.t1, test.t2;
|
DROP TABLE test.t1, test.t2;
|
||||||
SHOW TABLES;
|
SHOW TABLES;
|
||||||
|
@ -138,45 +138,7 @@ SUBPARTITIONS 2
|
|||||||
PARTITION pa9 VALUES LESS THAN (90) ENGINE = InnoDB,
|
PARTITION pa9 VALUES LESS THAN (90) ENGINE = InnoDB,
|
||||||
PARTITION pa10 VALUES LESS THAN (100) ENGINE = InnoDB,
|
PARTITION pa10 VALUES LESS THAN (100) ENGINE = InnoDB,
|
||||||
PARTITION pa11 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
|
PARTITION pa11 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
|
||||||
show slave status;
|
Checking that both slave threads are running.
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_MYPORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
SELECT count(*) "Slave norm" FROM t1;
|
SELECT count(*) "Slave norm" FROM t1;
|
||||||
Slave norm 500
|
Slave norm 500
|
||||||
SELECT count(*) "Slave bykey" FROM t2;
|
SELECT count(*) "Slave bykey" FROM t2;
|
||||||
|
@ -144,9 +144,7 @@ SELECT count(*) as "Master byrange" FROM t3;
|
|||||||
--sync_slave_with_master
|
--sync_slave_with_master
|
||||||
connection slave;
|
connection slave;
|
||||||
show create table t3;
|
show create table t3;
|
||||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
|
--source include/check_slave_is_running.inc
|
||||||
--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
|
||||||
show slave status;
|
|
||||||
SELECT count(*) "Slave norm" FROM t1;
|
SELECT count(*) "Slave norm" FROM t1;
|
||||||
SELECT count(*) "Slave bykey" FROM t2;
|
SELECT count(*) "Slave bykey" FROM t2;
|
||||||
SELECT count(*) "Slave byrange" FROM t3;
|
SELECT count(*) "Slave byrange" FROM t3;
|
||||||
|
@ -66,9 +66,7 @@ ALTER TABLE t2 DROP COLUMN d;
|
|||||||
--echo
|
--echo
|
||||||
--echo
|
--echo
|
||||||
--echo ******************** SHOW BINLOG EVENTS ********************
|
--echo ******************** SHOW BINLOG EVENTS ********************
|
||||||
--replace_column 2 # 5 #
|
source include/show_binlog_events.inc;
|
||||||
--replace_regex /Server ver: .+/Server ver: #/ /table_id: [0-9]+/table_id: #/
|
|
||||||
show binlog events from 1;
|
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
# as we're using UUID we don't SELECT but use "diff" like in rpl_row_UUID
|
# as we're using UUID we don't SELECT but use "diff" like in rpl_row_UUID
|
||||||
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test_rpl > $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql
|
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test_rpl > $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql
|
||||||
|
@ -326,10 +326,7 @@ DROP VIEW v2;
|
|||||||
--echo
|
--echo
|
||||||
--echo
|
--echo
|
||||||
--echo ******************** SHOW BINLOG EVENTS ********************
|
--echo ******************** SHOW BINLOG EVENTS ********************
|
||||||
--replace_column 2 # 5 #
|
--source include/show_binlog_events.inc
|
||||||
--replace_regex /Server ver: .+/Server ver: #/ /table_id: [0-9]+/table_id: #/ /COMMIT.+xid=[0-9]+.+/#/ /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/
|
|
||||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
|
||||||
show binlog events from 1;
|
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
# as we're using UUID we don't SELECT but use "diff" like in rpl_row_UUID
|
# as we're using UUID we don't SELECT but use "diff" like in rpl_row_UUID
|
||||||
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test_rpl > $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql
|
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test_rpl > $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql
|
||||||
|
@ -1,141 +0,0 @@
|
|||||||
reset master;
|
|
||||||
show master status;
|
|
||||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
|
||||||
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
|
|
||||||
reset slave;
|
|
||||||
SHOW SLAVE STATUS;
|
|
||||||
change master to master_host='127.0.0.1';
|
|
||||||
SHOW SLAVE STATUS;
|
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User test
|
|
||||||
Master_Port 3306
|
|
||||||
Connect_Retry 7
|
|
||||||
Master_Log_File
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File
|
|
||||||
Slave_IO_Running No
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
change master to master_host='127.0.0.1',master_user='root',
|
|
||||||
master_password='',master_port=MASTER_PORT;
|
|
||||||
SHOW SLAVE STATUS;
|
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 7
|
|
||||||
Master_Log_File
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File
|
|
||||||
Slave_IO_Running No
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
start slave;
|
|
||||||
SHOW SLAVE STATUS;
|
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 7
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
drop table if exists t1;
|
|
||||||
create table t1 (n int, PRIMARY KEY(n));
|
|
||||||
insert into t1 values (10),(45),(90);
|
|
||||||
SELECT * FROM t1 ORDER BY n;
|
|
||||||
n
|
|
||||||
10
|
|
||||||
45
|
|
||||||
90
|
|
||||||
SELECT * FROM t1 ORDER BY n;
|
|
||||||
n
|
|
||||||
10
|
|
||||||
45
|
|
||||||
90
|
|
||||||
drop table t1;
|
|
@ -17,16 +17,6 @@ show grants for x@y;
|
|||||||
Grants for x@y
|
Grants for x@y
|
||||||
GRANT USAGE ON *.* TO 'x'@'y'
|
GRANT USAGE ON *.* TO 'x'@'y'
|
||||||
GRANT SELECT ON `d1`.`t` TO 'x'@'y'
|
GRANT SELECT ON `d1`.`t` TO 'x'@'y'
|
||||||
show binlog events;
|
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
|
||||||
master-bin.000001 4 Format_desc 1 106 Server ver: VERSION, Binlog ver: 4
|
|
||||||
master-bin.000001 106 Query 1 193 drop database if exists d1
|
|
||||||
master-bin.000001 193 Query 1 272 create database d1
|
|
||||||
master-bin.000001 272 Query 1 370 use `d1`; create table t (s1 int) engine=innodb
|
|
||||||
master-bin.000001 370 Query 1 436 BEGIN
|
|
||||||
master-bin.000001 436 Query 1 521 use `d1`; insert into t values (1)
|
|
||||||
master-bin.000001 521 Xid 1 548 COMMIT /* XID */
|
|
||||||
master-bin.000001 548 Query 1 633 use `d1`; grant select on t to x@y
|
|
||||||
start transaction;
|
start transaction;
|
||||||
insert into t values (2);
|
insert into t values (2);
|
||||||
revoke select on t from x@y;
|
revoke select on t from x@y;
|
||||||
@ -38,19 +28,5 @@ s1
|
|||||||
show grants for x@y;
|
show grants for x@y;
|
||||||
Grants for x@y
|
Grants for x@y
|
||||||
GRANT USAGE ON *.* TO 'x'@'y'
|
GRANT USAGE ON *.* TO 'x'@'y'
|
||||||
show binlog events;
|
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
|
||||||
master-bin.000001 4 Format_desc 1 106 Server ver: VERSION, Binlog ver: 4
|
|
||||||
master-bin.000001 106 Query 1 193 drop database if exists d1
|
|
||||||
master-bin.000001 193 Query 1 272 create database d1
|
|
||||||
master-bin.000001 272 Query 1 370 use `d1`; create table t (s1 int) engine=innodb
|
|
||||||
master-bin.000001 370 Query 1 436 BEGIN
|
|
||||||
master-bin.000001 436 Query 1 521 use `d1`; insert into t values (1)
|
|
||||||
master-bin.000001 521 Xid 1 548 COMMIT /* XID */
|
|
||||||
master-bin.000001 548 Query 1 633 use `d1`; grant select on t to x@y
|
|
||||||
master-bin.000001 633 Query 1 699 BEGIN
|
|
||||||
master-bin.000001 699 Query 1 784 use `d1`; insert into t values (2)
|
|
||||||
master-bin.000001 784 Xid 1 811 COMMIT /* XID */
|
|
||||||
master-bin.000001 811 Query 1 899 use `d1`; revoke select on t from x@y
|
|
||||||
drop user x@y;
|
drop user x@y;
|
||||||
drop database d1;
|
drop database d1;
|
||||||
|
@ -4,43 +4,5 @@ stop slave;
|
|||||||
reset slave;
|
reset slave;
|
||||||
SET GLOBAL debug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init";
|
SET GLOBAL debug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init";
|
||||||
start slave;
|
start slave;
|
||||||
show slave status;
|
Last_SQL_Error = Failed during slave thread initialization
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File
|
|
||||||
Read_Master_Log_Pos 4
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File
|
|
||||||
Slave_IO_Running No
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno #
|
|
||||||
Last_Error Failed during slave thread initialization
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos 0
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno 0
|
|
||||||
Last_IO_Error
|
|
||||||
Last_SQL_Errno #
|
|
||||||
Last_SQL_Error Failed during slave thread initialization
|
|
||||||
SET GLOBAL debug="";
|
SET GLOBAL debug="";
|
||||||
|
@ -10,86 +10,8 @@ n
|
|||||||
stop slave sql_thread;
|
stop slave sql_thread;
|
||||||
insert into t1 values(1);
|
insert into t1 values(1);
|
||||||
insert into t1 values(2);
|
insert into t1 values(2);
|
||||||
stop slave;
|
include/stop_slave.inc
|
||||||
SHOW SLAVE STATUS;
|
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running No
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
change master to master_user='root';
|
change master to master_user='root';
|
||||||
SHOW SLAVE STATUS;
|
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running No
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
start slave;
|
start slave;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
n
|
n
|
||||||
|
@ -50,45 +50,7 @@ a
|
|||||||
SELECT * FROM t3;
|
SELECT * FROM t3;
|
||||||
a
|
a
|
||||||
3
|
3
|
||||||
SHOW SLAVE STATUS;
|
Checking that both slave threads are running.
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
|
|
||||||
*** Test lock wait timeout ***
|
*** Test lock wait timeout ***
|
||||||
include/stop_slave.inc
|
include/stop_slave.inc
|
||||||
@ -112,52 +74,14 @@ SELECT * FROM t3;
|
|||||||
a
|
a
|
||||||
3
|
3
|
||||||
3
|
3
|
||||||
SHOW SLAVE STATUS;
|
Checking that both slave threads are running.
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
|
|
||||||
*** Test lock wait timeout and purged relay logs ***
|
*** Test lock wait timeout and purged relay logs ***
|
||||||
SET @my_max_relay_log_size= @@global.max_relay_log_size;
|
SET @my_max_relay_log_size= @@global.max_relay_log_size;
|
||||||
SET global max_relay_log_size=0;
|
SET global max_relay_log_size=0;
|
||||||
include/stop_slave.inc
|
include/stop_slave.inc
|
||||||
DELETE FROM t2;
|
DELETE FROM t2;
|
||||||
CHANGE MASTER TO MASTER_LOG_POS=440;
|
CHANGE MASTER TO MASTER_LOG_POS=MASTER_POS_BEGIN;
|
||||||
BEGIN;
|
BEGIN;
|
||||||
SELECT * FROM t1 FOR UPDATE;
|
SELECT * FROM t1 FOR UPDATE;
|
||||||
a
|
a
|
||||||
@ -179,45 +103,7 @@ a
|
|||||||
3
|
3
|
||||||
3
|
3
|
||||||
3
|
3
|
||||||
SHOW SLAVE STATUS;
|
Checking that both slave threads are running.
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port MASTER_PORT
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running Yes
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 0
|
|
||||||
Last_Error
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 0
|
|
||||||
Last_SQL_Error
|
|
||||||
|
|
||||||
*** Clean up ***
|
*** Clean up ***
|
||||||
DROP TABLE t1,t2,t3;
|
DROP TABLE t1,t2,t3;
|
||||||
|
@ -6,9 +6,9 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|||||||
start slave;
|
start slave;
|
||||||
reset master;
|
reset master;
|
||||||
change master to master_host="127.0.0.1",master_port=SLAVE_PORT,master_user="root";
|
change master to master_host="127.0.0.1",master_port=SLAVE_PORT,master_user="root";
|
||||||
start slave;
|
include/start_slave.inc
|
||||||
create table t1 (n int);
|
create table t1 (n int);
|
||||||
stop slave;
|
include/stop_slave.inc
|
||||||
create table t2 (n int);
|
create table t2 (n int);
|
||||||
show tables;
|
show tables;
|
||||||
Tables_in_test
|
Tables_in_test
|
||||||
@ -22,20 +22,20 @@ insert into t3 values(2);
|
|||||||
insert into t3 values(3);
|
insert into t3 values(3);
|
||||||
commit;
|
commit;
|
||||||
insert into t3 values(4);
|
insert into t3 values(4);
|
||||||
start slave until master_log_file="slave-bin.000001",master_log_pos=195;
|
start slave until master_log_file="MASTER_LOG_FILE",master_log_pos=MASTER_LOG_POS;
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart
|
Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart
|
||||||
show tables;
|
show tables;
|
||||||
Tables_in_test
|
Tables_in_test
|
||||||
t1
|
t1
|
||||||
t2
|
t2
|
||||||
start slave until master_log_file="slave-bin.000001",master_log_pos=438;
|
start slave until master_log_file="MASTER_LOG_FILE",master_log_pos=MASTER_LOG_POS;
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart
|
Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart
|
||||||
select * from t3;
|
select * from t3;
|
||||||
n
|
n
|
||||||
1
|
1
|
||||||
start slave until master_log_file="slave-bin.000001",master_log_pos=663;
|
start slave until master_log_file="MASTER_LOG_FILE",master_log_pos=MASTER_LOG_POS;
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart
|
Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart
|
||||||
select * from t3;
|
select * from t3;
|
||||||
@ -43,7 +43,7 @@ n
|
|||||||
1
|
1
|
||||||
2
|
2
|
||||||
3
|
3
|
||||||
start slave;
|
include/start_slave.inc
|
||||||
create table t4 (n int);
|
create table t4 (n int);
|
||||||
create table t5 (n int);
|
create table t5 (n int);
|
||||||
create table t6 (n int);
|
create table t6 (n int);
|
||||||
@ -55,6 +55,6 @@ t3
|
|||||||
t4
|
t4
|
||||||
t5
|
t5
|
||||||
t6
|
t6
|
||||||
stop slave;
|
include/stop_slave.inc
|
||||||
reset slave;
|
reset slave;
|
||||||
drop table t1,t2,t3,t4,t5,t6;
|
drop table t1,t2,t3,t4,t5,t6;
|
||||||
|
@ -4,7 +4,6 @@ reset master;
|
|||||||
reset slave;
|
reset slave;
|
||||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
start slave;
|
start slave;
|
||||||
SHOW SLAVE STATUS;
|
|
||||||
load table t1 from master;
|
load table t1 from master;
|
||||||
ERROR 08S01: Error connecting to master: Master is not configured
|
ERROR 08S01: Error connecting to master: Master is not configured
|
||||||
load table t1 from master;
|
load table t1 from master;
|
||||||
|
@ -54,45 +54,7 @@ a b c
|
|||||||
3 4 QA TESTING
|
3 4 QA TESTING
|
||||||
*** Start Slave ***
|
*** Start Slave ***
|
||||||
START SLAVE;
|
START SLAVE;
|
||||||
SHOW SLAVE STATUS;
|
Last_SQL_Error = Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1535
|
|
||||||
Last_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1535
|
|
||||||
Last_SQL_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
|
|
||||||
STOP SLAVE;
|
STOP SLAVE;
|
||||||
RESET SLAVE;
|
RESET SLAVE;
|
||||||
SELECT * FROM t2 ORDER BY a;
|
SELECT * FROM t2 ORDER BY a;
|
||||||
@ -121,47 +83,10 @@ INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TEST
|
|||||||
********************************************
|
********************************************
|
||||||
*** Expect slave to fail with Error 1522 ***
|
*** Expect slave to fail with Error 1522 ***
|
||||||
********************************************
|
********************************************
|
||||||
SHOW SLAVE STATUS;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
Slave_IO_State #
|
Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
|
||||||
Master_Host 127.0.0.1
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||||
Master_User root
|
include/start_slave.inc
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1535
|
|
||||||
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1535
|
|
||||||
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
|
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
*** Drop t3 ***
|
*** Drop t3 ***
|
||||||
DROP TABLE t3;
|
DROP TABLE t3;
|
||||||
*** Create t4 on slave ***
|
*** Create t4 on slave ***
|
||||||
@ -183,47 +108,10 @@ INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'),
|
|||||||
********************************************
|
********************************************
|
||||||
*** Expect slave to fail with Error 1522 ***
|
*** Expect slave to fail with Error 1522 ***
|
||||||
********************************************
|
********************************************
|
||||||
SHOW SLAVE STATUS;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
Slave_IO_State #
|
Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
|
||||||
Master_Host 127.0.0.1
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||||
Master_User root
|
include/start_slave.inc
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1535
|
|
||||||
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1535
|
|
||||||
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
|
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
*** Drop t4 ***
|
*** Drop t4 ***
|
||||||
DROP TABLE t4;
|
DROP TABLE t4;
|
||||||
*** Create t5 on slave ***
|
*** Create t5 on slave ***
|
||||||
@ -245,47 +133,10 @@ INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098),
|
|||||||
********************************************
|
********************************************
|
||||||
*** Expect slave to fail with Error 1522 ***
|
*** Expect slave to fail with Error 1522 ***
|
||||||
********************************************
|
********************************************
|
||||||
SHOW SLAVE STATUS;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
Slave_IO_State #
|
Last_SQL_Error = Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
|
||||||
Master_Host 127.0.0.1
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||||
Master_User root
|
include/start_slave.inc
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1535
|
|
||||||
Last_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1535
|
|
||||||
Last_SQL_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
|
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
*** Drop t5 ***
|
*** Drop t5 ***
|
||||||
DROP TABLE t5;
|
DROP TABLE t5;
|
||||||
*** Create t6 on slave ***
|
*** Create t6 on slave ***
|
||||||
@ -306,45 +157,7 @@ INSERT INTO t6 () VALUES(1,'Kyle',200.23,1),
|
|||||||
********************************************
|
********************************************
|
||||||
*** Expect slave to fail with Error 1522 ***
|
*** Expect slave to fail with Error 1522 ***
|
||||||
********************************************
|
********************************************
|
||||||
SHOW SLAVE STATUS;
|
Last_SQL_Error = Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1535
|
|
||||||
Last_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1535
|
|
||||||
Last_SQL_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
|
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
|
||||||
*** Drop t6 ***
|
*** Drop t6 ***
|
||||||
DROP TABLE t6;
|
DROP TABLE t6;
|
||||||
@ -442,47 +255,10 @@ INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
|
|||||||
********************************************
|
********************************************
|
||||||
*** Expect slave to fail with Error 1522 ***
|
*** Expect slave to fail with Error 1522 ***
|
||||||
********************************************
|
********************************************
|
||||||
SHOW SLAVE STATUS;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
Slave_IO_State #
|
Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
|
||||||
Master_Host 127.0.0.1
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||||
Master_User root
|
include/start_slave.inc
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1535
|
|
||||||
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1535
|
|
||||||
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
|
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
*** Drop t10 ***
|
*** Drop t10 ***
|
||||||
DROP TABLE t10;
|
DROP TABLE t10;
|
||||||
*** Create t11 on slave ***
|
*** Create t11 on slave ***
|
||||||
@ -503,47 +279,10 @@ INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
|
|||||||
********************************************
|
********************************************
|
||||||
*** Expect slave to fail with Error 1522 ***
|
*** Expect slave to fail with Error 1522 ***
|
||||||
********************************************
|
********************************************
|
||||||
SHOW SLAVE STATUS;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
Slave_IO_State #
|
Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
|
||||||
Master_Host 127.0.0.1
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||||
Master_User root
|
include/start_slave.inc
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1535
|
|
||||||
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1535
|
|
||||||
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
|
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
*** Drop t11 ***
|
*** Drop t11 ***
|
||||||
DROP TABLE t11;
|
DROP TABLE t11;
|
||||||
*** Create t12 on slave ***
|
*** Create t12 on slave ***
|
||||||
@ -753,47 +492,10 @@ ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5;
|
|||||||
********************************************
|
********************************************
|
||||||
*** Expect slave to fail with Error 1060 ***
|
*** Expect slave to fail with Error 1060 ***
|
||||||
********************************************
|
********************************************
|
||||||
SHOW SLAVE STATUS;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
Slave_IO_State #
|
Last_SQL_Error = Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'
|
||||||
Master_Host 127.0.0.1
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 1;
|
||||||
Master_User root
|
include/start_slave.inc
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1060
|
|
||||||
Last_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1060
|
|
||||||
Last_SQL_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'
|
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
|
||||||
START SLAVE;
|
|
||||||
*** Try to insert in master ****
|
*** Try to insert in master ****
|
||||||
INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2);
|
INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2);
|
||||||
SELECT * FROM t15 ORDER BY c1;
|
SELECT * FROM t15 ORDER BY c1;
|
||||||
@ -893,46 +595,9 @@ INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX');
|
|||||||
********************************************
|
********************************************
|
||||||
*** Expect slave to fail with Error 1522 ***
|
*** Expect slave to fail with Error 1522 ***
|
||||||
********************************************
|
********************************************
|
||||||
SHOW SLAVE STATUS;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
Slave_IO_State #
|
Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
|
||||||
Master_Host 127.0.0.1
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||||
Master_User root
|
include/start_slave.inc
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1535
|
|
||||||
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1535
|
|
||||||
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
|
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
** DROP table t17 ***
|
** DROP table t17 ***
|
||||||
DROP TABLE t17;
|
DROP TABLE t17;
|
||||||
|
@ -54,45 +54,7 @@ a b c
|
|||||||
3 4 QA TESTING
|
3 4 QA TESTING
|
||||||
*** Start Slave ***
|
*** Start Slave ***
|
||||||
START SLAVE;
|
START SLAVE;
|
||||||
SHOW SLAVE STATUS;
|
Last_SQL_Error = Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1535
|
|
||||||
Last_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1535
|
|
||||||
Last_SQL_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
|
|
||||||
STOP SLAVE;
|
STOP SLAVE;
|
||||||
RESET SLAVE;
|
RESET SLAVE;
|
||||||
SELECT * FROM t2 ORDER BY a;
|
SELECT * FROM t2 ORDER BY a;
|
||||||
@ -121,47 +83,10 @@ INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TEST
|
|||||||
********************************************
|
********************************************
|
||||||
*** Expect slave to fail with Error 1522 ***
|
*** Expect slave to fail with Error 1522 ***
|
||||||
********************************************
|
********************************************
|
||||||
SHOW SLAVE STATUS;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
Slave_IO_State #
|
Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
|
||||||
Master_Host 127.0.0.1
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||||
Master_User root
|
include/start_slave.inc
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1535
|
|
||||||
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1535
|
|
||||||
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
|
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
*** Drop t3 ***
|
*** Drop t3 ***
|
||||||
DROP TABLE t3;
|
DROP TABLE t3;
|
||||||
*** Create t4 on slave ***
|
*** Create t4 on slave ***
|
||||||
@ -183,47 +108,10 @@ INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'),
|
|||||||
********************************************
|
********************************************
|
||||||
*** Expect slave to fail with Error 1522 ***
|
*** Expect slave to fail with Error 1522 ***
|
||||||
********************************************
|
********************************************
|
||||||
SHOW SLAVE STATUS;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
Slave_IO_State #
|
Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
|
||||||
Master_Host 127.0.0.1
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||||
Master_User root
|
include/start_slave.inc
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1535
|
|
||||||
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1535
|
|
||||||
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
|
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
*** Drop t4 ***
|
*** Drop t4 ***
|
||||||
DROP TABLE t4;
|
DROP TABLE t4;
|
||||||
*** Create t5 on slave ***
|
*** Create t5 on slave ***
|
||||||
@ -245,47 +133,10 @@ INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098),
|
|||||||
********************************************
|
********************************************
|
||||||
*** Expect slave to fail with Error 1522 ***
|
*** Expect slave to fail with Error 1522 ***
|
||||||
********************************************
|
********************************************
|
||||||
SHOW SLAVE STATUS;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
Slave_IO_State #
|
Last_SQL_Error = Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
|
||||||
Master_Host 127.0.0.1
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||||
Master_User root
|
include/start_slave.inc
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1535
|
|
||||||
Last_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1535
|
|
||||||
Last_SQL_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
|
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
*** Drop t5 ***
|
*** Drop t5 ***
|
||||||
DROP TABLE t5;
|
DROP TABLE t5;
|
||||||
*** Create t6 on slave ***
|
*** Create t6 on slave ***
|
||||||
@ -306,45 +157,7 @@ INSERT INTO t6 () VALUES(1,'Kyle',200.23,1),
|
|||||||
********************************************
|
********************************************
|
||||||
*** Expect slave to fail with Error 1522 ***
|
*** Expect slave to fail with Error 1522 ***
|
||||||
********************************************
|
********************************************
|
||||||
SHOW SLAVE STATUS;
|
Last_SQL_Error = Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
|
||||||
Slave_IO_State #
|
|
||||||
Master_Host 127.0.0.1
|
|
||||||
Master_User root
|
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1535
|
|
||||||
Last_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1535
|
|
||||||
Last_SQL_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
|
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
|
||||||
*** Drop t6 ***
|
*** Drop t6 ***
|
||||||
DROP TABLE t6;
|
DROP TABLE t6;
|
||||||
@ -442,47 +255,10 @@ INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
|
|||||||
********************************************
|
********************************************
|
||||||
*** Expect slave to fail with Error 1522 ***
|
*** Expect slave to fail with Error 1522 ***
|
||||||
********************************************
|
********************************************
|
||||||
SHOW SLAVE STATUS;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
Slave_IO_State #
|
Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
|
||||||
Master_Host 127.0.0.1
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||||
Master_User root
|
include/start_slave.inc
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1535
|
|
||||||
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1535
|
|
||||||
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
|
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
*** Drop t10 ***
|
*** Drop t10 ***
|
||||||
DROP TABLE t10;
|
DROP TABLE t10;
|
||||||
*** Create t11 on slave ***
|
*** Create t11 on slave ***
|
||||||
@ -503,47 +279,10 @@ INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
|
|||||||
********************************************
|
********************************************
|
||||||
*** Expect slave to fail with Error 1522 ***
|
*** Expect slave to fail with Error 1522 ***
|
||||||
********************************************
|
********************************************
|
||||||
SHOW SLAVE STATUS;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
Slave_IO_State #
|
Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
|
||||||
Master_Host 127.0.0.1
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||||
Master_User root
|
include/start_slave.inc
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1535
|
|
||||||
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1535
|
|
||||||
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
|
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
*** Drop t11 ***
|
*** Drop t11 ***
|
||||||
DROP TABLE t11;
|
DROP TABLE t11;
|
||||||
*** Create t12 on slave ***
|
*** Create t12 on slave ***
|
||||||
@ -753,47 +492,10 @@ ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5;
|
|||||||
********************************************
|
********************************************
|
||||||
*** Expect slave to fail with Error 1060 ***
|
*** Expect slave to fail with Error 1060 ***
|
||||||
********************************************
|
********************************************
|
||||||
SHOW SLAVE STATUS;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
Slave_IO_State #
|
Last_SQL_Error = Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'
|
||||||
Master_Host 127.0.0.1
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 1;
|
||||||
Master_User root
|
include/start_slave.inc
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1060
|
|
||||||
Last_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1060
|
|
||||||
Last_SQL_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'
|
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
|
||||||
START SLAVE;
|
|
||||||
*** Try to insert in master ****
|
*** Try to insert in master ****
|
||||||
INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2);
|
INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2);
|
||||||
SELECT * FROM t15 ORDER BY c1;
|
SELECT * FROM t15 ORDER BY c1;
|
||||||
@ -893,46 +595,9 @@ INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX');
|
|||||||
********************************************
|
********************************************
|
||||||
*** Expect slave to fail with Error 1522 ***
|
*** Expect slave to fail with Error 1522 ***
|
||||||
********************************************
|
********************************************
|
||||||
SHOW SLAVE STATUS;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
Slave_IO_State #
|
Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
|
||||||
Master_Host 127.0.0.1
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||||
Master_User root
|
include/start_slave.inc
|
||||||
Master_Port #
|
|
||||||
Connect_Retry 1
|
|
||||||
Master_Log_File master-bin.000001
|
|
||||||
Read_Master_Log_Pos #
|
|
||||||
Relay_Log_File #
|
|
||||||
Relay_Log_Pos #
|
|
||||||
Relay_Master_Log_File master-bin.000001
|
|
||||||
Slave_IO_Running Yes
|
|
||||||
Slave_SQL_Running No
|
|
||||||
Replicate_Do_DB
|
|
||||||
Replicate_Ignore_DB
|
|
||||||
Replicate_Do_Table
|
|
||||||
Replicate_Ignore_Table #
|
|
||||||
Replicate_Wild_Do_Table
|
|
||||||
Replicate_Wild_Ignore_Table
|
|
||||||
Last_Errno 1535
|
|
||||||
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
|
|
||||||
Skip_Counter 0
|
|
||||||
Exec_Master_Log_Pos #
|
|
||||||
Relay_Log_Space #
|
|
||||||
Until_Condition None
|
|
||||||
Until_Log_File
|
|
||||||
Until_Log_Pos 0
|
|
||||||
Master_SSL_Allowed No
|
|
||||||
Master_SSL_CA_File
|
|
||||||
Master_SSL_CA_Path
|
|
||||||
Master_SSL_Cert
|
|
||||||
Master_SSL_Cipher
|
|
||||||
Master_SSL_Key
|
|
||||||
Seconds_Behind_Master #
|
|
||||||
Master_SSL_Verify_Server_Cert No
|
|
||||||
Last_IO_Errno #
|
|
||||||
Last_IO_Error #
|
|
||||||
Last_SQL_Errno 1535
|
|
||||||
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
|
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
|
||||||
START SLAVE;
|
|
||||||
** DROP table t17 ***
|
** DROP table t17 ***
|
||||||
DROP TABLE t17;
|
DROP TABLE t17;
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user