1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-25837 Assertion `thd->locked_tables_mode == LTM_NONE' failed in Locked_tables_list::init_locked_tables.

don't do prelocking for the FLUSH command.
This commit is contained in:
Alexey Botchkov
2021-06-29 16:03:26 +04:00
parent 0237e9bb65
commit c2ebe8147d
3 changed files with 26 additions and 1 deletions

View File

@ -5553,7 +5553,8 @@ bool lock_tables(THD *thd, TABLE_LIST *tables, uint count, uint flags)
DEBUG_SYNC(thd, "after_lock_tables_takes_lock");
if (thd->lex->requires_prelocking() &&
thd->lex->sql_command != SQLCOM_LOCK_TABLES)
thd->lex->sql_command != SQLCOM_LOCK_TABLES &&
thd->lex->sql_command != SQLCOM_FLUSH)
{
/*
We just have done implicit LOCK TABLES, and now we have