summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorgluh@eagle.intranet.mysql.r18.ru <>2005-07-13 16:08:14 +0500
committergluh@eagle.intranet.mysql.r18.ru <>2005-07-13 16:08:14 +0500
commitacf417a7e698891a7093db34ef965fc73b85319f (patch)
treeea54c625ca8d1867f374391c492b4e416691e000 /sql
parentb0ec1cd84e14f99c3a59eacd8140fa6f1d96b4a3 (diff)
downloadmariadb-git-acf417a7e698891a7093db34ef965fc73b85319f.tar.gz
Post-merge fix
Diffstat (limited to 'sql')
-rw-r--r--sql/item_strfunc.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index a8fd7dcf75d..2fd0f25e699 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -2383,9 +2383,10 @@ String *Item_func_hex::val_str(String *str)
ulonglong dec;
char ans[65],*ptr;
/* 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) ||
(val >= (double) (ulonglong) ULONGLONG_MAX))
dec= ~(longlong) 0;