Bug #4680 | Failed drop database causes slave to lose data consistency | ||
---|---|---|---|
Submitted: | 21 Jul 2004 18:13 | Modified: | 31 Aug 2005 19:45 |
Reporter: | Timothy Smith | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S2 (Serious) |
Version: | all | OS: | Any (all) |
Assigned to: | Bugs System | CPU Architecture: | Any |
[21 Jul 2004 18:13]
Timothy Smith
[9 Aug 2004 13:46]
Guilhem Bichot
Solution to implement: - log DROP DATABASE with its non-zero error code - when slave executes it: as the master's error code is non-zero, do not try to rmdir the directory, just delete all its files. Then master and slave will be consistent. This is however not easy to code, as it means the mysql_rm_db() must interrupt itself based on the information in Query_log_event.
[4 Aug 2005 0:08]
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/internals/27872
[19 Aug 2005 3:39]
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/internals/28499
[27 Aug 2005 23:08]
Alexander Pachev
Fixed in versions 4.1.15 and 5.0.12 by adding logging of DROP TABLES for each table in the database we cannot rmdir the database directory because of the extra files in it.
[31 Aug 2005 19:45]
Paul DuBois
Noted in 4.1.15, 5.0.12 changelogs.