diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2014-05-28 16:51:19 +0500 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2014-05-28 16:51:19 +0500 |
commit | 1e96de926c02e183050e1fc057af7c0b86042c56 (patch) | |
tree | 337723a0d52d3dbd5a109f0998ba3aa029b4788a | |
parent | 5506768c52965240c3defda9cf673df00c7febe1 (diff) | |
download | mariadb-git-1e96de926c02e183050e1fc057af7c0b86042c56.tar.gz |
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.
-rw-r--r-- | client/mysqltest.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc index cb7c18d56da..ddfb52539c4 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -942,9 +942,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; } |