summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2011-02-02 19:05:28 +0200
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2011-02-02 19:05:28 +0200
commitac3243c8c82077c34e99e8f7f9a83e5bc9fd7b66 (patch)
tree4635605ae0572f713774190b2fe771d0df3a1f96 /sql-common
parent3473329d3b5e2fd339c184c2e7c75bb6b3bda3ad (diff)
parent59f68983ffee45616a8ec255b5f13535236dd0ea (diff)
downloadmariadb-git-ac3243c8c82077c34e99e8f7f9a83e5bc9fd7b66.tar.gz
merge to 5.1.
Diffstat (limited to 'sql-common')
-rw-r--r--sql-common/my_time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql-common/my_time.c b/sql-common/my_time.c
index c4e917801d5..ca11c54a999 100644
--- a/sql-common/my_time.c
+++ b/sql-common/my_time.c
@@ -992,7 +992,7 @@ my_system_gmt_sec(const MYSQL_TIME *t_src, long *my_timezone,
with unsigned time_t tmp+= shift*86400L might result in a number,
larger then TIMESTAMP_MAX_VALUE, so another check will work.
*/
- if ((tmp < TIMESTAMP_MIN_VALUE) || (tmp > TIMESTAMP_MAX_VALUE))
+ if (!IS_TIME_T_VALID_FOR_TIMESTAMP(tmp))
tmp= 0;
return (my_time_t) tmp;