3016
3016
case REAL_RESULT:
3017
3017
key_length+= sizeof(double);
3020
3019
case INT_RESULT:
3021
3020
key_length+= sizeof(int64_t);
3024
3022
case DECIMAL_RESULT:
3025
3023
key_length+= my_decimal_get_binary_size(group_item->max_length -
3026
3024
(group_item->decimals ? 1 : 0),
3027
3025
group_item->decimals);
3030
3027
case STRING_RESULT:
3032
enum enum_field_types type= group_item->field_type();
3029
enum enum_field_types type= group_item->field_type();
3031
As items represented as DATE/TIME fields in the group buffer
3032
have STRING_RESULT result type, we increase the length
3033
by 8 as maximum pack length of such fields.
3035
if (type == DRIZZLE_TYPE_DATE ||
3036
type == DRIZZLE_TYPE_DATETIME ||
3037
type == DRIZZLE_TYPE_TIMESTAMP)
3034
As items represented as DATE/TIME fields in the group buffer
3035
have STRING_RESULT result type, we increase the length
3036
by 8 as maximum pack length of such fields.
3044
Group strings are taken as varstrings and require an length field.
3045
A field is not yet created by create_tmp_field()
3046
and the sizes should match up.
3038
if (type == DRIZZLE_TYPE_DATE ||
3039
type == DRIZZLE_TYPE_DATETIME ||
3040
type == DRIZZLE_TYPE_TIMESTAMP)
3047
Group strings are taken as varstrings and require an length field.
3048
A field is not yet created by create_tmp_field()
3049
and the sizes should match up.
3051
key_length+= group_item->max_length + HA_KEY_BLOB_LENGTH;
3048
key_length+= group_item->max_length + HA_KEY_BLOB_LENGTH;
3057
3053
/* This case should never be choosen */
3059
3055
my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATALERROR));
3065
3059
if (group_item->maybe_null)
3069
3062
join->tmp_table_param.group_length=key_length+null_parts;
3070
3063
join->tmp_table_param.group_parts=parts;
3071
3064
join->tmp_table_param.group_null_parts=null_parts;