From 18430e225e609ad91b55a04a2c69d3e9dfebc40c Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 Jun 2004 18:12:23 +0500 Subject: 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. client/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. --- client/mysqldump.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'client') 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 */ -- cgit v1.2.1