Commit 1e96de92 authored by Alexey Botchkov's avatar Alexey Botchkov

MDEV-6216 sys_vars.completion_type_func fails in --embedded.

The bug was in the mysqltest.c. It didn't check the send_query result
properly, so when that fails and the thread gets disconnected,
it goes unnoticed, so the consequitive read_result call crashes.
Fixed by checking the sernd_query return.
parent 5506768c
...@@ -942,9 +942,13 @@ static int do_read_query_result(struct st_connection *cn) ...@@ -942,9 +942,13 @@ static int do_read_query_result(struct st_connection *cn)
{ {
DBUG_ASSERT(cn->has_thread); DBUG_ASSERT(cn->has_thread);
wait_query_thread_done(cn); wait_query_thread_done(cn);
if (cn->result)
goto exit_func;
signal_connection_thd(cn, EMB_READ_QUERY_RESULT); signal_connection_thd(cn, EMB_READ_QUERY_RESULT);
wait_query_thread_done(cn); wait_query_thread_done(cn);
exit_func:
return cn->result; return cn->result;
} }
......
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