From 3c5b16eebed40cf72d9deaa800229266bdf75f9a Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 25 Feb 2005 18:12:53 +0400 Subject: [PATCH] mysqldump.c: Bug#7997 Add implicit --skip-set-charset when mysqldump from 4.0 server w/ 4.1 client client/mysqldump.c: Bug#7997 Add implicit --skip-set-charset when mysqldump from 4.0 server w/ 4.1 client --- client/mysqldump.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/mysqldump.c b/client/mysqldump.c index c2c44024cf4..2c0bdf9a7a9 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -861,6 +861,11 @@ static int dbConnect(char *host, char *user,char *passwd) DBerror(&mysql_connection, "when trying to connect"); return 1; } + /* + Don't dump SET NAMES with a pre-4.1 server (bug#7997). + */ + if (mysql_get_server_version(&mysql_connection) < 40100) + opt_set_charset= 0; /* As we're going to set SQL_MODE, it would be lost on reconnect, so we cannot reconnect.