diff options
author | unknown <gshchepa/uchum@gleb.loc> | 2007-07-18 19:14:48 +0500 |
---|---|---|
committer | unknown <gshchepa/uchum@gleb.loc> | 2007-07-18 19:14:48 +0500 |
commit | 2bfe84d434104fdc1a9b69c62a237e01043f865f (patch) | |
tree | f87700a53644df3e2cfd53ad2c687d3bebdd71b8 /client/mysqldump.c | |
parent | 85603b2e0b6b51c57de7019f451461e676c458de (diff) | |
download | mariadb-git-2bfe84d434104fdc1a9b69c62a237e01043f865f.tar.gz |
Fixed bug #28524.
For each view the mysqldump utility creates a temporary table
with the same name and the same columns as the view
in order to satisfy views that depend on this view.
After the creation of all tables, mysqldump drops all
temporary tables and creates actual views.
However, --skip-add-drop-table and --compact flags disable
DROP TABLE statements for those temporary tables. Thus, it was
impossible to create the views because of existence of the
temporary tables with the same names.
client/mysqldump.c:
Fixed bug #28524.
The mysqldump utility has been modified to unconditionally drop
temporary tables before the creation of views.
mysql-test/t/mysqldump.test:
Updated test case for bug #28524 and updated result of previous tests.
mysql-test/r/mysqldump.result:
Updated test case for bug #28524 and updated result of previous tests.
Diffstat (limited to 'client/mysqldump.c')
-rw-r--r-- | client/mysqldump.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c index 1a024a923f5..f72cb0171e1 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -3673,10 +3673,9 @@ static my_bool get_view_structure(char *table, char* db) result_table); check_io(sql_file); } + fprintf(sql_file, "/*!50001 DROP TABLE %s*/;\n", opt_quoted_table); if (opt_drop) { - fprintf(sql_file, "/*!50001 DROP TABLE IF EXISTS %s*/;\n", - opt_quoted_table); fprintf(sql_file, "/*!50001 DROP VIEW IF EXISTS %s*/;\n", opt_quoted_table); check_io(sql_file); |