mirror of
https://github.com/MariaDB/server.git
synced 2025-07-31 21:07:11 +00:00
MDEV-19301 Assertion `!is_valid_datetime() || fraction_remainder(((item->decimals) < (6) ? (item->decimals) : (6))) == 0' failed in Datetime_truncation_not_needed::Datetime_truncation_not_needed
This commit is contained in:
@ -1728,7 +1728,11 @@ longlong number_to_datetime_or_date(longlong nr, ulong sec_part,
|
||||
!check_date(time_res, nr || sec_part, flags, was_cut))
|
||||
{
|
||||
if (time_res->time_type == MYSQL_TIMESTAMP_DATE && sec_part != 0)
|
||||
*was_cut= MYSQL_TIME_NOTE_TRUNCATED;
|
||||
{
|
||||
/* Date format, but with fractional digits, e.g. 20010203.5 */
|
||||
*was_cut= MYSQL_TIME_NOTE_TRUNCATED;
|
||||
time_res->second_part= 0;
|
||||
}
|
||||
return nr;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user