192
192
for (table_ptr= select_lex->leaf_tables;
194
194
table_ptr= table_ptr->next_leaf)
200
197
if (setup_wild(session, fields_list, &all_fields, wild_num) ||
201
198
select_lex->setup_ref_array(session, og_num) ||
3016
3013
case REAL_RESULT:
3017
3014
key_length+= sizeof(double);
3020
3016
case INT_RESULT:
3021
3017
key_length+= sizeof(int64_t);
3024
3019
case DECIMAL_RESULT:
3025
3020
key_length+= my_decimal_get_binary_size(group_item->max_length -
3026
3021
(group_item->decimals ? 1 : 0),
3027
3022
group_item->decimals);
3030
3024
case STRING_RESULT:
3032
enum enum_field_types type= group_item->field_type();
3026
enum enum_field_types type= group_item->field_type();
3028
As items represented as DATE/TIME fields in the group buffer
3029
have STRING_RESULT result type, we increase the length
3030
by 8 as maximum pack length of such fields.
3032
if (type == DRIZZLE_TYPE_DATE ||
3033
type == DRIZZLE_TYPE_DATETIME ||
3034
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.
3041
Group strings are taken as varstrings and require an length field.
3042
A field is not yet created by create_tmp_field()
3043
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;
3045
key_length+= group_item->max_length + HA_KEY_BLOB_LENGTH;
3057
3050
/* This case should never be choosen */
3059
3052
my_error(ER_OUT_OF_RESOURCES, MYF(ME_FATALERROR));
3065
3056
if (group_item->maybe_null)
3069
3059
join->tmp_table_param.group_length=key_length+null_parts;
3070
3060
join->tmp_table_param.group_parts=parts;
3071
3061
join->tmp_table_param.group_null_parts=null_parts;