1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-17854 Assertion `decimals <= 6' failed in my_time_fraction_remainder on SELECT with NULLIF and FROM_UNIXTIME on incorrect time

This commit is contained in:
Alexander Barkov
2018-11-28 06:18:05 +04:00
parent 926b04e550
commit d6bcf3a4c8
3 changed files with 19 additions and 1 deletions

View File

@ -862,7 +862,9 @@ Datetime_truncation_not_needed::Datetime_truncation_not_needed(THD *thd, Item *i
existed (but we know there were no nanoseconds). Here we assert that there
are also no microsecond digits outside of the scale specified in "dec".
*/
DBUG_ASSERT(!is_valid_datetime() || fraction_remainder(item->decimals) == 0);
DBUG_ASSERT(!is_valid_datetime() ||
fraction_remainder(MY_MIN(item->decimals,
TIME_SECOND_PART_DIGITS)) == 0);
}
/********************************************************************/