summaryrefslogtreecommitdiff
path: root/mysql-test/t/date_formats.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/date_formats.test')
-rw-r--r--mysql-test/t/date_formats.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/t/date_formats.test b/mysql-test/t/date_formats.test
index faa6d4242db..0c02398acc1 100644
--- a/mysql-test/t/date_formats.test
+++ b/mysql-test/t/date_formats.test
@@ -337,3 +337,15 @@ select str_to_date('04/30 /2004', '%m /%d /%Y');
select str_to_date('04/30/2004 ', '%m/%d/%Y ');
--echo "End of 4.1 tests"
+
+#
+# Bug #41470: DATE_FORMAT() crashes the complete server with a valid date
+#
+
+# show that these two do not crash the server:
+SELECT DATE_FORMAT("0000-01-01",'%W %d %M %Y') as valid_date;
+SELECT DATE_FORMAT("0000-02-28",'%W %d %M %Y') as valid_date;
+# show that date within the Gregorian range render correct results: (THU)
+SELECT DATE_FORMAT("2009-01-01",'%W %d %M %Y') as valid_date;
+
+--echo "End of 5.0 tests"