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

@@ -242,7 +242,7 @@ bool LEX::set_trigger_new_row(const LEX_CSTRING *name, Item *val,
Let us add this item to list of all Item_trigger_field
objects in trigger.
*/
sphead->m_cur_instr_trig_field_items.link_in_list(trg_fld,
sphead->m_cur_instr_trig_field_items.insert(trg_fld,
&trg_fld->next_trg_field);
return sphead->add_instr(sp_fld);
@@ -8263,7 +8263,7 @@ Item *LEX::create_and_link_Item_trigger_field(THD *thd,
in trigger.
*/
if (likely(trg_fld))
sphead->m_cur_instr_trig_field_items.link_in_list(trg_fld,
sphead->m_cur_instr_trig_field_items.insert(trg_fld,
&trg_fld->next_trg_field);
return trg_fld;