Bug #16487 table ignores fail with multiple tables in updates
Submitted: 13 Jan 2006 16:35 Modified: 27 Jan 2006 14:37
Reporter: Domas Mituzas Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S1 (Critical)
Version:4.1.16, 5.0.18 OS:Linux (Linux)
Assigned to: Andrei Elkin

[13 Jan 2006 16:35] Domas Mituzas
Description:
--replicate-ignore-table and --replicate-wild-ignore-table do not ignore queries which have multiple partly ignored tables inside.

How to repeat:
Start mysql slave with --replicate-ignore-table test.testignore, then on master:

CREATE TABLE test.t1 (a int);
CREATE TABLE test.testignore (a int);
UPDATE test.t1 NATURAL JOIN test.testignore SET t1.a=5;

[ERROR] Slave: Error 'Table 'test.testignore' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 NATURAL JOIN testignore SET t1.a=5', Error_code: 1146

UPDATE t1 NATURAL JOIN testignore SET testignore.a=5;

[ERROR] Slave: Error 'Table 'test.testignore' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 NATURAL JOIN testignore SET testignore.a=5', Error_code: 1146

Suggested fix:
obey ignore rules for all tables in query.
[16 Jan 2006 9:44] Lars Thalmann
See also BUG#15699
[25 Jan 2006 15:14] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/1612
[25 Jan 2006 15:25] Lars Thalmann
This is fixed with the patch to BUG#15699.

I will close this report when the test case for this bug report has been pushed.
[25 Jan 2006 16:14] Elliot Murphy
OK to push.
[25 Jan 2006 16:38] Lars Thalmann
Test case pushed (5.0.19).  Fix pushed for other bug report as noted above.
[26 Jan 2006 0:42] Mike Hillyer
Documented in 5.0.19 changelog:

  <listitem>
        <para>
          The <literal>--replicate-do</literal> and
          <literal>--replicate-ignore</literal> options were not being
          enforced on multi-table statements. (Bug #15699, Bug #16487)
        </para>
      </listitem>
[26 Jan 2006 14:51] Andrei Elkin
Mats approved.
[26 Jan 2006 15:00] Andrei Elkin
Fixed in 4.1.18, 5.0.19
[27 Jan 2006 14:37] Paul Dubois
I copied Mike's changelog entry to the 4.1.18 section.