summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r--sql/item_timefunc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index 8f881487e21..29badddad8e 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -809,7 +809,7 @@ public:
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
void fix_length_and_dec()
{
- decimals= args[0]->decimals;
+ decimals= MY_MIN(args[0]->decimals, TIME_SECOND_PART_DIGITS);
Item_timefunc::fix_length_and_dec();
}
const char *func_name() const { return "sec_to_time"; }