diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-06-19 08:56:10 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-06-19 08:56:10 +0300 |
commit | 192aa295b4bc877d0fed24154c57304c3f789179 (patch) | |
tree | 893239effa9f3c9a7d00b324de9b4e41c63bdb4d /client/mysql.cc | |
parent | 03f3ba2dcb07a672f9c1d87489b9ec88af62a96f (diff) | |
parent | 8acbf9c1f961aa1008ef509e059e1a09943f5ed3 (diff) | |
download | mariadb-git-192aa295b4bc877d0fed24154c57304c3f789179.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'client/mysql.cc')
-rw-r--r-- | client/mysql.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 9ce5faf4d58..0fba75cfa32 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1,6 +1,6 @@ /* Copyright (c) 2000, 2018, Oracle and/or its affiliates. - Copyright (c) 2009, 2018, MariaDB Corporation + Copyright (c) 2009, 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 @@ -40,6 +40,7 @@ #include "my_readline.h" #include <signal.h> #include <violite.h> +#include <my_sys.h> #include <source_revision.h> #if defined(USE_LIBEDIT_INTERFACE) && defined(HAVE_LOCALE_H) #include <locale.h> @@ -4697,7 +4698,8 @@ sql_real_connect(char *host,char *database,char *user,char *password, select_limit,max_join_size); mysql_options(&mysql, MYSQL_INIT_COMMAND, init_command); } - + if (!strcmp(default_charset,MYSQL_AUTODETECT_CHARSET_NAME)) + default_charset= (char *)my_default_csname(); mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset); if (!do_connect(&mysql, host, user, password, database, |