Bug #15699 | multi-table update does not work with replicate-wild-do-table | ||
---|---|---|---|
Submitted: | 13 Dec 2005 4:38 | Modified: | 2 Feb 2006 4:51 |
Reporter: | Timothy Smith | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S2 (Serious) |
Version: | 4.1.17, 5.0.17 | OS: | Linux (linux, any) |
Assigned to: | Andrei Elkin | CPU Architecture: | Any |
[13 Dec 2005 4:38]
Timothy Smith
[13 Dec 2005 4:42]
Timothy Smith
Sorry, I forgot to include the .sql files: 17:41 ~/m/csc/7606$ cat bug1.sql create database a; create database b; use b; create table x (id int); create table y (id int); insert into x values (1), (2), (3), (4), (5); insert into y select id + 3 from x; 17:41 ~/m/csc/7606$ cat bug2.sql show databases; show slave status\G 17:41 ~/m/csc/7606$ cat bug3.sql use b; update x join y using (id) set x.id = 0;
[4 Jan 2006 9:32]
Joakim Ahlen
Hi, I am getting the same bug i think. Although using a slightly more complicated query involving spatial extensions and the use of the DATABASE()-function which maybe could cause the binlog to behave unexpectedly, i think the error has to do with the use of left join in an update query rather than any of these extra features. Query: UPDATE item LEFT JOIN content_db.db ON mysql_db=DATABASE() SET boundingbox=GeomFromText(CONCAT('POLYGON((',item.y1 / 10,' ',item.x1 / 10,', ',item.y1 / 10,' ',item.x2 / 10,', ',item.y2 / 10,' ',item.x2 / 10,', ',item.y2 / 10,' ',item.x1 / 10,', ',item.y1 / 10,' ',item.x1 / 10,'))'), 2400) WHERE coordinate_system_id=1 AND type_id=2 or type_id=3; The use of the DATABASE()-function is because this query is always run with the mysql command line client with: mysql -uxx -pxx my_database < query.sql after which the DATABASE()-function will return "my_database". Anyways, a SHOW SLAVE STATUS on the slave returns the following in the Last_error column: Error 'Table 'customer_82_823.item' doesn't exist' on query. Default database: 'customer_82_823'. Query: 'UPDATE item LEFT JOIN content_db.db ON mysql_db=DATABASE() SET boundingbox=GeomFromText(CONCAT('POLYGON((',item.y1 / 10,' ',item.x1 / 10,', ',item.y1 / 10,' ',item.x2 / 10,', ',item.y2 / 10,' ',item.x2 / 10,', ',item.y2 / 10,' ',item.x1 / 10,', ',item.y1 / 10,' ',item.x1 / 10,'))'), 2400) WHERE coordinate_system_id=1 AND type_id=2 or type_id=3' The replicate-do-statements are: Replicate_Do_Table: content_db.session Replicate_Wild_Do_Table: partner_99.%,customer_99_%.% Replicate_Wild_Ignore_Table: %.% Regards Joakim Ahlén
[4 Jan 2006 10:53]
Joakim Ahlen
Sorry, i forgot to add that i am using 5.0.15 on the master and 5.0.16 on the slave. Both running on windows. Is there any chance of getting a fix for this bug in the next release?
[5 Jan 2006 13:44]
Andrei Elkin
Taking upon speaking to Lars.
[10 Jan 2006 21:34]
Andrei Elkin
Reliably reproducible in my env with 5.0.19. To be continued.
[14 Jan 2006 20:07]
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/1088
[23 Jan 2006 16:03]
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/1509
[24 Jan 2006 13:51]
Andrei Elkin
Fixed in mysql-5.0.18
[25 Jan 2006 15:29]
Lars Thalmann
This is actually fixed in 5.0.19 (and not 5.0.18)!
[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 10:50]
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/1665
[26 Jan 2006 10:56]
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/1666
[26 Jan 2006 14:50]
Andrei Elkin
Mats approved.
[26 Jan 2006 15:00]
Andrei Elkin
Fixed in 4.1.18, 5.0.19
[2 Feb 2006 4:51]
Mike Hillyer
Documented in 4.1.18 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>