summaryrefslogtreecommitdiff
path: root/libmysqld/lib_sql.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libmysqld/lib_sql.cc')
-rw-r--r--libmysqld/lib_sql.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index a8f554326cd..b563d8ea2f4 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -663,7 +663,7 @@ void end_embedded_server()
}
-void init_embedded_mysql(MYSQL *mysql, int client_flag)
+void init_embedded_mysql(MYSQL *mysql, ulong client_flag)
{
THD *thd = (THD *)mysql->thd;
thd->mysql= mysql;
@@ -683,7 +683,7 @@ void init_embedded_mysql(MYSQL *mysql, int client_flag)
create_new_thread(), and prepare_new_connection_state(). This should
be refactored to avoid code duplication.
*/
-void *create_embedded_thd(int client_flag)
+void *create_embedded_thd(ulong client_flag)
{
THD * thd= new THD(next_thread_id());
@@ -699,7 +699,7 @@ void *create_embedded_thd(int client_flag)
thd->set_command(COM_SLEEP);
thd->set_time();
thd->init_for_queries();
- thd->client_capabilities= client_flag;
+ thd->client_capabilities= client_flag | MARIADB_CLIENT_EXTENDED_METADATA;
thd->real_id= pthread_self();
thd->db= null_clex_str;
@@ -830,7 +830,7 @@ int check_embedded_connection(MYSQL *mysql, const char *db)
/* acl_authenticate() takes the data from thd->net->read_pos */
thd->net.read_pos= (uchar*)buf;
- if (acl_authenticate(thd, 0, end - buf))
+ if (acl_authenticate(thd, (uint) (end - buf)))
{
my_free(thd->security_ctx->user);
goto err;