Bug #69680 | Auto_inc value not properly generated with RBR and auto_inc column only on slave | ||
---|---|---|---|
Submitted: | 5 Jul 2013 17:44 | Modified: | 15 Jan 2014 7:55 |
Reporter: | Ovais Tariq | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Row Based Replication ( RBR ) | Severity: | S3 (Non-critical) |
Version: | 5.5.32 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[5 Jul 2013 17:44]
Ovais Tariq
[8 Jul 2013 10:49]
MySQL Verification Team
Hello Ovais, Thank you for the bug report and the test case. Verified as described. Thanks, Umesh
[8 Jul 2013 10:51]
MySQL Verification Team
// Duplicate key error on 5.5.32, 5.6.12 [ERROR] Slave SQL: Could not execute Write_rows event on table test.tbl; Duplicate entry '0' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log master-bin.000001, end_log_pos 961, Error_code: 1062
[8 Jul 2013 10:52]
MySQL Verification Team
mtr test case
Attachment: 69680.test (application/octet-stream, text), 1007 bytes.
[15 Jan 2014 7:55]
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
[15 Jan 2014 7:55]
Jon Stephens
Documented fix in the 5.5.37, 5.6.17, and 5.7.4 changelogs as follows: When using row-based replication, an additional auto-increment column on the slave version of a table was not updated correctly; a zero was inserted instead. Closed.
[27 Mar 2014 13:44]
Laurynas Biveinis
5.5$ bzr log -r 4579 -n0 ------------------------------------------------------------ revno: 4579 [merge] committer: Luis Soares <luis.soares@oracle.com> branch nick: mysql-5.5 timestamp: Thu 2014-01-09 12:53:49 +0000 message: BUG#17066269 - Automerged from bug branch into latest mysql-5.5. - Fixed trailing whitespaces. - Updated the copyright notice year to 2014. ------------------------------------------------------------ revno: 4560.1.1 committer: Luis Soares <luis.soares@oracle.com> branch nick: mysql-5.5 timestamp: Wed 2013-12-18 11:17:24 +0000 message: BUG#17066269: AUTO_INC VALUE NOT PROPERLY GENERATED WITH RBR AND AUTO_INC COLUMN ONLY ON SLAVE In RBR, if the slave's table as one additional auto_inc column, then, it will insert the value 0 instead of generating the next auto_inc number. We fix this by checking that if an auto_inc extra column exists, when compared to column data of the row event, we explicitly set it to NULL and flag the engine that a nulled auto_inc column will be inserted.