Commit c8fb911e authored by Sergei Golubchik's avatar Sergei Golubchik

fix main.lock_kill crashes in --ps --embed

when checking whether thd wasn't killed before this
emb_advanced_command(), take into account that it
could've been killed before the *previous*
emb_advanced_command(). That is, the previous one has
already set thd to NULL and this one only wanted a COM_STMT_RESET
after a failure.
parent 771f3cf9
...@@ -115,7 +115,7 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command, ...@@ -115,7 +115,7 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
NET *net= &mysql->net; NET *net= &mysql->net;
my_bool stmt_skip= stmt ? stmt->state != MYSQL_STMT_INIT_DONE : FALSE; my_bool stmt_skip= stmt ? stmt->state != MYSQL_STMT_INIT_DONE : FALSE;
if (thd->killed != NOT_KILLED) if (thd && thd->killed != NOT_KILLED)
{ {
if (thd->killed < KILL_CONNECTION) if (thd->killed < KILL_CONNECTION)
thd->killed= NOT_KILLED; thd->killed= NOT_KILLED;
......
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