summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorGleb Shchepa <gshchepa@mysql.com>2008-07-15 17:12:08 +0500
committerGleb Shchepa <gshchepa@mysql.com>2008-07-15 17:12:08 +0500
commit56861c2d1f887d4782cbef45c72b46fe74002265 (patch)
tree9ecf74361f1d66c3a1b271754808e5fd8d3afd97 /sql/item_cmpfunc.cc
parente000e4a2a298f92c246ae10e7178ab03645a434a (diff)
downloadmariadb-git-56861c2d1f887d4782cbef45c72b46fe74002265.tar.gz
after-push patch: partial rollback of bug #37761 fix.
Note: item->null_value is not updated before a call to item->store(), item->is_null() is not too (in common case).
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 2db77eb7c56..28e55eef5bd 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -3758,8 +3758,6 @@ longlong Item_func_in::val_int()
return (longlong) (!null_value && tmp != negated);
}
- if ((null_value= args[0]->null_value))
- return 0;
have_null= 0;
for (uint i= 1 ; i < arg_count ; i++)
{
@@ -3769,6 +3767,8 @@ longlong Item_func_in::val_int()
if (!(value_added_map & (1 << (uint)cmp_type)))
{
in_item->store_value(args[0]);
+ if ((null_value= args[0]->null_value))
+ return 0;
value_added_map|= 1 << (uint)cmp_type;
}
if (!in_item->cmp(args[i]) && !args[i]->null_value)