mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03: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:
@ -630,7 +630,7 @@ bool Sql_cmd_alter_table_exchange_partition::
|
||||
better to keep master/slave in consistent state. Alternative would be to
|
||||
try to revert the exchange operation and issue error.
|
||||
*/
|
||||
(void) thd->locked_tables_list.reopen_tables(thd);
|
||||
(void) thd->locked_tables_list.reopen_tables(thd, false);
|
||||
|
||||
if ((error= write_bin_log(thd, TRUE, thd->query(), thd->query_length())))
|
||||
{
|
||||
|
Reference in New Issue
Block a user