summaryrefslogtreecommitdiff
path: root/sql/item_sum.h
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-02-28 13:16:17 +0200
committerMichael Widenius <monty@askmonty.org>2011-02-28 13:16:17 +0200
commit869f5d0e81d5cbecaec3605f292fbb363b9ccbf6 (patch)
tree9e2bc4700a2db961d967e53f00c941f3ee501173 /sql/item_sum.h
parentcfa0c6ff1d8f7268f895d79daf94e7d29197327d (diff)
parentff3da0f963b28d128005da8ca5d0c93a72d34b27 (diff)
downloadmariadb-git-869f5d0e81d5cbecaec3605f292fbb363b9ccbf6.tar.gz
Merge with alias as String
Diffstat (limited to 'sql/item_sum.h')
-rw-r--r--sql/item_sum.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/item_sum.h b/sql/item_sum.h
index b5516792676..46e5ae76ab1 100644
--- a/sql/item_sum.h
+++ b/sql/item_sum.h
@@ -1274,8 +1274,13 @@ public:
void make_unique();
double val_real()
{
- String *res; res=val_str(&str_value);
- return res ? my_atof(res->c_ptr()) : 0.0;
+ int error;
+ const char *end;
+ String *res;
+ if (!(res= val_str(&str_value)))
+ return 0.0;
+ end= res->ptr() + res->length();
+ return (my_strtod(res->ptr(), (char**) &end, &error));
}
longlong val_int()
{