Commit d764108a authored by Sergey Petrunia's avatar Sergey Petrunia

MWL#17: Table elimination

- Better comments, variable/function renames 
parent 15f964b6
This diff is collapsed.
......@@ -16699,10 +16699,11 @@ static void print_join(THD *thd,
{
TABLE_LIST *curr= *tbl;
/*
The (*) check guards againist the case of printing the query for
CREATE VIEW. There we'll have nested_join->used_tables==0.
The "eliminated_tables &&" check guards againist the case of
printing the query for CREATE VIEW. We do that without having run
JOIN::optimize() and so will have nested_join->used_tables==0.
*/
if (eliminated_tables && // (*)
if (eliminated_tables &&
((curr->table && (curr->table->map & eliminated_tables)) ||
(curr->nested_join && !(curr->nested_join->used_tables &
~eliminated_tables))))
......
......@@ -301,6 +301,7 @@ public:
bool resume_nested_loop;
table_map const_table_map,found_const_table_map;
/* Tables removed by table elimination. Set to 0 before the elimination. */
table_map eliminated_tables;
/*
Bitmap of all inner tables from outer joins
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment