summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mnogosearch.org>2014-04-24 16:59:01 +0400
committerAlexander Barkov <bar@mnogosearch.org>2014-04-24 16:59:01 +0400
commitd3d3a4b834db8efc558b71066870b07efe1f2976 (patch)
treeefdfd231e9eb08d5a1728a2989b137d46a93f496 /sql/item_timefunc.h
parentaefddfe3ff3a8502e761871647cc38ec7bf09d62 (diff)
downloadmariadb-git-d3d3a4b834db8efc558b71066870b07efe1f2976.tar.gz
MDEV-4511 Assertion `scale <= precision' fails on GROUP BY TIMEDIFF with incorrect types
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"; }