mirror of
https://github.com/MariaDB/server.git
synced 2026-05-09 00:24:30 +02:00
MDEV-15456 Server crashes upon adding or dropping a partition in ALTER under LOCK TABLE after ER_SAME_NAME_PARTITION
ALTER TABLE ... ADD PARTITION modifies the open TABLE structure, and sets table->need_reopen=1 to reset these modifications in case of an error. But under LOCK TABLES the table isn't get reopened, despite need_reopen. Fixed by reopening need_reopen tables under LOCK TABLE.
This commit is contained in:
parent
86718fda4e
commit
bcb36ee21e
12 changed files with 58 additions and 15 deletions
|
|
@ -238,7 +238,7 @@ static int prepare_for_repair(THD *thd, TABLE_LIST *table_list,
|
|||
|
||||
if (thd->locked_tables_list.locked_tables())
|
||||
{
|
||||
if (thd->locked_tables_list.reopen_tables(thd))
|
||||
if (thd->locked_tables_list.reopen_tables(thd, false))
|
||||
goto end;
|
||||
/* Restore the table in the table list with the new opened table */
|
||||
table_list->table= pos_in_locked_tables->table;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue