1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Mark constant 'null_tables' with table->const_table=1

This was done to make thing consistent. It gives the additional benefit
that EXPLAIN EXTENDED now treat null_tables like constant's and replaces
columns with NULL, in a similar way that it replaces columns with constants
for constant tables.

- Null tables are tables where all columns are always NULL. The most common
  NULL TABLE is a table used in a LEFT_JOIN that is never true.
- All result changes comes from replacing columns with NULL for null_tables.
- "Impossible where" is now also shows constants for const columns.
- Removed duplicated s->type= JT_CONST
- Reset found_const_table_map when JOIN is created (safety fix)
This commit is contained in:
Monty
2017-11-30 17:01:23 +02:00
parent ddac2d7a1e
commit c65911ac46
10 changed files with 15 additions and 11 deletions

View File

@ -1436,7 +1436,7 @@ public:
table_count= 0;
top_join_tab_count= 0;
const_tables= 0;
const_table_map= 0;
const_table_map= found_const_table_map= 0;
aggr_tables= 0;
eliminated_tables= 0;
join_list= 0;