diff options
author | bar@bar.intranet.mysql.r18.ru <> | 2004-06-07 18:12:23 +0500 |
---|---|---|
committer | bar@bar.intranet.mysql.r18.ru <> | 2004-06-07 18:12:23 +0500 |
commit | 0860e3bfe4d510add0bdad27e4e91369af373b45 (patch) | |
tree | 4b8da2869f173de296e9a4d91ca8b7d1bcd8e898 /client | |
parent | acbb3096b2c057c1ccc3d8bdc59a41ffeb851087 (diff) | |
download | mariadb-git-0860e3bfe4d510add0bdad27e4e91369af373b45.tar.gz |
mysqldump.c:
Dump could fail to load because of --default-character-set command line option.
More safe dump is now produces, --default-character-set doesn't matter.
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqldump.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c index 2b40264325f..9c64e2d1b3a 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -394,7 +394,11 @@ static void write_header(FILE *sql_file, char *db_name) mysql_get_server_info(&mysql_connection)); } if (opt_set_charset) - fprintf(sql_file,"\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT, CHARACTER_SET_CLIENT=%s */;\n",default_charset); + fprintf(sql_file, +"\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;" +"\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;" +"\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;" +"\n/*!40101 SET NAMES %s */;\n",default_charset); if (!path) { fprintf(md_result_file,"\ @@ -425,7 +429,9 @@ static void write_footer(FILE *sql_file) } if (opt_set_charset) fprintf(sql_file, - "/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n"); +"/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n" +"/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n" +"/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n"); fputs("\n", sql_file); } } /* write_footer */ |