Bug #51987 | revoke privileges logs wrong error code | ||
---|---|---|---|
Submitted: | 12 Mar 2010 11:45 | Modified: | 21 Jun 2010 0:56 |
Reporter: | Axel Schwenke | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S3 (Non-critical) |
Version: | 5.1.40 | OS: | Any |
Assigned to: | Luis Soares | CPU Architecture: | Any |
[12 Mar 2010 11:45]
Axel Schwenke
[15 Mar 2010 9:04]
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/103184 3400 Luis Soares 2010-03-15 BUG#51987: revoke privileges logs wrong error code A failed REVOKE statement is logged with error=0, thus causing the slave to stop. The slave should not stop as this was an expected error. Given that the execution failed on the master as well the error code should be logged so that the slave can replay the statement, get an error and compare with the master's execution outcome. If errors match, then slave can proceed with replication, as the error it got, when replaying the statement, was expected. In this particular case, the bug surfaces because the error code is pushed to the THD diagnostics area after writing the event to the binary log. Therefore, it would be logged with the THD diagnostics area clean, hence its error code would not contain the correct code. We fix this by moving the error reporting ahead of the call to the routine that writes the event to the binary log.
[22 Mar 2010 9:51]
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/103946 3415 Luis Soares 2010-03-22 BUG#51987: revoke privileges logs wrong error code A failed REVOKE statement is logged with error=0, thus causing the slave to stop. The slave should not stop as this was an expected error. Given that the execution failed on the master as well the error code should be logged so that the slave can replay the statement, get an error and compare with the master's execution outcome. If errors match, then slave can proceed with replication, as the error it got, when replaying the statement, was expected. In this particular case, the bug surfaces because the error code is pushed to the THD diagnostics area after writing the event to the binary log. Therefore, it would be logged with the THD diagnostics area clean, hence its error code would not contain the correct code. We fix this by moving the error reporting ahead of the call to the routine that writes the event to the binary log.
[16 Apr 2010 1:12]
Luis Soares
Queued in mysql-5.1-bugteam and mysql-pe: - http://pb2.norway.sun.com/web.py?template=push_details&push=1172855 - http://pb2.norway.sun.com/web.py?template=push_details&push=1172849
[5 May 2010 15:07]
Bugs System
Pushed into 5.1.47 (revid:joro@sun.com-20100505145753-ivlt4hclbrjy8eye) (version source revid:kristofer.pettersson@sun.com-20100416145616-vdcdyz9eu7j86lp7) (merge vers: 5.1.47) (pib:16)
[6 May 2010 12:17]
Jon Stephens
Documented bugfix in the 5.1.47 changelog as follows: The failure of a REVOKE statement was logged with the wrong error code, causing replication slaves to stop even when the failure was expected on the master. NM - waiting for post-5.1 merges.
[28 May 2010 6:02]
Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100524190136-egaq7e8zgkwb9aqi) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (pib:16)
[28 May 2010 6:30]
Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100524190941-nuudpx60if25wsvx) (version source revid:alik@sun.com-20100422150658-fkhgnwwkyugtxrmu) (merge vers: 6.0.14-alpha) (pib:16)
[28 May 2010 6:58]
Bugs System
Pushed into 5.5.5-m3 (revid:alik@sun.com-20100524185725-c8k5q7v60i5nix3t) (version source revid:alexey.kopytov@sun.com-20100429203306-tg0wz4y2xyx8edrl) (merge vers: 5.5.5-m3) (pib:16)
[3 Jun 2010 6:12]
Jon Stephens
Also documented in the 5.5.5 and 6.0.14 changelogs; closed.
[17 Jun 2010 12:05]
Bugs System
Pushed into 5.1.47-ndb-7.0.16 (revid:martin.skold@mysql.com-20100617114014-bva0dy24yyd67697) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 12:50]
Bugs System
Pushed into 5.1.47-ndb-6.2.19 (revid:martin.skold@mysql.com-20100617115448-idrbic6gbki37h1c) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 13:33]
Bugs System
Pushed into 5.1.47-ndb-6.3.35 (revid:martin.skold@mysql.com-20100617114611-61aqbb52j752y116) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)