mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 07:35:32 +02:00
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 mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result: Updated result file. mysql-test/suite/rpl/t/rpl_row_inexist_tbl-slave.opt: Removed option file: it's not needed any more. mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test: Improved the test in the following ways: - The table t2 was not used to verify the property to test, so t2 has been removed. - Now printing only the relevant column from SHOW SLAVE STATUS - Added comments.
This commit is contained in:
parent
39cb0a07e0
commit
1bcd20bf7c
3 changed files with 43 additions and 72 deletions
|
|
@ -4,56 +4,18 @@ reset master;
|
|||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
create table t1 (a int not null primary key);
|
||||
insert into t1 values (1);
|
||||
create table t2 (a int);
|
||||
insert into t2 values (1);
|
||||
update t1, t2 set t1.a = 0 where t1.a = t2.a;
|
||||
show tables;
|
||||
Tables_in_test
|
||||
t1
|
||||
select * from t1;
|
||||
a
|
||||
0
|
||||
drop table t1;
|
||||
insert into t1 values (1);
|
||||
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 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;
|
||||
==== Setup table on master but not on slave ====
|
||||
[on master]
|
||||
CREATE TABLE t1 (a INT);
|
||||
[on slave]
|
||||
DROP TABLE t1;
|
||||
==== Modify table on master ====
|
||||
[on master]
|
||||
INSERT INTO t1 VALUES (1);
|
||||
==== Verify error on slave ====
|
||||
[on slave]
|
||||
Last_SQL_Error = Error 'Table 'test.t1' doesn't exist' on opening tables
|
||||
==== Clean up ====
|
||||
STOP SLAVE;
|
||||
[on master]
|
||||
DROP TABLE t1;
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
--replicate-ignore-table=test.t2
|
||||
|
|
@ -1,33 +1,43 @@
|
|||
# Test to see what slave says when master is updating a table it does
|
||||
# not have
|
||||
# ==== Purpose ====
|
||||
#
|
||||
# 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/master-slave.inc;
|
||||
|
||||
connection master;
|
||||
create table t1 (a int not null primary key);
|
||||
insert into t1 values (1);
|
||||
create table t2 (a int);
|
||||
insert into t2 values (1);
|
||||
update t1, t2 set t1.a = 0 where t1.a = t2.a;
|
||||
--echo ==== Setup table on master but not on slave ====
|
||||
--echo [on master]
|
||||
CREATE TABLE t1 (a INT);
|
||||
|
||||
--echo [on slave]
|
||||
sync_slave_with_master;
|
||||
# t2 should not have been replicated
|
||||
# t1 should have been properly updated
|
||||
show tables;
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo ==== Modify table on master ====
|
||||
--echo [on master]
|
||||
connection master;
|
||||
insert into t1 values (1);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
--echo ==== Verify error on slave ====
|
||||
--echo [on slave]
|
||||
connection slave;
|
||||
# slave should have stopped because can't find table t1
|
||||
--source include/wait_for_slave_sql_to_stop.inc
|
||||
# see if we have a good error message:
|
||||
--replace_column 7 #
|
||||
source include/show_slave_status.inc;
|
||||
let $err= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
|
||||
--echo Last_SQL_Error = $err
|
||||
|
||||
# cleanup
|
||||
--echo ==== Clean up ====
|
||||
STOP SLAVE;
|
||||
source include/wait_for_slave_to_stop.inc;
|
||||
|
||||
--echo [on master]
|
||||
connection master;
|
||||
drop table t1, t2;
|
||||
DROP TABLE t1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue