Commit dc6d984e authored by Sven Sandberg's avatar Sven Sandberg

rpl_row_inexist_tbl gave a merge conflict because the binlog

positions changed. Fixed by removing binlog positions from
output, and also:
 - removed code not used to verify the tested property
 - added comments
parent e467919d
...@@ -4,56 +4,18 @@ reset master; ...@@ -4,56 +4,18 @@ 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;
create table t1 (a int not null primary key); ==== Setup table on master but not on slave ====
insert into t1 values (1); [on master]
create table t2 (a int); CREATE TABLE t1 (a INT);
insert into t2 values (1); [on slave]
update t1, t2 set t1.a = 0 where t1.a = t2.a; DROP TABLE t1;
show tables; ==== Modify table on master ====
Tables_in_test [on master]
t1 INSERT INTO t1 VALUES (1);
select * from t1; ==== Verify error on slave ====
a [on slave]
0 Last_SQL_Error = Error 'Table 'test.t1' doesn't exist' on opening tables
drop table t1; ==== Clean up ====
insert into t1 values (1); STOP SLAVE;
SHOW SLAVE STATUS; [on master]
Slave_IO_State # DROP TABLE t1;
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 1153
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 1146
Last_Error Error 'Table 'test.t1' doesn't exist' on opening tables
Skip_Counter 0
Exec_Master_Log_Pos 941
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 1146
Last_SQL_Error Error 'Table 'test.t1' doesn't exist' on opening tables
drop table t1, t2;
# Test to see what slave says when master is updating a table it does # ==== Purpose ====
# not have #
# Verify that slave gives an error message if master updates a table
# that slave does not have.
#
# ==== Method ====
#
# Create a table on master, wait till it's on slave, remove it from
# slave. Then update the table on master.
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
source include/master-slave.inc; source include/master-slave.inc;
connection master; --echo ==== Setup table on master but not on slave ====
create table t1 (a int not null primary key); --echo [on master]
insert into t1 values (1); CREATE TABLE t1 (a INT);
create table t2 (a int);
insert into t2 values (1);
update t1, t2 set t1.a = 0 where t1.a = t2.a;
--echo [on slave]
sync_slave_with_master; sync_slave_with_master;
# t2 should not have been replicated DROP TABLE t1;
# t1 should have been properly updated
show tables;
select * from t1;
drop table t1;
--echo ==== Modify table on master ====
--echo [on master]
connection master; connection master;
insert into t1 values (1); INSERT INTO t1 VALUES (1);
--echo ==== Verify error on slave ====
--echo [on slave]
connection slave; connection slave;
# slave should have stopped because can't find table t1 # slave should have stopped because can't find table t1
--source include/wait_for_slave_sql_to_stop.inc --source include/wait_for_slave_sql_to_stop.inc
# see if we have a good error message: # see if we have a good error message:
--replace_column 7 # let $err= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
source include/show_slave_status.inc; --echo Last_SQL_Error = $err
--echo ==== Clean up ====
STOP SLAVE;
source include/wait_for_slave_to_stop.inc;
# cleanup --echo [on master]
connection master; connection master;
drop table t1, t2; DROP TABLE t1;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment