1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-30469 (refactoring) Support ORDER BY and LIMIT for multi-table DELETE...

This patch includes a few changes to make the code easier to maintain:
  - Renamed SQL_I_List::link_in_list to SQL_I_List::insert.  link_in_list was
  ambiguous as it could refer to a link or it could refer to a node
  - Remove field_name local variable in multi_update::initialize_tables because
  it is not used when creating the temporary tables
  - multi_update changes:
    - Move temp table callocs to init, a more natural location for them, and moved
    tables_to_update to const member variable so we don't recompute it.
    - Filter out jtbm tables and tables not in the update map, pushing those that
    will be updated into an update_targets container.  This simplifies checks and
    loops in initialize_tables.
This commit is contained in:
Dave Gosselin
2024-12-03 09:48:17 -05:00
parent dfdbec1636
commit 02dc8615f2
12 changed files with 108 additions and 100 deletions

View File

@@ -1056,7 +1056,7 @@ st_select_lex_unit::init_prepare_fake_select_lex(THD *thd_arg,
bool first_execution)
{
thd_arg->lex->current_select= fake_select_lex;
fake_select_lex->table_list.link_in_list(&result_table_list,
fake_select_lex->table_list.insert(&result_table_list,
&result_table_list.next_local);
fake_select_lex->context.table_list=
fake_select_lex->context.first_name_resolution_table=