diff options
author | unknown <igor@rurik.mysql.com> | 2006-10-19 23:05:53 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2006-10-19 23:05:53 -0700 |
commit | d649efbb07af288b6b58b4bd01a04d34c7a7f467 (patch) | |
tree | a33320fcd924119dcdb40bf6cde9be47f5b4840a /sql/item_subselect.cc | |
parent | 9bfaab57fa991d46844b5e56cb30880c8391c55d (diff) | |
download | mariadb-git-d649efbb07af288b6b58b4bd01a04d34c7a7f467.tar.gz |
Fixed bug #23478.
If elements a not top-level IN subquery were accessed by an index and
the subquery result set included a NULL value then the quantified
predicate that contained the subquery was evaluated to NULL when
it should return a non-null value.
mysql-test/r/subselect.result:
Added a test case for bug #23478.
mysql-test/t/subselect.test:
Added a test case for bug #23478.
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r-- | sql/item_subselect.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index f3be0663af8..1ab81d1862d 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -610,6 +610,7 @@ double Item_in_subselect::val() */ DBUG_ASSERT(0); DBUG_ASSERT(fixed == 1); + null_value= 0; if (exec()) { reset(); @@ -625,6 +626,7 @@ double Item_in_subselect::val() longlong Item_in_subselect::val_int() { DBUG_ASSERT(fixed == 1); + null_value= 0; if (exec()) { reset(); @@ -645,6 +647,7 @@ String *Item_in_subselect::val_str(String *str) */ DBUG_ASSERT(0); DBUG_ASSERT(fixed == 1); + null_value= 0; if (exec()) { reset(); |