summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index f61fab416d5..2eb44d46512 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -4720,7 +4720,11 @@ sql_real_connect(char *host,char *database,char *user,char *password,
return -1; // Retryable
}
- charset_info= get_charset_by_name(mysql.charset->name, MYF(0));
+ if (!(charset_info= get_charset_by_name(mysql.charset->name, MYF(0))))
+ {
+ put_info("Unknown default character set", INFO_ERROR);
+ return 1;
+ }
connected=1;