diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-07-25 13:27:11 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2019-07-25 13:27:11 +0200 |
commit | ae476868a5394041a00e75a29c7d45917e8dfae8 (patch) | |
tree | b2f82005fe87bc5ce1ea92504b505a9d4e8b9781 /sql/item.cc | |
parent | 8d0dabc56b09c6b40db15aac7da0da43d988759d (diff) | |
parent | 2536c0b1ebf6c5012ae34435d82fb2f5fa54aea5 (diff) | |
download | mariadb-git-ae476868a5394041a00e75a29c7d45917e8dfae8.tar.gz |
Merge branch '5.5' into 10.1
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sql/item.cc b/sql/item.cc index 46e6e2cc838..de7e6ae65ff 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -9736,11 +9736,14 @@ table_map Item_direct_view_ref::used_tables() const table_map Item_direct_view_ref::not_null_tables() const { - return get_depended_from() ? - 0 : - ((view->is_merged_derived() || view->merged || !view->table) ? - (*ref)->not_null_tables() : - view->table->map); + if (get_depended_from()) + return 0; + if (!( view->merged || !view->table)) + return view->table->map; + TABLE *tab= get_null_ref_table(); + if (tab == NO_NULL_TABLE || (*ref)->used_tables()) + return (*ref)->not_null_tables(); + return get_null_ref_table()->map; } /* |