diff options
author | Tatiana A. Nurnberg <azundris@mysql.com> | 2009-02-19 18:22:28 +0100 |
---|---|---|
committer | Tatiana A. Nurnberg <azundris@mysql.com> | 2009-02-19 18:22:28 +0100 |
commit | 99d1cdcb110ba1960be5c6f1b79a31adfdb3187f (patch) | |
tree | 623c8eda104fd7fa8ebd094ff844832f714692ee /client/mysqldump.c | |
parent | e89fddc63684301a0e958fe54a5917fdbad56877 (diff) | |
parent | 4a3f5b2b20f9ec9618b00ea4dd77000127841ec5 (diff) | |
download | mariadb-git-99d1cdcb110ba1960be5c6f1b79a31adfdb3187f.tar.gz |
manual merge
Diffstat (limited to 'client/mysqldump.c')
-rw-r--r-- | client/mysqldump.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c index 44c53a0e4c2..7b0e7aa9906 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -1475,7 +1475,8 @@ static int connect_to_db(char *host, char *user,char *passwd) DB_error(&mysql_connection, "when trying to connect"); DBUG_RETURN(1); } - if (mysql_get_server_version(&mysql_connection) < 40100) + if ((mysql_get_server_version(&mysql_connection) < 40100) || + (opt_compatible_mode & 3)) { /* Don't dump SET NAMES with a pre-4.1 server (bug#7997). */ opt_set_charset= 0; @@ -2421,11 +2422,11 @@ static uint get_table_structure(char *table, char *db, char *table_type, row= mysql_fetch_row(result); - fprintf(sql_file, - "SET @saved_cs_client = @@character_set_client;\n" - "SET character_set_client = utf8;\n" + fprintf(sql_file, (opt_compatible_mode & 3) ? "%s;\n" : + "/*!40101 SET @saved_cs_client = @@character_set_client */;\n" + "/*!40101 SET character_set_client = utf8 */;\n" "%s;\n" - "SET character_set_client = @saved_cs_client;\n", + "/*!40101 SET character_set_client = @saved_cs_client */;\n", row[1]); check_io(sql_file); |