summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-09-24 10:07:56 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-09-24 10:07:56 +0300
commit1333da90b5628c3f7ba98015475367837d8b0174 (patch)
treee295081b3d6414c6b07a170559ebdd2bb0d424ec /client
parent8887effe13ad87ba0460d4d3068fb5696f089bb0 (diff)
parente3da362c037af95a85d3054243a4c9a039ceb4b4 (diff)
downloadmariadb-git-1333da90b5628c3f7ba98015475367837d8b0174.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'client')
-rw-r--r--client/mysqldump.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c
index 0ba241f6ad3..16acc88b221 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2013, Oracle and/or its affiliates.
- Copyright (c) 2010, 2017, MariaDB Corporation.
+ Copyright (c) 2010, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1081,7 +1081,7 @@ static int get_options(int *argc, char ***argv)
my_progname_short);
return(EX_USAGE);
}
- if (strcmp(default_charset, charset_info->csname) &&
+ if (strcmp(default_charset, MYSQL_AUTODETECT_CHARSET_NAME) &&
!(charset_info= get_charset_by_csname(default_charset,
MY_CS_PRIMARY, MYF(MY_WME))))
exit(1);
@@ -1546,6 +1546,9 @@ static int switch_character_set_results(MYSQL *mysql, const char *cs_name)
char query_buffer[QUERY_LENGTH];
size_t query_length;
+ if (!strcmp(cs_name, MYSQL_AUTODETECT_CHARSET_NAME))
+ cs_name= (char *)my_default_csname();
+
/* Server lacks facility. This is not an error, by arbitrary decision . */
if (!server_supports_switching_charsets)
return FALSE;