Bug #35964 | mysqldump fails to dump a malformed view: SHOW CREATE VIEW fails. | ||
---|---|---|---|
Submitted: | 10 Apr 2008 16:21 | Modified: | 10 Apr 2008 18:15 |
Reporter: | Lee Wood | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: mysqldump Command-line Client | Severity: | S4 (Feature request) |
Version: | 5.0.33, 5.0, 5.1, 6.0 BK | OS: | FreeBSD |
Assigned to: | CPU Architecture: | Any |
[10 Apr 2008 16:21]
Lee Wood
[10 Apr 2008 16:29]
Lee Wood
The views were broken when I renamed all the tables. So either RENAME TABLE should update any views that reference the renamed table, or mysqldump shouldn't break when it encounters a broken view.
[10 Apr 2008 18:15]
Sveta Smirnova
Thank you for the reasonable feature request. In my opinion problem is only with mysqldump here as according to http://dev.mysql.com/doc/refman/5.1/en/create-view.html: "The view definition is “frozen” at creation time, so changes to the underlying tables afterward do not affect the view definition. For example, if a view is defined as SELECT * on a table, new columns added to the table later do not become part of the view." So only some flag to mysqldump can be added to proceed such invalid views
[27 Apr 2016 12:25]
Mauro Molinari
This is a real problem. When you use mysqldump to take a "picture" of a database (either for backup purposes or to initialize a replication) you may want to take the picture "as is", so with broken view if there are any. It would be extremely useful if mysqldump had an option to let it dump and restore views (and/or functions, triggers, etc.) even if they are broken. This is not to say "there's no problem", but "please clone my data, even if they have problems" because there are scenarios in which this is what you actually want. I can always fix errors at a later time, if I can go on, while I'm surely stuck if I can't.