Bug #50697 | Backup: storage engine with both native and consistent snapshot fails | ||
---|---|---|---|
Submitted: | 28 Jan 2010 18:57 | Modified: | 2 Mar 2010 1:25 |
Reporter: | Chuck Bell | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Backup | Severity: | S3 (Non-critical) |
Version: | 6.0.14 | OS: | Any |
Assigned to: | Chuck Bell | CPU Architecture: | Any |
[28 Jan 2010 18:57]
Chuck Bell
[28 Jan 2010 19:48]
Chuck Bell
There are a couple of things we need to do to fix this. a) the partitions_have_same_engine() method should *not* be checking for consistent snapshot capability b) if a storage engine has partitions and a native driver is present, the code should fall to the default driver selection c) if a storage engine has partitions and also supports consistent snapshot, the code should fall to the default driver selection d) changing the storage engine reference from partition to a specific storage engine should be governed by the above conditions
[28 Jan 2010 21:44]
Chuck Bell
I see that (a) must be rejected. The check inside the partition loop is necessary to preserve the correct storage engine reference.
[29 Jan 2010 16:22]
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/98667 2942 Chuck Bell 2010-01-29 BUG#50697 : Backup: storage engine with both native and consistent snapshot fails When a storage engine supports both consistent snapshot and has a native driver, the code incorrectly attempts to use the native driver. This results in a failure in the storage engine because the table being requested does not exist in the storage engine -- because it is managed by the partition storage engine. This patch corrects the behavior by adding a check for whether the table has partitions and using this to bypass the native backup check. This allows backup to use a storage engine that supports consistent snapshot when backing up partitioned tables. Otherwise, the default driver is used with the partition storage engine. @ mysql-test/suite/backup_engines/r/backup_partition.result Corrected result file. @ mysql-test/suite/backup_engines/t/backup_partition.test New test case. @ sql/backup/backup_info.cc Changed code to recognize when a storage engine has both a native driver and supports consistent snapshot.
[1 Feb 2010 16:19]
Ingo Strüwing
Approved pending changes. Pleas see email for details.
[3 Feb 2010 20:15]
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/99149 3081 Chuck Bell 2010-02-03 BUG#50697 : Backup: storage engine with both native and consistent snapshot fails When a storage engine supports both consistent snapshot and has a native driver, the code incorrectly attempts to use the native driver for a table that has partitions defined. This results in a failure in the storage engine because the table being requested does not exist in the storage engine -- because it is managed by the partition storage engine. This patch corrects the behavior by adding a check for whether the table has partitions and using this to bypass the native backup check. This allows backup to use a storage engine that supports consistent snapshot when backing up partitioned tables. Otherwise, the default driver is used with the partition storage engine. @ mysql-test/suite/backup_engines/r/backup_partition.result Corrected result file. @ mysql-test/suite/backup_engines/t/backup_partition.test New test case. @ sql/backup/backup_info.cc Changed code to recognize when a storage engine has both a native driver and supports consistent snapshot.
[3 Feb 2010 20:33]
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/99157 3826 Chuck Bell 2010-02-03 BUG#50697 : Backup: storage engine with both native and consistent snapshot fails When a storage engine supports both consistent snapshot and has a native driver, the code incorrectly attempts to use the native driver for a table that has partitions defined. This results in a failure in the storage engine because the table being requested does not exist in the storage engine -- because it is managed by the partition storage engine. This patch corrects the behavior by adding a check for whether the table has partitions and using this to bypass the native backup check. This allows backup to use a storage engine that supports consistent snapshot when backing up partitioned tables. Otherwise, the default driver is used with the partition storage engine. @ mysql-test/suite/backup_engines/r/backup_partition.result Corrected result file. @ mysql-test/suite/backup_engines/t/backup_partition.test New test case. @ sql/backup/backup_info.cc Changed code to recognize when a storage engine has both a native driver and supports consistent snapshot.
[3 Feb 2010 20:34]
Chuck Bell
Patch pushed to mysql-next-mr-backup, mysql-backup-backport, and merged into mysql-6.0-backup.
[20 Feb 2010 9:19]
Bugs System
Pushed into 6.0.14-alpha (revid:ingo.struewing@sun.com-20100218152520-s4v1ld76bif06eqn) (version source revid:anurag.shekhar@sun.com-20100204092530-ci0u47ufmi3vzfs0) (merge vers: 6.0.14-alpha) (pib:16)
[2 Mar 2010 1:25]
Paul DuBois
Noted in 6.0.14 changelog. When a storage engine supports both consistent snapshot and has a native driver, the BACKUP DATABASE code incorrectly attempted to use the native driver for a table that has partitions defined.