1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fix for BUG#2983 "If statement was killed on master, slave errors despite replicate-wild-ignore-t"

We introduce a new function mysql_test_parse_for_slave().
If the slave sees that the query got a really bad error on master
(killed e.g.), then it calls this function to know if this query
can be ignored because of replicate-*-table rules (do not worry
about replicate-*-db rules: they are checked so early that they have
no bug). If the answer is yes, it skips the query and continues. If
it's no, then it stops and say "fix your slave data manually" (like it
did before this change).
This commit is contained in:
guilhem@mysql.com
2004-03-11 17:38:19 +01:00
parent b36b25673e
commit 69517b22a1
7 changed files with 182 additions and 85 deletions

View File

@ -13,3 +13,28 @@ Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Lo
show tables like 't1';
Tables_in_test (t1)
drop table t1;
select get_lock('crash_lock%20C', 10);
get_lock('crash_lock%20C', 10)
1
create table t2 (a int primary key);
insert into t2 values(1);
create table t3 (id int);
insert into t3 values(connection_id());
update t2 set a = a + 1 + get_lock('crash_lock%20C', 10);
select (@id := id) - id from t3;
(@id := id) - id
0
kill @id;
drop table t2,t3;
Server shutdown in progress
show binlog events from 79;
Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.001 79 Query 1 79 use `test`; create table t1 (a int primary key)
master-bin.001 149 Query 1 149 use `test`; insert into t1 values (1),(1)
master-bin.001 213 Query 1 213 use `test`; drop table t1
master-bin.001 261 Query 1 261 use `test`; create table t2 (a int primary key)
master-bin.001 331 Query 1 331 use `test`; insert into t2 values(1)
master-bin.001 390 Query 1 390 use `test`; create table t3 (id int)
master-bin.001 449 Query 1 449 use `test`; insert into t3 values(connection_id())
master-bin.001 522 Query 1 522 use `test`; update t2 set a = a + 1 + get_lock('crash_lock%20C', 10)
master-bin.001 613 Query 1 613 use `test`; drop table t2,t3