Bug #44423 | Default backup driver crashes server if error encountered. | ||
---|---|---|---|
Submitted: | 23 Apr 2009 9:57 | Modified: | 29 Jun 2009 14:39 |
Reporter: | Rafal Somla | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Backup | Severity: | S3 (Non-critical) |
Version: | 6.0 source | OS: | Any |
Assigned to: | Rafal Somla | CPU Architecture: | Any |
[23 Apr 2009 9:57]
Rafal Somla
[29 Apr 2009 17:55]
Rafal Somla
Here is a patch which seems to fix the problem. After applying it the server does not crash, but an error is signalled by the backup driver and reported by BACKUP statement. The trick is that in case an error is detected when reading table rows, the table should be closed. === modified file 'sql/backup/be_default.cc' --- sql/backup/be_default.cc 2009-03-25 13:21:35 +0000 +++ sql/backup/be_default.cc 2009-04-28 05:08:25 +0000 @@ -429,7 +430,10 @@ result_t Backup::get_data(Buffer &buf) locking_thd->kill_locking_thread(); } else if (last_read_res != 0) + { + end_tbl_read(); DBUG_RETURN(ERROR); + } else { /*
[8 May 2009 8:27]
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/73641 2808 Rafal Somla 2009-05-06 Bug #44423 - Default backup driver crashes server if error encountered. The problem happend if rnd_next() method called by default backup driver signalled error. In that case driver did not call ha_rnd_end() which should match ha_rnd_init() called at the beginning of a table scan. Note: To see the crash, comment out the call to end_tbl_read(), compile and run backup_default_debug test. @ mysql-test/suite/backup/t/backup_default_debug.test Add test scenario for this bug. @ sql/backup/be_default.cc - Add a call to end_tbl_read() in case rnd_next() signalls error. This calls ha_rnd_end() to match the initial ha_rnd_init(). - Add error injection point to simulate error from the rnd_next() call.
[8 May 2009 15:34]
Ingo Strüwing
Approved implied you follow my request sent by email.
[21 May 2009 17:41]
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/74727 2705 Rafal Somla 2009-05-18 Bug #44423 - Default backup driver crashes server if error encountered. The problem happend if rnd_next() method called by default backup driver signalled error. In that case driver did not call ha_rnd_end() which should match ha_rnd_init() called at the beginning of a table scan. Note: To see the crash, comment out the call to end_tbl_read(), compile and run backup_default_debug test. @ mysql-test/suite/backup/t/backup_default_debug.test Add test scenario for this bug. @ sql/backup/be_default.cc - Add a call to end_tbl_read() in case rnd_next() signalls error. This calls ha_rnd_end() to match the initial ha_rnd_init(). - Add error injection point to simulate error from the rnd_next() call.
[25 May 2009 5:38]
Rafal Somla
Pushed to mysql-6.0-backup tree. revid:rafal.somla@sun.com-20090518154118-4amu0b2va1nsxbwc
[3 Jun 2009 7:09]
Jørgen Løland
Merged to azalea June 2
[29 Jun 2009 14:39]
Paul DuBois
No changelog entry needed. Not in any released version.