summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorunknown <gluh@gluh.mysql.r18.ru>2004-09-18 13:06:44 +0400
committerunknown <gluh@gluh.mysql.r18.ru>2004-09-18 13:06:44 +0400
commitd7281b331a79d1e2e3f026bbf71660006ee6df0b (patch)
tree93fd06c086dffc2635a6570d6c71cc5bb22174c9 /sql/item_cmpfunc.cc
parente84eb55a0778ca62490c79136b9a09379b02773a (diff)
downloadmariadb-git-d7281b331a79d1e2e3f026bbf71660006ee6df0b.tar.gz
Fix for bug #5595: NULLIF() IS NULL returns false if NULLIF() returns NULL
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 013304d9df5..fbc1ad97e76 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -654,6 +654,15 @@ Item_func_nullif::val_str(String *str)
return res;
}
+
+bool
+Item_func_nullif::is_null()
+{
+ if (!(this->*cmp_func)())
+ return null_value=1;
+ return 0;
+}
+
/*
CASE expression
Return the matching ITEM or NULL if all compares (including else) failed