mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
Bug #48739 MySQL crashes on specific INTERVAL in select query
Fixed crash caused by x64 int/long incompatibility introduced in Bug #29125.
This commit is contained in:
parent
b5ae1327f7
commit
48c861fb9f
1 changed files with 2 additions and 2 deletions
|
@ -379,7 +379,7 @@ static bool extract_date_time(DATE_TIME_FORMAT *format,
|
|||
if (tmp - val > 6)
|
||||
tmp= (char*) val + 6;
|
||||
l_time->second_part= (int) my_strtoll10(val, &tmp, &error);
|
||||
frac_part= 6 - (uint) (tmp - val);
|
||||
frac_part= 6 - (int) (tmp - val);
|
||||
if (frac_part > 0)
|
||||
l_time->second_part*= (ulong) log_10_int[frac_part];
|
||||
val= tmp;
|
||||
|
@ -870,7 +870,7 @@ static bool get_interval_info(const char *str,uint length,CHARSET_INFO *cs,
|
|||
value= value*LL(10) + (longlong) (*str - '0');
|
||||
if (transform_msec && i == count - 1) // microseconds always last
|
||||
{
|
||||
long msec_length= 6 - (uint) (str - start);
|
||||
long msec_length= 6 - (int) (str - start);
|
||||
if (msec_length > 0)
|
||||
value*= (long) log_10_int[msec_length];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue