summaryrefslogtreecommitdiff
path: root/client/mysqladmin.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/mysqladmin.cc')
-rw-r--r--client/mysqladmin.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc
index 2b93c149523..a3eee14e0d1 100644
--- a/client/mysqladmin.cc
+++ b/client/mysqladmin.cc
@@ -30,7 +30,7 @@
#define MAX_TRUNC_LENGTH 3
char *host= NULL, *user= 0, *opt_password= 0,
- *default_charset= NULL;
+ *default_charset= (char*) MYSQL_AUTODETECT_CHARSET_NAME;
char truncated_var_names[MAX_MYSQL_VAR][MAX_TRUNC_LENGTH];
char ex_var_names[MAX_MYSQL_VAR][FN_REFLEN];
ulonglong last_values[MAX_MYSQL_VAR];
@@ -348,8 +348,7 @@ int main(int argc,char *argv[])
if (shared_memory_base_name)
mysql_options(&mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
#endif
- if (default_charset)
- mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
+ mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
error_flags= (myf)(opt_nobeep ? 0 : ME_BELL);
if (sql_connect(&mysql, option_wait))