diff options
author | ndbdev@dl145b.mysql.com <> | 2005-06-14 00:05:27 +0200 |
---|---|---|
committer | ndbdev@dl145b.mysql.com <> | 2005-06-14 00:05:27 +0200 |
commit | be1177c15b246687a5d53f9e3377af6fa36fd9b2 (patch) | |
tree | 57430419848f0b4ed26d8c02853b7eaa63fbe1fe /mysql-test/t/func_if.test | |
parent | df93c2783f56da93d1c1911dac5748e565d47354 (diff) | |
parent | 14da13ea6336717608a5949b9128516f8c813e1f (diff) | |
download | mariadb-git-be1177c15b246687a5d53f9e3377af6fa36fd9b2.tar.gz |
merge
Diffstat (limited to 'mysql-test/t/func_if.test')
-rw-r--r-- | mysql-test/t/func_if.test | 12 |
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; |