summaryrefslogtreecommitdiff
path: root/client/mysqltest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/mysqltest.cc')
-rw-r--r--client/mysqltest.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index efece866ef5..ef339d17a42 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -949,9 +949,13 @@ static int do_read_query_result(struct st_connection *cn)
{
DBUG_ASSERT(cn->has_thread);
wait_query_thread_done(cn);
+ if (cn->result)
+ goto exit_func;
+
signal_connection_thd(cn, EMB_READ_QUERY_RESULT);
wait_query_thread_done(cn);
+exit_func:
return cn->result;
}