Commit d23821d5 authored by unknown's avatar unknown

client.c:

  Bug #3990  	`--with-charset' ./configure's switch doesn'taffect mysql client library.


sql-common/client.c:
  Bug #3990  	`--with-charset' ./configure's switch doesn'taffect mysql client library.
parent 8e5d4462
...@@ -1835,15 +1835,19 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, ...@@ -1835,15 +1835,19 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
} }
/* Set character set */ /* Set character set */
if (mysql->options.charset_name) if (!mysql->options.charset_name &&
!(mysql->options.charset_name=
my_strdup(MYSQL_DEFAULT_CHARSET_NAME,MYF(MY_WME))))
goto error;
{ {
const char *save= charsets_dir; const char *save= charsets_dir;
if (mysql->options.charset_dir) if (mysql->options.charset_dir)
charsets_dir=mysql->options.charset_dir; charsets_dir=mysql->options.charset_dir;
mysql->charset=get_charset_by_csname(mysql->options.charset_name, mysql->charset=get_charset_by_csname(mysql->options.charset_name,
MY_CS_PRIMARY, MY_CS_PRIMARY, MYF(MY_WME));
MYF(MY_WME));
charsets_dir= save; charsets_dir= save;
}
if (!mysql->charset) if (!mysql->charset)
{ {
...@@ -1865,11 +1869,6 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, ...@@ -1865,11 +1869,6 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
} }
goto error; goto error;
} }
}
else
{
mysql->charset= default_charset_info;
}
/* Save connection information */ /* Save connection information */
......
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