diff options
author | unknown <holyfoot@hf-ibm.(none)> | 2005-05-09 16:26:06 +0500 |
---|---|---|
committer | unknown <holyfoot@hf-ibm.(none)> | 2005-05-09 16:26:06 +0500 |
commit | 59f6cf25f567be673925d76cbad90de20ad8cff7 (patch) | |
tree | 95c5b7d485281f3fcf85e61a657580bbdb1df774 /libmysqld/libmysqld.c | |
parent | 848611b5ed1e565d02eea896e22753b818c458c5 (diff) | |
download | mariadb-git-59f6cf25f567be673925d76cbad90de20ad8cff7.tar.gz |
Fix for bug #9632 (strict.test fails in -embedded-server mode)
libmysqld/libmysqld.c:
we need this code before we create thd instance
sql/sql_parse.cc:
dispatch_command is the more appropriate place for this code
Diffstat (limited to 'libmysqld/libmysqld.c')
-rw-r--r-- | libmysqld/libmysqld.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libmysqld/libmysqld.c b/libmysqld/libmysqld.c index 6fa41fb3fd0..70074e44c6f 100644 --- a/libmysqld/libmysqld.c +++ b/libmysqld/libmysqld.c @@ -199,6 +199,14 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, unix_socket=0; db_name = db ? my_strdup(db,MYF(MY_WME)) : NULL; + /* Send client information for access check */ + client_flag|=CLIENT_CAPABILITIES; + if (client_flag & CLIENT_MULTI_STATEMENTS) + client_flag|= CLIENT_MULTI_RESULTS; + client_flag&= ~CLIENT_COMPRESS; + if (db) + client_flag|=CLIENT_CONNECT_WITH_DB; + mysql->thd= create_embedded_thd(client_flag, db_name); init_embedded_mysql(mysql, client_flag, db_name); @@ -209,11 +217,6 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, if (mysql_init_charset(mysql)) goto error; - /* Send client information for access check */ - client_flag|=CLIENT_CAPABILITIES; - client_flag&= ~CLIENT_COMPRESS; - if (db) - client_flag|=CLIENT_CONNECT_WITH_DB; mysql->server_status= SERVER_STATUS_AUTOCOMMIT; if (mysql->options.init_commands) |