mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 07:05:33 +02:00
MDEV-4858 Wrong results for a huge unsigned value inserted into a TIME column
MDEV-6099 Bad results for DATE_ADD(.., INTERVAL 2000000000000000000.0 SECOND) MDEV-6097 Inconsistent results for CAST(int,decimal,double AS DATETIME) MDEV-6100 No warning on CAST(9000000 AS TIME)
This commit is contained in:
parent
a1975dd2c1
commit
661daf16f1
20 changed files with 194 additions and 51 deletions
|
|
@ -4149,8 +4149,10 @@ bool Item_dyncol_get::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
|
|||
case DYN_COL_UINT:
|
||||
if (signed_value || val.x.ulong_value <= LONGLONG_MAX)
|
||||
{
|
||||
if (int_to_datetime_with_warn(val.x.ulong_value, ltime, fuzzy_date,
|
||||
0 /* TODO */))
|
||||
bool neg= val.x.ulong_value > LONGLONG_MAX;
|
||||
if (int_to_datetime_with_warn(neg, neg ? -val.x.ulong_value :
|
||||
val.x.ulong_value,
|
||||
ltime, fuzzy_date, 0 /* TODO */))
|
||||
goto null;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue