summaryrefslogtreecommitdiff
path: root/libmysqld/libmysqld.c
diff options
context:
space:
mode:
authorholyfoot@hf-ibm.(none) <>2005-05-09 16:26:06 +0500
committerholyfoot@hf-ibm.(none) <>2005-05-09 16:26:06 +0500
commit5ddaf35c26ed3459c9662b43687ba7ce1494edd2 (patch)
tree95c5b7d485281f3fcf85e61a657580bbdb1df774 /libmysqld/libmysqld.c
parentb2fc830459eb5f03caa4cb73005ead95c0f72924 (diff)
downloadmariadb-git-5ddaf35c26ed3459c9662b43687ba7ce1494edd2.tar.gz
Fix for bug #9632 (strict.test fails in -embedded-server mode)
Diffstat (limited to 'libmysqld/libmysqld.c')
-rw-r--r--libmysqld/libmysqld.c13
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)