Bug #11773 mysqldump includes DROP TABLE on a view
Submitted: 6 Jul 2005 11:34 Modified: 12 Jul 2005 10:13
Reporter: Andrey Hristov Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: mysqldump Command-line Client Severity:S3 (Non-critical)
Version:5.0 OS:
Assigned to: Magnus Blåudd CPU Architecture:Any

[6 Jul 2005 11:34] Andrey Hristov
The dump create by mysqldump on a database which includes a view includes a DROP TABLE statement to drop the view. This statement leads to an warning.

Here comes a dump
-- Table structure for table `some_view`


-- View structure for view `some_view`

DROP VIEW IF EXISTS `some_view`;
CREATE ALGORITHM=UNDEFINED VIEW `view_test`.`some_view` AS select 1 AS `1`;

How to repeat:
mysql> create database view_test;

mysql> create view some_view as select 1 from dual;

mysql> quit

#mysqldump view_test > view_test.dump
[12 Jul 2005 10:13] Magnus Blåudd
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at

Additional info:

In the latest version a dummy table is created to allow reloading of views dependent on other view. The DROP TABLE IF EXISTS and DROP VIEW IF EXISTS should be there.
No warning returned when test case s run.