Bug #22054 | MySQL Dump fails on invalid view | ||
---|---|---|---|
Submitted: | 6 Sep 2006 15:39 | Modified: | 24 Jul 2008 17:24 |
Reporter: | Eric Brunson | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Command-line Clients | Severity: | S2 (Serious) |
Version: | 5.0.24 | OS: | Any (All) |
Assigned to: | CPU Architecture: | Any | |
Tags: | Backup, mysqldump, VIEW |
[6 Sep 2006 15:39]
Eric Brunson
[6 Sep 2006 15:43]
Eric Brunson
Is it inappropriate to update the view definition when a change is made to an underlying table?
[5 Jan 2007 16:24]
MySQL Verification Team
Thank you for the bug report.
[20 Dec 2007 19:59]
Trudy Pelzer
Workaround is to drop and recreate views when altering underlying table(s).
[20 Dec 2007 20:58]
Eric Brunson
Trudy, you are missing the point of the bug report. The bug is not that the views are wrong, the bug is that a mysqldump will fail after the view is invalid. Please feel free to re-read the original bug report.
[24 Jul 2008 17:24]
Jim Winstead
This works exactly as intended. If there is an invalid view, mysqldump will exit with an error. If you aren't checking for error exit codes in your backup scripts, you have larger problems. If you specify --force, the view definition will be included in the dump file (as a comment) and the error will not cause the dump to be stopped, but mysqldump will still exit with an error code when the rest of the dump has been completed.