1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MWL#17: Table elimination

- Better comments, variable/function renames
This commit is contained in:
Sergey Petrunia
2009-06-26 00:07:29 +04:00
parent 15f964b68a
commit d764108a2c
3 changed files with 141 additions and 99 deletions

View File

@ -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))))