summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authorunknown <petr/cps@outpost.site>2006-11-06 00:11:34 +0300
committerunknown <petr/cps@outpost.site>2006-11-06 00:11:34 +0300
commite5bd94b2d4fd6937a0f5ff53a295fe14a83ccaef (patch)
tree30d8ec2b0bdec298709d288e24cd14d7fd20989c /sql/item_timefunc.cc
parentb4973524581aa65edd0ccef339bc2e47c2351602 (diff)
parentc96eaa43ab1c486fb729ca099ccdb1f7336525eb (diff)
downloadmariadb-git-e5bd94b2d4fd6937a0f5ff53a295fe14a83ccaef.tar.gz
Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into outpost.site:/home/cps/mysql/trees/5.0-runtime-bug9191 configure.in: 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 48d6458bd88..4e655562c75 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -1930,17 +1930,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;
}