mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/16752-bug-5.0-mysql
This commit is contained in:
commit
84a775ca3c
1 changed files with 4 additions and 3 deletions
|
@ -12746,11 +12746,12 @@ calc_group_buffer(JOIN *join,ORDER *group)
|
||||||
Field *field= group_item->get_tmp_table_field();
|
Field *field= group_item->get_tmp_table_field();
|
||||||
if (field)
|
if (field)
|
||||||
{
|
{
|
||||||
if (field->type() == FIELD_TYPE_BLOB)
|
enum_field_types type;
|
||||||
|
if ((type= field->type()) == FIELD_TYPE_BLOB)
|
||||||
key_length+=MAX_BLOB_WIDTH; // Can't be used as a key
|
key_length+=MAX_BLOB_WIDTH; // Can't be used as a key
|
||||||
else if (field->type() == MYSQL_TYPE_VARCHAR)
|
else if (type == MYSQL_TYPE_VARCHAR || type == MYSQL_TYPE_VAR_STRING)
|
||||||
key_length+= field->field_length + HA_KEY_BLOB_LENGTH;
|
key_length+= field->field_length + HA_KEY_BLOB_LENGTH;
|
||||||
else if (field->type() == FIELD_TYPE_BIT)
|
else if (type == FIELD_TYPE_BIT)
|
||||||
{
|
{
|
||||||
/* Bit is usually stored as a longlong key for group fields */
|
/* Bit is usually stored as a longlong key for group fields */
|
||||||
key_length+= 8; // Big enough
|
key_length+= 8; // Big enough
|
||||||
|
|
Loading…
Add table
Reference in a new issue