1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

The output of mysqldump --tab for views included a DROP TABLE statement

without the IF EXISTS qualifier even though no temporary table is created
as for all-in-one dumps including views. (Bug #37377)
This commit is contained in:
Jim Winstead
2009-05-18 12:52:51 -07:00
parent b6ff695231
commit caba34a1b4
3 changed files with 49 additions and 16 deletions

View File

@ -4802,7 +4802,8 @@ 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);
/* Table might not exist if this view was dumped with --tab. */
fprintf(sql_file, "/*!50001 DROP TABLE IF EXISTS %s*/;\n", opt_quoted_table);
if (opt_drop)
{
fprintf(sql_file, "/*!50001 DROP VIEW IF EXISTS %s*/;\n",