From 7117ee8ccc9e7bbac876871cb3bf31019a882b4c Mon Sep 17 00:00:00 2001 From: Jim Winstead Date: Mon, 18 May 2009 12:52:51 -0700 Subject: 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) --- client/mysqldump.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'client/mysqldump.c') diff --git a/client/mysqldump.c b/client/mysqldump.c index efcb1820be4..87b78cb41e1 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -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", -- cgit v1.2.1