mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
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.
This commit is contained in:
parent
771f3cf995
commit
c8fb911e9c
1 changed files with 1 additions and 1 deletions
|
@ -115,7 +115,7 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
|
|||
NET *net= &mysql->net;
|
||||
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)
|
||||
thd->killed= NOT_KILLED;
|
||||
|
|
Loading…
Add table
Reference in a new issue