summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2006-04-06 11:47:46 +0500
committerunknown <bar@mysql.com>2006-04-06 11:47:46 +0500
commit00cfd1a75f97eefcd9bfd64c63ee84cd33c2f648 (patch)
tree0e0619a5f45da6760db38992458d3a5762308237 /libmysql
parent5475703bad6f2c821cd1002dc521a2dc36526d8e (diff)
downloadmariadb-git-00cfd1a75f97eefcd9bfd64c63ee84cd33c2f648.tar.gz
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.
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 898e0ad3273..4b8f1c9da1f 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -1530,6 +1530,9 @@ int STDCALL mysql_set_character_set(MYSQL *mysql, const char *cs_name)
{
char buff[MY_CS_NAME_SIZE + 10];
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);
if (!mysql_query(mysql, buff))
{