Bug #21668 | mysqldump writes redundant DROP TABLEs for views | ||
---|---|---|---|
Submitted: | 16 Aug 2006 1:18 | Modified: | 16 Aug 2006 19:03 |
Reporter: | Lachlan Mulcahy | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: mysqldump Command-line Client | Severity: | S3 (Non-critical) |
Version: | 5.0.25-bk | OS: | Any (Any) |
Assigned to: | CPU Architecture: | Any |
[16 Aug 2006 1:18]
Lachlan Mulcahy
[16 Aug 2006 1:56]
Bob Field
There is a certain logic to it. It makes sure there's no table or view by that name, then temporarily creates a table with a definition matching the view, and then at the very end of the dumpfile drops this table and creates the real view. This avoids any chicken&egg problems associated with creating a view prior to the creating of any tables on which it might depend, and therefore while some of the DROP statements might appear superfluous I can easily see scenarios which would fail without them, particularly involving restarting an aborted import of a dumpfile where the placeholder table was never replaced with the actual view.