summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@mysql.com/deer.(none)>2006-10-24 15:28:16 +0500
committerunknown <holyfoot/hf@mysql.com/deer.(none)>2006-10-24 15:28:16 +0500
commit430a4ad32ca7a1b51e6b5c3ac30371bd9aa9f8e5 (patch)
tree07109f8a8c9dd6fb1b25142c8059747db51c5698 /client
parentbda4032fa4b5ce3bb84d8fcb5e1c571027a0574f (diff)
downloadmariadb-git-430a4ad32ca7a1b51e6b5c3ac30371bd9aa9f8e5.tar.gz
WL#3475 merging
client/mysqltest.c: merging fixes
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index f04df7db863..261a2ae2870 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -496,7 +496,7 @@ static void handle_no_error(struct st_query *q);
by mysql_send_query. It's technically possible, though
i don't see where it is needed.
*/
-pthread_handler_decl(send_one_query, arg)
+pthread_handler_t send_one_query(void *arg)
{
struct connection *cn= (struct connection*)arg;
@@ -2097,7 +2097,7 @@ int close_connection(struct st_query *q)
#ifndef EMBEDDED_LIBRARY
if (q->type == Q_DIRTY_CLOSE)
{
- while (con->mysql.net.vio)
+ if (con->mysql.net.vio)
{
vio_delete(con->mysql.net.vio);
con->mysql.net.vio = 0;
@@ -3684,7 +3684,7 @@ static void run_query_normal(struct connection *cn, struct st_query *command,
else if (flags & QUERY_REAP)
{
pthread_mutex_lock(&cn->mutex);
- if (!cn->query_done)
+ while (!cn->query_done)
pthread_cond_wait(&cn->cond, &cn->mutex);
pthread_mutex_unlock(&cn->mutex);
}
@@ -3939,11 +3939,10 @@ static void handle_no_error(struct st_query *q)
error - function will not return
*/
-static void run_query_stmt(struct connection *cn, struct st_query *command,
+static void run_query_stmt(MYSQL *mysql, struct st_query *command,
char *query, int query_len, DYNAMIC_STRING *ds,
DYNAMIC_STRING *ds_warnings)
{
- MYSQL *mysql= &cn->mysql;
MYSQL_RES *res= NULL; /* Note that here 'res' is meta data result set */
MYSQL_STMT *stmt;
DYNAMIC_STRING ds_prepare_warnings;
@@ -4175,8 +4174,10 @@ static int util_query(MYSQL* org_mysql, const char* query){
*/
-static void run_query(MYSQL *mysql, struct st_query *command, int flags)
+static void run_query(struct connection *cn, struct st_query *command,
+ int flags)
{
+ MYSQL *mysql= &cn->mysql;
DYNAMIC_STRING *ds;
DYNAMIC_STRING ds_result;
DYNAMIC_STRING ds_warnings;
@@ -4329,7 +4330,7 @@ static void run_query(MYSQL *mysql, struct st_query *command, int flags)
match_re(&ps_re, query))
run_query_stmt(mysql, command, query, query_len, ds, &ds_warnings);
else
- run_query_normal(mysql, command, flags, query, query_len,
+ run_query_normal(cn, command, flags, query, query_len,
ds, &ds_warnings);
if (sp_created)