summaryrefslogtreecommitdiff
path: root/sql/sql_select.h
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2017-11-30 17:01:23 +0200
committerMonty <monty@mariadb.org>2017-12-02 12:04:54 +0200
commitc65911ac46c4dc002cf0ea219df54ad086ededd8 (patch)
treeea94327fa28f6181fecc26407e1a43b97f20d7ae /sql/sql_select.h
parentddac2d7a1ef725361c7e83b819cb0bec72db024a (diff)
downloadmariadb-git-c65911ac46c4dc002cf0ea219df54ad086ededd8.tar.gz
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)
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r--sql/sql_select.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h
index c1e5a9f95ce..95e9e943c26 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -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;