mirror of
https://github.com/MariaDB/server.git
synced 2025-07-04 01:23:45 +03:00
libmysql.c:
Bug#18830: incompatibility new libraries with old server Don't execute SET NAMES with pre-4.1 server. libmysql/libmysql.c: Bug#18830: incompatibility new libraries with old server Don't execute SET NAMES with pre-4.1 server.
This commit is contained in:
@ -1530,6 +1530,9 @@ int STDCALL mysql_set_character_set(MYSQL *mysql, const char *cs_name)
|
|||||||
{
|
{
|
||||||
char buff[MY_CS_NAME_SIZE + 10];
|
char buff[MY_CS_NAME_SIZE + 10];
|
||||||
charsets_dir= save_csdir;
|
charsets_dir= save_csdir;
|
||||||
|
/* Skip execution of "SET NAMES" for pre-4.1 servers */
|
||||||
|
if (mysql_get_server_version(mysql) < 40100)
|
||||||
|
return 0;
|
||||||
sprintf(buff, "SET NAMES %s", cs_name);
|
sprintf(buff, "SET NAMES %s", cs_name);
|
||||||
if (!mysql_query(mysql, buff))
|
if (!mysql_query(mysql, buff))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user