diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2012-05-02 16:53:02 +0200 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2012-05-02 16:53:02 +0200 |
commit | 26fcc55017d0f199c06688e09b21b7b00027171d (patch) | |
tree | 0e2fab1906d00d2926abf47b74d266c7cb4351dd /mysql-test/t/type_date.test | |
parent | feb4776ecf75c34059789a1d642bd778babec98c (diff) | |
download | mariadb-git-26fcc55017d0f199c06688e09b21b7b00027171d.tar.gz |
LP993103: Wrong result with LAST_DAY('0000-00-00 00:00:00')IS NULL in WHERE condition
Fix is to set maybe_null flag for Item_func_last_day.
Diffstat (limited to 'mysql-test/t/type_date.test')
-rw-r--r-- | mysql-test/t/type_date.test | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mysql-test/t/type_date.test b/mysql-test/t/type_date.test index 899f912a5a5..a3fe1eaf73c 100644 --- a/mysql-test/t/type_date.test +++ b/mysql-test/t/type_date.test @@ -26,6 +26,13 @@ INSERT INTO t2 VALUES ('1998-01-02','note02'); select name,t1.cdate,note from t1,t2 where t1.cdate=t2.cdate and t1.cdate='1998-01-01'; drop table t1,t2; +# MariaDB lp:993103. WHERE LAST_DAY(zero_date) IS NULL does not evaluate to TRUE. + +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES(1); +SELECT * FROM t1 WHERE LAST_DAY('0000-00-00 00:00:00') IS NULL; +DROP TABLE t1; + # # Date and BETWEEN # |