diff options
-rw-r--r-- | client/mysql.cc | 4 | ||||
-rw-r--r-- | client/mysqlcheck.c | 3 | ||||
-rw-r--r-- | client/mysqldump.c | 3 | ||||
-rw-r--r-- | client/mysqlimport.c | 3 |
4 files changed, 9 insertions, 4 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 665a8dde82d..eb466a86c91 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -839,7 +839,9 @@ static int get_options(int argc, char **argv) opt_reconnect= 0; connect_flag= 0; /* Not in interactive mode */ } - if (!(charset_info= get_charset_by_csname(default_charset, + + if (strcmp(default_charset, charset_info->csname) && + !(charset_info= get_charset_by_csname(default_charset, MY_CS_PRIMARY, MYF(MY_WME)))) exit(1); if (argc > 1) diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index 1768d948373..03ab45957d4 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -311,7 +311,8 @@ static int get_options(int *argc, char ***argv) } /* TODO: This variable is not yet used */ - if (!(charset_info= get_charset_by_csname(default_charset, + if (strcmp(default_charset, charset_info->csname) && + !(charset_info= get_charset_by_csname(default_charset, MY_CS_PRIMARY, MYF(MY_WME)))) exit(1); if (*argc > 0 && opt_alldbs) diff --git a/client/mysqldump.c b/client/mysqldump.c index 1383e0e0d02..345c7f0b945 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -536,7 +536,8 @@ static int get_options(int *argc, char ***argv) my_progname); return(1); } - if (!(charset_info= get_charset_by_csname(default_charset, + if (strcmp(default_charset, charset_info->csname) && + !(charset_info= get_charset_by_csname(default_charset, MY_CS_PRIMARY, MYF(MY_WME)))) exit(1); if ((*argc < 1 && !opt_alldbs) || (*argc > 0 && opt_alldbs)) diff --git a/client/mysqlimport.c b/client/mysqlimport.c index 5ad6d1dc429..d47ae48b1ac 100644 --- a/client/mysqlimport.c +++ b/client/mysqlimport.c @@ -238,7 +238,8 @@ static int get_options(int *argc, char ***argv) fprintf(stderr, "You can't use --ignore (-i) and --replace (-r) at the same time.\n"); return(1); } - if (!(charset_info= get_charset_by_csname(default_charset, + if (strcmp(default_charset, charset_info->csname) && + !(charset_info= get_charset_by_csname(default_charset, MY_CS_PRIMARY, MYF(MY_WME)))) exit(1); if (*argc < 2) |