diff options
author | unknown <dlenev@mysql.com> | 2004-11-15 16:11:13 +0300 |
---|---|---|
committer | unknown <dlenev@mysql.com> | 2004-11-15 16:11:13 +0300 |
commit | e1509cf78105e95f7e335f33bd3349ea77a099ac (patch) | |
tree | 883ce23f2f0f06f70d75e1d70b11971967eea535 /mysql-test/t/func_time.test | |
parent | b80ed3bbb4a37a5be99e26aad6ab27b4ae34aa80 (diff) | |
download | mariadb-git-e1509cf78105e95f7e335f33bd3349ea77a099ac.tar.gz |
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.
mysql-test/r/func_time.result:
Test for bug #6439 "from_unixtime() function returns wrong datetime
values for too big argument".
mysql-test/t/func_time.test:
Test for bug #6439 "from_unixtime() function returns wrong datetime
values for too big argument".
sql/item_timefunc.cc:
Item_func_from_unixtime:
Added error range checking for function argument + small code clean up.
Diffstat (limited to 'mysql-test/t/func_time.test')
-rw-r--r-- | mysql-test/t/func_time.test | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index fffda12c14e..da18269cf6a 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -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); |