mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
sql_select.cc, item_buff.cc, item.h:
Fixed bug #11088: a crash for queries with GROUP BY a BLOB column + COUNT(DISTINCT...) due to an attempt to allocate a too large buffer for the BLOB field. Now the size of the buffer is limited by max_sort_length. group_by.test, group_by.result: Added a test case for bug #11088.
This commit is contained in:
@ -8656,7 +8656,7 @@ alloc_group_fields(JOIN *join,ORDER *group)
|
||||
{
|
||||
for (; group ; group=group->next)
|
||||
{
|
||||
Item_buff *tmp=new_Item_buff(*group->item);
|
||||
Item_buff *tmp=new_Item_buff(join->thd, *group->item);
|
||||
if (!tmp || join->group_fields.push_front(tmp))
|
||||
return TRUE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user