diff options
author | unknown <holyfoot@mysql.com> | 2006-06-26 22:32:02 +0500 |
---|---|---|
committer | unknown <holyfoot@mysql.com> | 2006-06-26 22:32:02 +0500 |
commit | 24e1ea5a5721bce80f7fd11851669dabfa5401d4 (patch) | |
tree | d80a7a0f57c15f731dd1554355161803f69d5c95 /libmysqld/lib_sql.cc | |
parent | 9b406e40a4596f51a8a11586db629bcce7cb6d8b (diff) | |
parent | de19047983056693f243d9c1c18d2924136cc2d1 (diff) | |
download | mariadb-git-24e1ea5a5721bce80f7fd11851669dabfa5401d4.tar.gz |
merging
libmysqld/libmysqld.c:
Auto merged
sql/item_geofunc.h:
Auto merged
sql/sql_parse.cc:
Auto merged
Diffstat (limited to 'libmysqld/lib_sql.cc')
-rw-r--r-- | libmysqld/lib_sql.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index a2fdae994b1..a2c570c2fbc 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -37,6 +37,8 @@ extern "C" int check_user(THD *thd, enum enum_server_command command, const char *passwd, uint passwd_len, const char *db, bool check_count); +void thd_init_client_charset(THD *thd, uint cs_number); + C_MODE_START #include <mysql.h> @@ -600,11 +602,14 @@ err: return NULL; } + #ifdef NO_EMBEDDED_ACCESS_CHECKS int check_embedded_connection(MYSQL *mysql) { int result; THD *thd= (THD*)mysql->thd; + thd_init_client_charset(thd, mysql->charset->number); + thd->update_charset(); Security_context *sctx= thd->security_ctx; sctx->host_or_ip= sctx->host= (char*) my_localhost; strmake(sctx->priv_host, (char*) my_localhost, MAX_HOSTNAME-1); @@ -623,6 +628,8 @@ int check_embedded_connection(MYSQL *mysql) char scramble_buff[SCRAMBLE_LENGTH]; int passwd_len; + thd_init_client_charset(thd, mysql->charset->number); + thd->update_charset(); if (mysql->options.client_ip) { sctx->host= my_strdup(mysql->options.client_ip, MYF(0)); |