Commit c1aa6bd9 authored by unknown's avatar unknown

If get_charset() fails when trying to load the server's charset,

use the default charset instead of failing.

parent a4003125
......@@ -1404,7 +1404,10 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
{
charset_name=charset_name_buff;
sprintf(charset_name,"%d",mysql->server_language); /* In case of errors */
mysql->charset=get_charset((uint8) mysql->server_language, MYF(MY_WME));
if (!(mysql->charset =
get_charset((uint8) mysql->server_language, MYF(MY_WME))))
mysql->charset = default_charset_info; /* shouldn't be fatal */
}
else
mysql->charset=default_charset_info;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment