diff options
author | Igor Babaev <igor@askmonty.org> | 2011-08-11 20:24:32 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2011-08-11 20:24:32 -0700 |
commit | 8b56830f7b15df159b51077463211dd9aa412167 (patch) | |
tree | 56d97186560cfc624d9d73aff4a991a87cce5787 /sql/item.h | |
parent | 4ddea0cb93dc5a7dcf6087b9fc9de4f0e9dfa840 (diff) | |
download | mariadb-git-8b56830f7b15df159b51077463211dd9aa412167.tar.gz |
Fixed LP bug #823189.
The method Item_ref::not_null_tables() returned incorrect bitmap
for outer references to view columns. This could cause an invalid
conversion of an outer join into an inner join that could lead
to a wrong result set for a query with a correlated subquery over
an outer join whose where condition had an outer reference to a view.
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 8a453f31c7e..319135ede9d 100644 --- a/sql/item.h +++ b/sql/item.h @@ -2606,7 +2606,10 @@ public: { return (*ref)->const_item(); } - table_map not_null_tables() const { return (*ref)->not_null_tables(); } + table_map not_null_tables() const + { + return depended_from ? 0 : (*ref)->not_null_tables(); + } void set_result_field(Field *field) { result_field= field; } bool is_result_field() { return 1; } void save_in_result_field(bool no_conversions) |