diff options
Diffstat (limited to 'sql/item.h')
-rw-r--r-- | sql/item.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/item.h b/sql/item.h index c94709c733e..76be66d2a7c 100644 --- a/sql/item.h +++ b/sql/item.h @@ -4952,7 +4952,10 @@ public: table_map used_tables() const; void update_used_tables(); table_map not_null_tables() const; - bool const_item() const { return used_tables() == 0; } + bool const_item() const + { + return (*ref)->const_item() && (null_ref_table == NO_NULL_TABLE); + } TABLE *get_null_ref_table() const { return null_ref_table; } bool walk(Item_processor processor, bool walk_subquery, void *arg) { |