diff options
author | Guilhem Bichot <guilhem@mysql.com> | 2009-08-12 15:44:34 +0200 |
---|---|---|
committer | Guilhem Bichot <guilhem@mysql.com> | 2009-08-12 15:44:34 +0200 |
commit | 333284dadafc70b89fa719120de36ff3c7c9bd4f (patch) | |
tree | 5fdae14ec96fd61b574fe1c8b2d62d304114c53c /client/mysqldump.c | |
parent | 5783c38234aaa24fe42647ca9c2cb6dfcb687af3 (diff) | |
parent | 7beafedbc829929257f40b762c4d127406ac87d7 (diff) | |
download | mariadb-git-333284dadafc70b89fa719120de36ff3c7c9bd4f.tar.gz |
merge of 5.1-main into mysql-trunk.
Changes to ha_innodb.cc are not propagated to plugin, they will come back
via Oracle/Innobase if needed.
Diffstat (limited to 'client/mysqldump.c')
-rw-r--r-- | client/mysqldump.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c index 6d45d901b33..cac27424d6e 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -3137,6 +3137,12 @@ static void dump_table(char *table, char *db) dynstr_append_checked(&query_string, filename); dynstr_append_checked(&query_string, "'"); + dynstr_append_checked(&query_string, " /*!50138 CHARACTER SET "); + dynstr_append_checked(&query_string, default_charset == mysql_universal_client_charset ? + my_charset_bin.name : /* backward compatibility */ + default_charset); + dynstr_append_checked(&query_string, " */"); + if (fields_terminated || enclosed || opt_enclosed || escaped) dynstr_append_checked(&query_string, " FIELDS"); @@ -4810,7 +4816,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", |