summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index db1d6911119..ac8534916d6 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -1197,13 +1197,19 @@ longlong Item_cond_or::val_int()
longlong Item_func_isnull::val_int()
{
- (void) args[0]->val();
+ if (internal_result_type == REAL_RESULT)
+ (void) args[0]->val();
+ else
+ (void) args[0]->val_int();
return (args[0]->null_value) ? 1 : 0;
}
longlong Item_func_isnotnull::val_int()
{
- (void) args[0]->val();
+ if (internal_result_type == REAL_RESULT)
+ (void) args[0]->val();
+ else
+ (void) args[0]->val_int();
return !(args[0]->null_value) ? 1 : 0;
}