summaryrefslogtreecommitdiff
path: root/client/mysqldump.c
diff options
context:
space:
mode:
authortnurnberg@mysql.com <>2006-05-31 13:36:28 +0200
committertnurnberg@mysql.com <>2006-05-31 13:36:28 +0200
commit8c243736680ae74209e7e862c8266b2864e6a034 (patch)
treefa70a8b7e428338d25cc0677bf0be4d778caed8a /client/mysqldump.c
parent15f763af84f1ae216937e5c64b021728d93a6905 (diff)
downloadmariadb-git-8c243736680ae74209e7e862c8266b2864e6a034.tar.gz
Bug#18462: mysqldump does not dump view structures correctly
(The above problem only occurs with -T -- create a separate file for each table / view.) This ChangeSet results in correct output of view- information while omitting the information for the view's stand-in table. The rationale is that with -T, the user is likely interested in transferring part of a database, not the db in its entirety (that would be difficult as replay order is obscure, the files being named for the table/view they contain rather than getting a sequence number).
Diffstat (limited to 'client/mysqldump.c')
-rw-r--r--client/mysqldump.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c
index ee6d7b9d12b..bc41ebb486f 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -1554,6 +1554,9 @@ static uint get_table_structure(char *table, char *db, char *table_type,
}
mysql_free_result(result);
+ if (path)
+ my_fclose(sql_file, MYF(MY_WME));
+
was_views= 1;
DBUG_RETURN(0);
}