summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-03-17 14:13:03 +0100
committerSergei Golubchik <sergii@pisem.net>2011-03-17 14:13:03 +0100
commit1cda2654578b82da52c29a829d463955f8795cc9 (patch)
treef3a8de34f4bf0c331723a999dedc78e87be4b9bb /sql/item_timefunc.cc
parenta169ede155937cba04b01ea104d7904d89f87007 (diff)
downloadmariadb-git-1cda2654578b82da52c29a829d463955f8795cc9.tar.gz
* fix for ALTER TABLE ... MODIFY timestamp->timestamp.
Use dedicated do_field_temporal() for Copy_field. * check_time_range() needs to know TIME's precision to use the correct max value.
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r--sql/item_timefunc.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 1575c1345af..b27e9d72cfc 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -2482,7 +2482,7 @@ bool Item_func_add_time::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
MYSQL_TIME copy= *ltime;
Lazy_string_time str(&copy);
- check_time_range(ltime, &was_cut);
+ check_time_range(ltime, decimals, &was_cut);
if (was_cut)
make_truncated_value_warning(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
&str, MYSQL_TIMESTAMP_TIME, NullS);
@@ -2561,7 +2561,7 @@ bool Item_func_timediff::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
goto null_date;
*ltime= l_time3;
- check_time_range(ltime, &was_cut);
+ check_time_range(ltime, decimals, &was_cut);
if (was_cut)
make_truncated_value_warning(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,