mirror of
https://github.com/MariaDB/server.git
synced 2026-05-09 16:44:29 +02:00
MDEV-28490 Strange result truncation with group_concat_max_len=1GB.
Arythmetic can overrun the uint type when possible group_concat_max_len is multiplied to collation.mbmaxlen (can easily be like 4). So use ulonglong there for calculations.
This commit is contained in:
parent
3fabdc3ca8
commit
b03ab1270d
3 changed files with 88 additions and 3 deletions
|
|
@ -4242,9 +4242,9 @@ Item_func_group_concat::fix_fields(THD *thd, Item **ref)
|
|||
result.set_charset(collation.collation);
|
||||
result_field= 0;
|
||||
null_value= 1;
|
||||
max_length= (uint32)MY_MIN(thd->variables.group_concat_max_len
|
||||
/ collation.collation->mbminlen
|
||||
* collation.collation->mbmaxlen, UINT_MAX32);
|
||||
max_length= (uint32) MY_MIN((ulonglong) thd->variables.group_concat_max_len
|
||||
/ collation.collation->mbminlen
|
||||
* collation.collation->mbmaxlen, UINT_MAX32);
|
||||
|
||||
uint32 offset;
|
||||
if (separator->needs_conversion(separator->length(), separator->charset(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue