mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Proposed fix for bug #6439 "from_unixtime() function returns wrong datetime
values for too big argument". Added range checking for from_unixtime() argument, cleaned up code a bit.
This commit is contained in:
@@ -470,3 +470,9 @@ unix_timestamp(@a)
|
||||
select unix_timestamp('1969-12-01 19:00:01');
|
||||
unix_timestamp('1969-12-01 19:00:01')
|
||||
0
|
||||
select from_unixtime(0);
|
||||
from_unixtime(0)
|
||||
NULL
|
||||
select from_unixtime(2145916800);
|
||||
from_unixtime(2145916800)
|
||||
NULL
|
||||
|
||||
@@ -225,3 +225,10 @@ drop table t1,t2,t3;
|
||||
select @a:=FROM_UNIXTIME(1);
|
||||
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". It should return error instead.
|
||||
#
|
||||
select from_unixtime(0);
|
||||
select from_unixtime(2145916800);
|
||||
|
||||
Reference in New Issue
Block a user