summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_time.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/func_time.test')
-rw-r--r--mysql-test/t/func_time.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test
index 67192c55ef9..0f495ef891d 100644
--- a/mysql-test/t/func_time.test
+++ b/mysql-test/t/func_time.test
@@ -230,6 +230,17 @@ select unix_timestamp(@a);
select unix_timestamp('1969-12-01 19:00:01');
#
+# Test for bug #6439 "unix_timestamp() function returns wrong datetime
+# values for too big argument" and bug #7515 "from_unixtime(0) now
+# returns NULL instead of the epoch". unix_timestamp() should return error
+# for too big or negative argument. It should return Epoch value for zero
+# argument since it seems that many user's rely on this fact.
+#
+select from_unixtime(-1);
+select from_unixtime(2145916800);
+select from_unixtime(0);
+
+#
# Test types from + INTERVAL
#