mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge 10.3 into 10.4, except for MDEV-20265
The MDEV-20265 commit e746f451d5
introduces DBUG_ASSERT(right_op == r_tbl) in
st_select_lex::add_cross_joined_table(), and that assertion would
fail in several tests that exercise joins. That commit was skipped
in this merge, and a separate fix of MDEV-20265 will be necessary in 10.4.
This commit is contained in:
@ -2663,9 +2663,16 @@ Locked_tables_list::reopen_tables(THD *thd, bool need_reopen)
|
||||
{
|
||||
if (!table_list->table || !table_list->table->needs_reopen())
|
||||
continue;
|
||||
/* no need to remove the table from the TDC here, thus (TABLE*)1 */
|
||||
close_all_tables_for_name(thd, table_list->table->s,
|
||||
HA_EXTRA_NOT_USED, (TABLE*)1);
|
||||
for (TABLE **prev= &thd->open_tables; *prev; prev= &(*prev)->next)
|
||||
{
|
||||
if (*prev == table_list->table)
|
||||
{
|
||||
thd->locked_tables_list.unlink_from_list(thd, table_list, false);
|
||||
mysql_lock_remove(thd, thd->lock, *prev);
|
||||
close_thread_table(thd, prev);
|
||||
break;
|
||||
}
|
||||
}
|
||||
DBUG_ASSERT(table_list->table == NULL);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user