mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-23365: Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())'
failed upon killed TRUNCATE
Note: This is a backport of 1cb4caa66d
from
10.3
Analysis: Assertion failure happens because less session memory is set and so
table can't be reopened. So the statement can't be used. This error goes
unreported.
Fix: Return the error state.
This commit is contained in:
@ -426,8 +426,10 @@ bool Sql_cmd_truncate_table::truncate_table(THD *thd, TABLE_LIST *table_ref)
|
||||
error= dd_recreate_table(thd, table_ref->db, table_ref->table_name);
|
||||
|
||||
if (thd->locked_tables_mode && thd->locked_tables_list.reopen_tables(thd, false))
|
||||
{
|
||||
thd->locked_tables_list.unlink_all_closed_tables(thd, NULL, 0);
|
||||
|
||||
error= 1;
|
||||
}
|
||||
/* No need to binlog a failed truncate-by-recreate. */
|
||||
binlog_stmt= !error;
|
||||
}
|
||||
|
Reference in New Issue
Block a user