Commit 45cabf10 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-16615 ASAN SEGV in handler::print_error or server crash after error upon CREATE TABLE

table->in_use is not always set and a KILL signal can arrive anytime.
parent 8ca18294
......@@ -181,3 +181,6 @@ ERROR 70100: Query execution was interrupted (max_statement_time exceeded)
set max_statement_time = 0;
drop procedure pr;
drop table t1;
SET max_statement_time= 1;
CREATE TABLE t ENGINE=InnoDB SELECT * FROM seq_1_to_50000;
ERROR 70100: Query execution was interrupted (max_statement_time exceeded)
......@@ -5,6 +5,7 @@
--source include/not_embedded.inc
--source include/have_innodb.inc
--source include/have_sequence.inc
--source include/not_valgrind.inc
--echo
......@@ -226,3 +227,10 @@ call pr();
set max_statement_time = 0;
drop procedure pr;
drop table t1;
#
# MDEV-16615 ASAN SEGV in handler::print_error or server crash after error upon CREATE TABLE
#
SET max_statement_time= 1;
--error ER_STATEMENT_TIMEOUT
CREATE TABLE t ENGINE=InnoDB SELECT * FROM seq_1_to_50000;
......@@ -3413,8 +3413,8 @@ void handler::print_error(int error, myf errflag)
break;
case HA_ERR_ABORTED_BY_USER:
{
DBUG_ASSERT(table->in_use->killed);
table->in_use->send_kill_message();
DBUG_ASSERT(ha_thd()->killed);
ha_thd()->send_kill_message();
DBUG_VOID_RETURN;
}
case HA_ERR_WRONG_MRG_TABLE_DEF:
......
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