diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-06-08 14:33:07 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-06-08 14:33:07 +0300 |
commit | 6e9642beb2cafecbcb96e591e1b4466b877d4885 (patch) | |
tree | 39aa60527982a3a91946c9c6e0608992a309f178 /sql/item.h | |
parent | 8149e4d0a139b901c8902b5b9fae371cef47275f (diff) | |
parent | dfa2d0bc13362b949b1b1699955583f74e7db90a (diff) | |
download | mariadb-git-6e9642beb2cafecbcb96e591e1b4466b877d4885.tar.gz |
Merge 10.2 into 10.3
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 a9598ca29c6..a0c7fe4ee55 100644 --- a/sql/item.h +++ b/sql/item.h @@ -3198,7 +3198,7 @@ public: bool check_table_name_processor(void *arg) { Check_table_name_prm &p= *(Check_table_name_prm *) arg; - if (p.table_name.length && table_name) + if (!field && p.table_name.length && table_name) { DBUG_ASSERT(p.db.length); if ((db_name && @@ -5383,7 +5383,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) { |