mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +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:
@ -7601,7 +7601,8 @@ class multi_update :public select_result_interceptor
|
||||
{
|
||||
TABLE_LIST *all_tables; /* query/update command tables */
|
||||
List<TABLE_LIST> *leaves; /* list of leaves of join table tree */
|
||||
List<TABLE_LIST> updated_leaves; /* list of of updated leaves */
|
||||
List<TABLE_LIST> updated_leaves; /* a superset of tables which will be updated */
|
||||
List<TABLE_LIST> update_targets; /* the tables that will be UPDATE'd */
|
||||
TABLE_LIST *update_tables;
|
||||
TABLE **tmp_tables, *main_table, *table_to_update;
|
||||
TMP_TABLE_PARAM *tmp_table_param;
|
||||
@ -7633,6 +7634,7 @@ class multi_update :public select_result_interceptor
|
||||
ha_rows updated_sys_ver;
|
||||
|
||||
bool has_vers_fields;
|
||||
const table_map tables_to_update;
|
||||
|
||||
public:
|
||||
multi_update(THD *thd_arg, TABLE_LIST *ut, List<TABLE_LIST> *leaves_list,
|
||||
|
Reference in New Issue
Block a user