summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authorunknown <petr/cps@outpost.site>2006-11-06 00:19:55 +0300
committerunknown <petr/cps@outpost.site>2006-11-06 00:19:55 +0300
commit50ba1a09c1a41c79975394ad2120fa199294540e (patch)
tree591f299040db7c6e798aebd269bc97055b83b45e /sql/item_timefunc.cc
parent22b754d8aa858ba4528628d5745797ac393ed27b (diff)
parentbf622dad202f4a1a4a24bb99f76c526817730547 (diff)
downloadmariadb-git-50ba1a09c1a41c79975394ad2120fa199294540e.tar.gz
Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into outpost.site:/home/cps/mysql/trees/5.1-runtime-bug9191 configure.in: Auto merged mysql-test/mysql-test-run.pl: Auto merged sql/item_timefunc.cc: Auto merged sql/mysql_priv.h: Auto merged
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r--sql/item_timefunc.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 08f2a332556..7b439aeebdb 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -1911,17 +1911,14 @@ bool Item_func_convert_tz::get_date(TIME *ltime,
return 1;
}
- /* Check if we in range where we treat datetime values as non-UTC */
- if (ltime->year < TIMESTAMP_MAX_YEAR && ltime->year > TIMESTAMP_MIN_YEAR ||
- ltime->year==TIMESTAMP_MAX_YEAR && ltime->month==1 && ltime->day==1 ||
- ltime->year==TIMESTAMP_MIN_YEAR && ltime->month==12 && ltime->day==31)
{
my_bool not_used;
my_time_tmp= from_tz->TIME_to_gmt_sec(ltime, &not_used);
- if (my_time_tmp >= TIMESTAMP_MIN_VALUE && my_time_tmp <= TIMESTAMP_MAX_VALUE)
+ /* my_time_tmp is guranteed to be in the allowed range */
+ if (my_time_tmp)
to_tz->gmt_sec_to_TIME(ltime, my_time_tmp);
}
-
+
null_value= 0;
return 0;
}