diff options
Diffstat (limited to 'client/mysqladmin.cc')
-rw-r--r-- | client/mysqladmin.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc index 10b56f10228..baffe98abb7 100644 --- a/client/mysqladmin.cc +++ b/client/mysqladmin.cc @@ -1,6 +1,6 @@ /* Copyright (c) 2000, 2014, Oracle and/or its affiliates. - Copyright (c) 2010, 2017, MariaDB + Copyright (c) 2010, 2019, MariaDB 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 @@ -26,6 +26,7 @@ #include <welcome_copyright_notice.h> #include <my_rnd.h> #include <password.h> +#include <my_sys.h> #define ADMIN_VERSION "9.1" #define MAX_MYSQL_VAR 512 @@ -366,6 +367,8 @@ int main(int argc,char *argv[]) #endif if (opt_protocol) mysql_options(&mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol); + if (!strcmp(default_charset,MYSQL_AUTODETECT_CHARSET_NAME)) + default_charset= (char *)my_default_csname(); mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset); error_flags= (myf)(opt_nobeep ? 0 : ME_BELL); |