Bug #67504 | Duplicate error in replication with slave triggers and auto increment | ||
---|---|---|---|
Submitted: | 7 Nov 2012 16:01 | Modified: | 6 May 2013 9:00 |
Reporter: | Raghavendra Prabhu | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S2 (Serious) |
Version: | 5.5.28, 5.1.67, 5.7.0, 5.5.29 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | 1062, Auto-increment, duplicate, replication, trigger |
[7 Nov 2012 16:01]
Raghavendra Prabhu
[7 Nov 2012 18:49]
Sveta Smirnova
Thank you for the report. Which exact version of MySQL server do you use?
[7 Nov 2012 22:20]
Raghavendra Prabhu
This was tested on MySQL 5.5.28
[8 Nov 2012 8:48]
Valeriy Kravchuk
Looks similar to bug #61548.
[8 Nov 2012 18:16]
Sveta Smirnova
Thank you for the feedback. Verified as described. Yes, this looks very similar to bug #61548, but since it is still different I verify it separately.
[3 Jan 2013 17:59]
Raghavendra Prabhu
Has this bug been fixed since the related bug - 61548 has been fixed in 5.5.30?
[10 Jan 2013 18:39]
Sveta Smirnova
Not, this bug is still not fixed.
[6 May 2013 9:00]
Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at http://dev.mysql.com/doc/en/installing-source.html
[6 May 2013 9:01]
Jon Stephens
Fixed in 5.7. Documented in the 5.7.2 changelog as follows: When the master had more than one table with an auto-increment column, *and* the slave ignored at least one of these tables due to --replicate-ignore-table rules, *but* at least one them was replicated, even so--the replicated table or tables having at least one trigger updating one or more tables existing only on the slave--updates to any of the auto-increment tables on the master caused replication to fail. Closed.
[28 Jul 2014 11:43]
Laurynas Biveinis
$ bzr log -r 5345 ------------------------------------------------------------ revno: 5345 committer: Venkatesh Duggirala<venkatesh.duggirala@oracle.com> branch nick: mysql-trunk timestamp: Wed 2013-03-20 11:20:47 +0530 message: BUG#15850951-DUPLICATE ERROR IN REPLICATION WITH SLAVE TRIGGERS AND AUTO INCREMENT Problem:On filtered slaves, IRU(IntVar, RandVar and UserVar) events are getting executed twice in the span of one query execution time if the query involves in firing a 'AFTER' trigger. Analysis: IRU events are getting cleaned up at the end of the query execution. If a query, with IRU events, involves in firing a 'AFTER' trigger and if the 'AFTER' trigger contains DML queries, the same IRU events are getting executed once again. This result in unexpected results while inserting tuples in tables which has auto_increment columns. Fix: Delete these IRU events immediately after it gets exectued for the first time.