summaryrefslogtreecommitdiff
path: root/mysql-test/r/type_date.result
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2013-06-28 12:00:25 +0400
committerAlexander Barkov <bar@mariadb.org>2013-06-28 12:00:25 +0400
commit0e44faf27ff243f8e8c1432568eef21964ad326c (patch)
tree791c8b48054d1ce7387b9687ed3b91a1c43c5a69 /mysql-test/r/type_date.result
parent4085836acf1b70738efe6d33a51e8d2ab9deb63f (diff)
downloadmariadb-git-0e44faf27ff243f8e8c1432568eef21964ad326c.tar.gz
MDEV-4634 Crash in CONVERT_TZ
Item_func_min_max::get_date() did not check the returned value against the fuzzy_date flags, so it could return a bad value to the caller that expects a good date (e.h. CONVERT_TZ). modified: mysql-test/r/type_date.result mysql-test/r/type_datetime.result mysql-test/r/type_time.result mysql-test/t/type_date.test mysql-test/t/type_datetime.test mysql-test/t/type_time.test sql/item_func.cc sql/item_timefunc.cc sql/mysql_priv.h sql/time.cc
Diffstat (limited to 'mysql-test/r/type_date.result')
-rw-r--r--mysql-test/r/type_date.result11
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/r/type_date.result b/mysql-test/r/type_date.result
index 8f9e692d3e0..ca87f430c5d 100644
--- a/mysql-test/r/type_date.result
+++ b/mysql-test/r/type_date.result
@@ -298,3 +298,14 @@ insert t1 values ('2010-10-10 15:foobar');
Warnings:
Warning 1265 Data truncated for column 'f1' at row 1
drop table t1;
+#
+# MDEV-4634 Crash in CONVERT_TZ
+#
+SELECT CONVERT_TZ(GREATEST(DATE('2021-00-00'),DATE('2022-00-00')),'+00:00','+7:5');
+CONVERT_TZ(GREATEST(DATE('2021-00-00'),DATE('2022-00-00')),'+00:00','+7:5')
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '2022-00-00 00:00:00'
+#
+# End of 5.3 tests
+#