mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Enlarged group item key_length by a varstring length field.
Group item fields are implemented as varstrings nowadays. Made init_connect.test robust against existing t1.
This commit is contained in:
@ -11654,8 +11654,21 @@ calc_group_buffer(JOIN *join,ORDER *group)
|
||||
key_length+=sizeof(double);
|
||||
else if ((*group->item)->result_type() == INT_RESULT)
|
||||
key_length+=sizeof(longlong);
|
||||
else if ((*group->item)->result_type() == STRING_RESULT)
|
||||
{
|
||||
/*
|
||||
Group strings are taken as varstrings and require an length field.
|
||||
A field is not yet created by create_tmp_field()
|
||||
and the sizes should match up.
|
||||
*/
|
||||
key_length+= (*group->item)->max_length + HA_KEY_BLOB_LENGTH;
|
||||
}
|
||||
else
|
||||
key_length+=(*group->item)->max_length;
|
||||
{
|
||||
/* This case should never be choosen */
|
||||
DBUG_ASSERT(0);
|
||||
current_thd->fatal_error();
|
||||
}
|
||||
parts++;
|
||||
if ((*group->item)->maybe_null)
|
||||
null_parts++;
|
||||
|
Reference in New Issue
Block a user