summaryrefslogtreecommitdiff
path: root/libmysqld/lib_sql.cc
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-06-15 22:55:15 +0300
committerunknown <monty@hundin.mysql.fi>2001-06-15 22:55:15 +0300
commit01dc56a5447d8f21224304f8370aee6f41de6160 (patch)
tree45f8ed4becf9182cefb0e93436d666caf7d35184 /libmysqld/lib_sql.cc
parent8b96a960c3c122b0c80afbdb730b2ccd00b3a41a (diff)
downloadmariadb-git-01dc56a5447d8f21224304f8370aee6f41de6160.tar.gz
Fixed bug when using more than 1 connection
libmysqld/Makefile.am: Added missing files libmysqld/libmysqld.c: cleanup
Diffstat (limited to 'libmysqld/lib_sql.cc')
-rw-r--r--libmysqld/lib_sql.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index ed04d85ee6e..323bf42cf92 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -72,8 +72,10 @@ get_mysql_real_data_home(){ return mysql_real_data_home;};
bool lib_dispatch_command(enum enum_server_command command, NET *net,
const char *arg, ulong length)
{
- net_new_transaction(&((THD *)net->vio->dest_thd)->net);
- return dispatch_command(command, (THD *)net->vio->dest_thd, (char *)arg, length + 1);
+ THD *thd=(THD *) net->vio->dest_thd;
+ thd->store_globals(); // Fix if more than one connect
+ net_new_transaction(&thd->net);
+ return dispatch_command(command, thd, (char *) arg, length + 1);
}
@@ -116,7 +118,7 @@ void start_embedded_conn1(NET * net)
thd->net.vio = v;
if (thd->store_globals())
{
- printf("store_globals failed.\n");
+ fprintf(stderr,"store_globals failed.\n");
return;
}