summaryrefslogtreecommitdiff
path: root/mysql-test/t/cast.test
diff options
context:
space:
mode:
authorunknown <ramil/ram@mysql.com/myoffice.izhnet.ru>2006-12-04 17:06:25 +0400
committerunknown <ramil/ram@mysql.com/myoffice.izhnet.ru>2006-12-04 17:06:25 +0400
commit665004c8e0a83e72b735acd2721b91cc9e15e8a4 (patch)
tree3e658877ab80c379c8ea6e5684dd70fee52186a4 /mysql-test/t/cast.test
parent870b2e0a2b4a66c6b4b4f15792d72a7415190650 (diff)
downloadmariadb-git-665004c8e0a83e72b735acd2721b91cc9e15e8a4.tar.gz
fix for bug #23938: ISNULL on DATE AND CAST AS DATE returns false for null values
Set null_value in case of wrong data. mysql-test/r/cast.result: fix for bug #23938: ISNULL on DATE AND CAST AS DATE returns false for null values - test result. mysql-test/t/cast.test: fix for bug #23938: ISNULL on DATE AND CAST AS DATE returns false for null values - test case. sql/item_timefunc.cc: fix for bug #23938: ISNULL on DATE AND CAST AS DATE returns false for null values - set null_value in case of error.
Diffstat (limited to 'mysql-test/t/cast.test')
-rw-r--r--mysql-test/t/cast.test8
1 files changed, 7 insertions, 1 deletions
diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test
index b214cef10fa..7e8ef031e6b 100644
--- a/mysql-test/t/cast.test
+++ b/mysql-test/t/cast.test
@@ -167,4 +167,10 @@ INSERT INTO t1 SET f1 = +1.0e+30 ;
SELECT f1 AS double_val, CAST(f1 AS SIGNED INT) AS cast_val FROM t1;
DROP TABLE t1;
-# End of 4.1 tests
+#
+# Bug #23938: cast(NULL as DATE)
+#
+
+select isnull(date(NULL)), isnull(cast(NULL as DATE));
+
+--echo End of 4.1 tests