mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
Remove JOIN::select_list_used_tables, eval_select_list_used_tables()
JOIN::select_list_used_tables is computed by
JOIN::eval_select_list_used_tables(), but never read. Its last reads
(in the code that optimizes DISTINCT on a subset of the tables, and in
JOIN_TAB::save_explain_data()) were removed by:
commit 2cfc450bf7
Author: Igor Babaev <igor@askmonty.org>
Date: Tue Feb 9 2016
This is the consolidated patch for mdev-8646: "Re-factor the code
for post-join operations".
Remove the member and the function that computes it.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2312,8 +2312,6 @@ JOIN::optimize_inner()
|
||||
select_lex->update_used_tables();
|
||||
}
|
||||
|
||||
eval_select_list_used_tables();
|
||||
|
||||
table_count= select_lex->leaf_tables.elements;
|
||||
|
||||
if (select_lex->options & OPTION_SCHEMA_TABLE &&
|
||||
@@ -15678,29 +15676,6 @@ void JOIN::drop_unused_derived_keys()
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Evaluate the bitmap of used tables for items from the select list
|
||||
*/
|
||||
|
||||
inline void JOIN::eval_select_list_used_tables()
|
||||
{
|
||||
select_list_used_tables= 0;
|
||||
Item *item;
|
||||
List_iterator_fast<Item> it(fields_list);
|
||||
while ((item= it++))
|
||||
{
|
||||
select_list_used_tables|= item->used_tables();
|
||||
}
|
||||
Item_outer_ref *ref;
|
||||
List_iterator_fast<Item_outer_ref> ref_it(select_lex->inner_refs_list);
|
||||
while ((ref= ref_it++))
|
||||
{
|
||||
item= ref->outer_ref;
|
||||
select_list_used_tables|= item->used_tables();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Determine {after which table we'll produce ordered set}
|
||||
|
||||
|
||||
@@ -1661,8 +1661,6 @@ public:
|
||||
make_join_statistics)
|
||||
*/
|
||||
table_map outer_join;
|
||||
/* Bitmap of tables used in the select list items */
|
||||
table_map select_list_used_tables;
|
||||
/* Tables that has HA_NON_COMPARABLE_ROWID (does not support rowid) set */
|
||||
table_map not_usable_rowid_map;
|
||||
/* Tables that have a possiblity to use EQ_ref */
|
||||
@@ -2117,7 +2115,6 @@ public:
|
||||
void drop_unused_derived_keys();
|
||||
bool get_best_combination();
|
||||
bool add_sorting_to_table(JOIN_TAB *tab, ORDER *order);
|
||||
inline void eval_select_list_used_tables();
|
||||
/*
|
||||
Return the table for which an index scan can be used to satisfy
|
||||
the sort order needed by the ORDER BY/(implicit) GROUP BY clause
|
||||
|
||||
Reference in New Issue
Block a user