mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-23207 Assertion `tl->table == __null' failed in THD::open_temporary_table
Assertion fails because table is opened by admin_recreate_table(): 71 result_code= (thd->open_temporary_tables(table_list) || 72 mysql_recreate_table(thd, table_list, recreate_info, false)); And that is called because t2 is failed with HA_ADMIN_NOT_IMPLEMENTED: 1093 if (result_code == HA_ADMIN_NOT_IMPLEMENTED && need_repair_or_alter) 1094 { 1095 /* 1096 repair was not implemented and we need to upgrade the table 1097 to a new version so we recreate the table with ALTER TABLE 1098 */ 1099 result_code= admin_recreate_table(thd, table, &recreate_info); 1100 } Actually 'table' is t2 but open_temporary_tables() opens whole list, i.e. t2 and everything what follows it before first_not_own_table(). Therefore t3 is also opened for t2 processing what is wrong. The fix opens exactly one specific table for HA_ADMIN_NOT_IMPLEMENTED.
This commit is contained in:
@@ -68,7 +68,7 @@ static bool admin_recreate_table(THD *thd, TABLE_LIST *table_list,
|
||||
|
||||
DEBUG_SYNC(thd, "ha_admin_try_alter");
|
||||
tmp_disable_binlog(thd); // binlogging is done by caller if wanted
|
||||
result_code= (thd->open_temporary_tables(table_list) ||
|
||||
result_code= (thd->check_and_open_tmp_table(table_list) ||
|
||||
mysql_recreate_table(thd, table_list, recreate_info, false));
|
||||
reenable_binlog(thd);
|
||||
/*
|
||||
|
Reference in New Issue
Block a user