summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorRamil Kalimullin <ramil@mysql.com>2009-12-15 21:08:21 +0400
committerRamil Kalimullin <ramil@mysql.com>2009-12-15 21:08:21 +0400
commit4422b0f665fa3cba9f86b1c5e8e242f7839f6335 (patch)
treebc9c340170fcfbc5a33213fdf3d5f53eecd3704e /sql/item_cmpfunc.cc
parentb4def7bea14b2102166365c44e359a26ae92d39b (diff)
downloadmariadb-git-4422b0f665fa3cba9f86b1c5e8e242f7839f6335.tar.gz
Fix for bug#49517: Inconsistent behavior while using
NULLable BIGINT and INT columns in comparison Problem: a consequence of the fix for 43668. Some Arg_comparator inner initialization missed, that may lead to unpredictable (wrong) comparison results. Fix: always properly initialize Arg_comparator before its usage.
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 419b79377d7..e4f26978431 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -895,9 +895,9 @@ int Arg_comparator::set_cmp_func(Item_result_field *owner_arg,
ulonglong const_value= (ulonglong)-1;
thd= current_thd;
owner= owner_arg;
+ set_null= set_null && owner_arg;
a= a1;
b= a2;
- owner= owner_arg;
thd= current_thd;
if ((cmp_type= can_compare_as_dates(*a, *b, &const_value)))