diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqldump.c | 7 |
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; |