diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-06-09 16:50:58 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-06-09 16:50:58 +0300 |
commit | 65f1a42788549a18311cc631fcee582c1c67dc08 (patch) | |
tree | ccccf7564e0626895d46f55fc843d8eecb13c770 /sql/item.h | |
parent | 29e8c154172bd6b9dccd9757fddace93be6ad194 (diff) | |
parent | b25d2a457859b343e98b1a8c43613ad33eeff01d (diff) | |
download | mariadb-git-65f1a42788549a18311cc631fcee582c1c67dc08.tar.gz |
Merge 10.5 into 10.6
Diffstat (limited to 'sql/item.h')
-rw-r--r-- | sql/item.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/item.h b/sql/item.h index c2a6f351039..8aede90e988 100644 --- a/sql/item.h +++ b/sql/item.h @@ -3695,7 +3695,7 @@ public: bool check_table_name_processor(void *arg) override { Check_table_name_prm &p= *static_cast<Check_table_name_prm*>(arg); - if (p.table_name.length && table_name.length) + if (!field && p.table_name.length && table_name.length) { DBUG_ASSERT(p.db.length); if ((db_name.length && @@ -6023,7 +6023,10 @@ public: table_map used_tables() const override; void update_used_tables() override; table_map not_null_tables() const override; - bool const_item() const override{ return used_tables() == 0; } + bool const_item() const override + { + 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) override { |