summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2011-09-08 23:24:47 +0400
committerSergey Petrunya <psergey@askmonty.org>2011-09-08 23:24:47 +0400
commit3769841d9e706ee018d5273d2901954b9a281c3e (patch)
treee276e120ce8972fe9dc5c356e7289a4e7eb2fb4c /sql/item.cc
parent19a4309acf64a98b08048592c3a4b69bed1b9f5e (diff)
downloadmariadb-git-3769841d9e706ee018d5273d2901954b9a281c3e.tar.gz
BUG#833600: Wrong result with view + outer join + uncorrelated subquery (non-semijoin)
- The bug was caused by outer join being incorrectly converted into inner because of invalid return values of Item_direct_view_ref::not_null_tables(). - Provided a correct Item_direct_view_ref::not_null_tables() function.
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 4fcffcfbc2a..d0992a379e0 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -9106,6 +9106,12 @@ table_map Item_direct_view_ref::used_tables() const
(view->merged ? (*ref)->used_tables() : view->table->map);
}
+table_map Item_direct_view_ref::not_null_tables() const
+{
+ return get_depended_from() ?
+ 0 :
+ (view->merged ? (*ref)->not_null_tables() : view->table->map);
+}
/*
we add RAND_TABLE_BIT to prevent moving this item from HAVING to WHERE