summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorunknown <igor@igor-inspiron.creware.com>2005-06-13 11:24:26 -0700
committerunknown <igor@igor-inspiron.creware.com>2005-06-13 11:24:26 -0700
commit89906482e0271824209d995a37a2265dee3bd4cf (patch)
tree7f90f7bc594a0ddf5ca1cc0008a1a291946590df /sql/item_cmpfunc.cc
parente802cd3bc70833684e89913fa6e2828a6f80df79 (diff)
downloadmariadb-git-89906482e0271824209d995a37a2265dee3bd4cf.tar.gz
func_if.result, func_if.test:
Added a test case for bug #11142. item_cmpfunc.cc: Fixed bug #11142. Implementation of Item_func_nullif::is_null was corrected. sql/item_cmpfunc.cc: Fixed bug #11142. Implementation of Item_func_nullif::is_null was corrected. mysql-test/t/func_if.test: Added a test case for bug #11142. mysql-test/r/func_if.result: Added a test case for bug #11142.
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 337ac949d35..3098e5dc77e 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -1161,9 +1161,7 @@ Item_func_nullif::val_str(String *str)
bool
Item_func_nullif::is_null()
{
- if (!cmp.compare())
- return (null_value=1);
- return 0;
+ return (null_value= (!cmp.compare() ? 1 : args[0]->null_value));
}
/*