Commit abaa5c91 authored by Bjorn Munch's avatar Bjorn Munch

Bug #20304 mysqltest: reap with no preceding statement hangs forever

Added sanity check, similar to the one preventing send without reap
parent be7b3c00
...@@ -7370,6 +7370,9 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags) ...@@ -7370,6 +7370,9 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
if (cn->pending && (flags & QUERY_SEND_FLAG)) if (cn->pending && (flags & QUERY_SEND_FLAG))
die ("Cannot run query on connection between send and reap"); 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); init_dynamic_string(&ds_warnings, NULL, 0, 256);
/* /*
Evaluate query if this is an eval command Evaluate query if this is an eval command
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment