mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-23836: Assertion `! is_set() || m_can_overwrite_status' in
Diagnostics_area::set_error_status (interrupted ALTER TABLE under LOCK) Analysis: KILL_QUERY is not ignored when local memory used exceeds maximum session memory. Hence the query proceeds, OK is sent and we end up reopening tables that are marked for reopen. During this, kill status is eventually checked and assertion failure happens during trying to send error message because OK has already been sent. Fix: Ok is already sent so statement has already executed. It is too late to give error. So ignore kill.
This commit is contained in:
@ -2609,7 +2609,9 @@ void Locked_tables_list::mark_table_for_reopen(THD *thd, TABLE *table)
|
||||
bool
|
||||
Locked_tables_list::reopen_tables(THD *thd, bool need_reopen)
|
||||
{
|
||||
Open_table_context ot_ctx(thd, MYSQL_OPEN_REOPEN);
|
||||
bool is_ok= thd->get_stmt_da()->is_ok();
|
||||
Open_table_context ot_ctx(thd, !is_ok ? MYSQL_OPEN_REOPEN:
|
||||
MYSQL_OPEN_IGNORE_KILLED | MYSQL_OPEN_REOPEN);
|
||||
uint reopen_count= 0;
|
||||
MYSQL_LOCK *lock;
|
||||
MYSQL_LOCK *merged_lock;
|
||||
|
Reference in New Issue
Block a user