summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_time.test
diff options
context:
space:
mode:
authorunknown <dlenev@mysql.com>2004-12-30 21:37:32 +0300
committerunknown <dlenev@mysql.com>2004-12-30 21:37:32 +0300
commite107535fa2c41862fa0e1faa68d0e693a45f1b64 (patch)
tree8e50594a30d4d0d2a0239ab976ce23fe93ec089c /mysql-test/t/func_time.test
parent12b08e569431a9d98baf0e2f03d1c024259b3d07 (diff)
parent15017480a7d7aba65df4fcab00a922aa8fc0cf01 (diff)
downloadmariadb-git-e107535fa2c41862fa0e1faa68d0e693a45f1b64.tar.gz
Manual merge of fix for bugs of #7297 and #7515 into 4.1 tree.
mysql-test/r/func_time.result: Manual merge. mysql-test/r/type_datetime.result: Manual merge. mysql-test/t/func_time.test: Manual merge. mysql-test/t/type_datetime.test: Manual merge. sql/item_timefunc.cc: Manual merge. sql/item_timefunc.h: Manual merge. sql/time.cc: Manual merge.
Diffstat (limited to 'mysql-test/t/func_time.test')
-rw-r--r--mysql-test/t/func_time.test8
1 files changed, 6 insertions, 2 deletions
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test
index b9e592fc5d9..0f495ef891d 100644
--- a/mysql-test/t/func_time.test
+++ b/mysql-test/t/func_time.test
@@ -231,10 +231,14 @@ select unix_timestamp('1969-12-01 19:00:01');
#
# Test for bug #6439 "unix_timestamp() function returns wrong datetime
-# values for too big argument". It should return error instead.
+# 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(0);
+select from_unixtime(-1);
select from_unixtime(2145916800);
+select from_unixtime(0);
#
# Test types from + INTERVAL