summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_if.test
diff options
context:
space:
mode:
authorunknown <ndbdev@dl145b.mysql.com>2005-06-14 00:05:27 +0200
committerunknown <ndbdev@dl145b.mysql.com>2005-06-14 00:05:27 +0200
commit7bb5fe94115329ba179c59d30b4cff60823b16a4 (patch)
tree57430419848f0b4ed26d8c02853b7eaa63fbe1fe /mysql-test/t/func_if.test
parent1a0bddb84d5c93af339e7c5ce1a45c7cbde59071 (diff)
parent91a7d4e737455b4eed9185ebf622626e982bd8ad (diff)
downloadmariadb-git-7bb5fe94115329ba179c59d30b4cff60823b16a4.tar.gz
merge
BitKeeper/etc/logging_ok: auto-union ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: Auto merged sql/item_cmpfunc.cc: Auto merged
Diffstat (limited to 'mysql-test/t/func_if.test')
-rw-r--r--mysql-test/t/func_if.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/t/func_if.test b/mysql-test/t/func_if.test
index 37556984f68..03590dea8d1 100644
--- a/mysql-test/t/func_if.test
+++ b/mysql-test/t/func_if.test
@@ -75,3 +75,15 @@ SELECT id, IF(date IS NULL, '-', FROM_UNIXTIME(date, '%d-%m-%Y')) AS date_ord, t
SELECT id, IF(date IS NULL, '-', FROM_UNIXTIME(date, '%d-%m-%Y')) AS date_ord, text FROM t1 ORDER BY date_ord DESC;
DROP TABLE t1;
+
+#
+# Test for bug #11142: evaluation of NULLIF when the first argument is NULL
+#
+
+CREATE TABLE t1 (a CHAR(10));
+INSERT INTO t1 VALUES ('aaa'), (NULL), (''), ('bbb');
+
+SELECT a, NULLIF(a,'') FROM t1;
+SELECT a, NULLIF(a,'') FROM t1 WHERE NULLIF(a,'') IS NULL;
+
+DROP TABLE t1;