mirror of
https://github.com/MariaDB/server.git
synced 2026-05-10 00:54:30 +02:00
func_gconcat.result, func_gconcat.test:
Added a test case for bug #7769. item_sum.h: Fixed bug #7769: a crash for queries with group_concat and having when the query table was empty. The bug was due an unsafe dereferencing.
This commit is contained in:
parent
5ebcb21f12
commit
cd577f2590
3 changed files with 15 additions and 2 deletions
|
|
@ -739,9 +739,10 @@ class Item_func_group_concat : public Item_sum
|
|||
String *res;
|
||||
char *end_ptr;
|
||||
int error;
|
||||
res= val_str(&str_value);
|
||||
if (!(res= val_str(&str_value)))
|
||||
return (longlong) 0;
|
||||
end_ptr= (char*) res->ptr()+ res->length();
|
||||
return res ? my_strtoll10(res->ptr(), &end_ptr, &error) : (longlong) 0;
|
||||
return my_strtoll10(res->ptr(), &end_ptr, &error);
|
||||
}
|
||||
String* val_str(String* str);
|
||||
Item *copy_or_same(THD* thd);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue