diff options
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r-- | sql/item_strfunc.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 2c7fc455d41..ec6ab0f3040 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -5056,8 +5056,10 @@ bool Item_dyncol_get::get_date(MYSQL_TIME *ltime, ulonglong 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; } |