Bug #28616 | UPDATE with JOIN + replicate-ignore-table ignores more than configured | ||
---|---|---|---|
Submitted: | 23 May 2007 11:51 | Modified: | 26 Aug 2007 5:00 |
Reporter: | Johan Idrén | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S1 (Critical) |
Version: | 4.1.10a,4.1.22 | OS: | Linux |
Assigned to: | CPU Architecture: | Any | |
Tags: | bfsm_2007_08_16 |
[23 May 2007 11:51]
Johan Idrén
[23 May 2007 12:17]
Johan Idrén
I was mistaken. This affects 5.0 as well. Does not affect 5.1.18 though.
[29 May 2007 10:38]
Ramil Kalimullin
As we have binary logging switched off for CREATE TABLE b (id int, value int); INSERT INTO b (id) VALUES (1),(2),(3); neither the table b creation nor inserts are loged thus we get on slave "Error 'Table 'test.b' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE a JOIN b ON a.id=b.id SET a.value=123', Error_code: 1146" and a.value is not updated. Expected result.
[8 Jun 2007 14:52]
Johan Idrén
I was a bit hasty when testing on 5.0. But this does affect 4.1.22. Removing 5.0.40 from Version field and setting back to Verified. Attaching new testcase.
[8 Jun 2007 14:53]
Johan Idrén
setup master & slave with settings needed to reproduce bug
Attachment: bug28616.sh (application/x-sh, text), 1.07 KiB.
[8 Jun 2007 14:54]
Johan Idrén
sql in practical file, same as in first post
Attachment: bug28616.sql (application/octet-stream, text), 233 bytes.
[8 Jun 2007 17:56]
Timothy Smith
In test case format: rpl_trs-slave.opt: --replicate-ignore-table=does.not_exist rpl_trs.test: source include/master-slave.inc; connection master; CREATE TABLE t1 (id int, value int); INSERT INTO t1 (id) VALUES (1),(2),(3); SET SQL_LOG_BIN=0; CREATE TABLE t2 (id int, value int); INSERT INTO t2 (id) VALUES (1),(2),(3); SET SQL_LOG_BIN=1; # Should fail on slave, and stop SQL thread UPDATE t1 JOIN t2 ON t1.id=t2.id SET t1.value=123; # Should not be executed on slave, because SQL thread is stopped INSERT INTO t1 (id, value) VALUES (4, 666); sync_slave_with_master; # Should not contain 4th row SELECT * FROM t1; DROP TABLE t1; connection master; DROP TABLE t1; DROP TABLE t2; stop slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; CREATE TABLE t1 (id int, value int); INSERT INTO t1 (id) VALUES (1),(2),(3); SET SQL_LOG_BIN=0; CREATE TABLE t2 (id int, value int); INSERT INTO t2 (id) VALUES (1),(2),(3); SET SQL_LOG_BIN=1; UPDATE t1 JOIN t2 ON t1.id=t2.id SET t1.value=123; INSERT INTO t1 (id, value) VALUES (4, 666); SELECT * FROM t1; id value 1 NULL 2 NULL 3 NULL DROP TABLE t1; DROP TABLE t1; DROP TABLE t2; Actual current results include a 4th row in the select statement (4 666).
[8 Jun 2007 18:06]
Timothy Smith
Confirmed that this bug does not affect 5.0 or 5.1.