diff options
author | pem@mysql.com <> | 2004-05-07 18:52:06 +0200 |
---|---|---|
committer | pem@mysql.com <> | 2004-05-07 18:52:06 +0200 |
commit | bf45960eef96dba7e7a7ffc8c3bfe6627daee2a3 (patch) | |
tree | 2f7b236a8721d14f1b398964b898d922fd133131 /sql/item_sum.h | |
parent | e1182c5226ce1c5f5aff4c1e59798b9d3dccde2a (diff) | |
parent | df8e3eac456b14b420f724e658eee175d2ee5e57 (diff) | |
download | mariadb-git-bf45960eef96dba7e7a7ffc8c3bfe6627daee2a3.tar.gz |
Merge 4.1 -> 5.0
Diffstat (limited to 'sql/item_sum.h')
-rw-r--r-- | sql/item_sum.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/item_sum.h b/sql/item_sum.h index 170a142545e..953ff76b65d 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -331,6 +331,7 @@ class Item_sum_avg :public Item_sum_num void update_field(); Item *result_item(Field *field) { return new Item_avg_field(this); } + void no_rows_in_result() {} const char *func_name() const { return "avg"; } Item *copy_or_same(THD* thd); }; @@ -383,6 +384,7 @@ class Item_sum_variance : public Item_sum_num void update_field(); Item *result_item(Field *field) { return new Item_variance_field(this); } + void no_rows_in_result() {} const char *func_name() const { return "variance"; } Item *copy_or_same(THD* thd); }; @@ -766,8 +768,12 @@ class Item_func_group_concat : public Item_sum } longlong val_int() { - String *res; res=val_str(&str_value); - return res ? strtoll(res->c_ptr(),(char**) 0,10) : (longlong) 0; + String *res; + char *end_ptr; + int error; + res= val_str(&str_value); + end_ptr= (char*) res->ptr()+ res->length(); + return res ? my_strtoll10(res->ptr(), &end_ptr, &error) : (longlong) 0; } String* val_str(String* str); Item *copy_or_same(THD* thd); |