1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03: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:
Sergei Golubchik
2021-06-28 22:08:52 +02:00
parent 771f3cf995
commit c8fb911e9c

View File

@@ -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;