summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorBjorn Munch <bjorn.munch@oracle.com>2010-10-01 11:00:18 +0200
committerBjorn Munch <bjorn.munch@oracle.com>2010-10-01 11:00:18 +0200
commitabaa5c91b4307750aeac4582753f2f4131cf4f6f (patch)
tree68f5a086edbcd6eb31a4813196d7bb936123c2ff /client
parentbe7b3c004066fba276471df861ffb6d90c88a883 (diff)
downloadmariadb-git-abaa5c91b4307750aeac4582753f2f4131cf4f6f.tar.gz
Bug #20304 mysqltest: reap with no preceding statement hangs forever
Added sanity check, similar to the one preventing send without reap
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 7d335b7d47a..53c1f1bdf85 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -7370,6 +7370,9 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
if (cn->pending && (flags & QUERY_SEND_FLAG))
die ("Cannot run query on connection between send and reap");
+ if (!(flags & QUERY_SEND_FLAG) && !cn->pending)
+ die ("Cannot reap on a connection without pending send");
+
init_dynamic_string(&ds_warnings, NULL, 0, 256);
/*
Evaluate query if this is an eval command