mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Merge with 4.0.14
This commit is contained in:
@@ -2,10 +2,14 @@
|
||||
# Honours autoincrement values
|
||||
# i.e. if the master and slave have the same sequence
|
||||
#
|
||||
# check replication of load data for temporary tables with additional parameters
|
||||
# check replication of load data for temporary tables with additional
|
||||
# parameters
|
||||
#
|
||||
# check if duplicate entries trigger an error (they should unless IGNORE or
|
||||
# REPLACE was used on the master) (bug 571).
|
||||
#
|
||||
# check if START SLAVE, RESET SLAVE, CHANGE MASTER reset Last_slave_error and
|
||||
# Last_slave_errno in SHOW SLAVE STATUS (1st and 3rd commands did not: bug 986)
|
||||
|
||||
source include/master-slave.inc;
|
||||
|
||||
@@ -37,21 +41,60 @@ connection slave;
|
||||
sync_with_master;
|
||||
insert into t1 values(1,10);
|
||||
|
||||
connection master;
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
|
||||
# NOTE UNTIL MERGE 4.0 INTO 4.1
|
||||
# Below we generate an error, but this error shows up in SHOW SLAVE STATUS
|
||||
# in the next test. In 4.0 this is fixed (RESET SLAVE resets the error), but it
|
||||
# has not been merged into 4.1 yet. So for the moment, I comment all lines
|
||||
# below, to not generate the error, so that the test suite passes.
|
||||
# When you do the 4.0 -> 4.1 merge, please remove this note and re-enable the
|
||||
# error generation, by deleting the '#' characters below, and update the result.
|
||||
# The changeset to merge in 4.1 is
|
||||
# ChangeSet@1.1455.34.1, 2003-06-10 23:29:49+02:00, guilhem@mysql.com
|
||||
|
||||
#connection master;
|
||||
#load data infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
|
||||
#save_master_pos;
|
||||
#connection slave;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
# The SQL slave thread should be stopped now.
|
||||
#wait_for_slave_to_stop;
|
||||
wait_for_slave_to_stop;
|
||||
|
||||
# Skip the bad event and see if error is cleared in SHOW SLAVE STATUS by START
|
||||
# SLAVE, even though we are not executing any event (as sql_slave_skip_counter
|
||||
# takes us directly to the end of the relay log).
|
||||
|
||||
set global sql_slave_skip_counter=1;
|
||||
start slave;
|
||||
sync_with_master;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
show slave status;
|
||||
|
||||
# Trigger error again to test CHANGE MASTER
|
||||
|
||||
connection master;
|
||||
set sql_log_bin=0;
|
||||
delete from t1;
|
||||
set sql_log_bin=1;
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
# The SQL slave thread should be stopped now.
|
||||
wait_for_slave_to_stop;
|
||||
|
||||
# CHANGE MASTER and see if error is cleared in SHOW SLAVE STATUS.
|
||||
stop slave;
|
||||
change master to master_user='test';
|
||||
change master to master_user='root';
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
show slave status;
|
||||
|
||||
# Trigger error again to test RESET SLAVE
|
||||
|
||||
set global sql_slave_skip_counter=1;
|
||||
start slave;
|
||||
sync_with_master;
|
||||
connection master;
|
||||
set sql_log_bin=0;
|
||||
delete from t1;
|
||||
set sql_log_bin=1;
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
# The SQL slave thread should be stopped now.
|
||||
wait_for_slave_to_stop;
|
||||
|
||||
# RESET SLAVE and see if error is cleared in SHOW SLAVE STATUS.
|
||||
stop slave;
|
||||
reset slave;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
show slave status;
|
||||
|
||||
Reference in New Issue
Block a user