Post-merge fix

parent b0ec1cd8
...@@ -2383,9 +2383,10 @@ String *Item_func_hex::val_str(String *str) ...@@ -2383,9 +2383,10 @@ String *Item_func_hex::val_str(String *str)
ulonglong dec; ulonglong dec;
char ans[65],*ptr; char ans[65],*ptr;
/* Return hex of unsigned longlong value */ /* Return hex of unsigned longlong value */
if (args[0]->result_type() == REAL_RESULT) if (args[0]->result_type() == REAL_RESULT ||
args[0]->result_type() == DECIMAL_RESULT)
{ {
double val= args[0]->val(); double val= args[0]->val_real();
if ((val <= (double) LONGLONG_MIN) || if ((val <= (double) LONGLONG_MIN) ||
(val >= (double) (ulonglong) ULONGLONG_MAX)) (val >= (double) (ulonglong) ULONGLONG_MAX))
dec= ~(longlong) 0; dec= ~(longlong) 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment