mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge branch '10.0' into 10.1
Conflicts: configure.cmake
This commit is contained in:
@@ -4336,15 +4336,14 @@ static bool create_partition_index_description(PART_PRUNE_PARAM *ppar)
|
||||
Field **field= (ppar->part_fields)? part_info->part_field_array :
|
||||
part_info->subpart_field_array;
|
||||
bool in_subpart_fields= FALSE;
|
||||
uint max_key_len= 0;
|
||||
uint cur_key_len= 0;
|
||||
uint total_key_len= 0;
|
||||
for (uint part= 0; part < total_parts; part++, key_part++)
|
||||
{
|
||||
key_part->key= 0;
|
||||
key_part->part= part;
|
||||
key_part->length= (uint16)(*field)->key_length();
|
||||
key_part->store_length= (uint16)get_partition_field_store_length(*field);
|
||||
cur_key_len += key_part->store_length;
|
||||
total_key_len += key_part->store_length;
|
||||
|
||||
DBUG_PRINT("info", ("part %u length %u store_length %u", part,
|
||||
key_part->length, key_part->store_length));
|
||||
@@ -4370,18 +4369,13 @@ static bool create_partition_index_description(PART_PRUNE_PARAM *ppar)
|
||||
{
|
||||
field= part_info->subpart_field_array;
|
||||
in_subpart_fields= TRUE;
|
||||
max_key_len= cur_key_len;
|
||||
cur_key_len= 0;
|
||||
}
|
||||
}
|
||||
range_par->key_parts_end= key_part;
|
||||
|
||||
if (cur_key_len > max_key_len)
|
||||
max_key_len= cur_key_len;
|
||||
|
||||
max_key_len++; /* Take into account the "+1" in QUICK_RANGE::QUICK_RANGE */
|
||||
if (!(range_par->min_key= (uchar*)alloc_root(alloc,max_key_len)) ||
|
||||
!(range_par->max_key= (uchar*)alloc_root(alloc,max_key_len)))
|
||||
total_key_len++; /* Take into account the "+1" in QUICK_RANGE::QUICK_RANGE */
|
||||
if (!(range_par->min_key= (uchar*)alloc_root(alloc,total_key_len)) ||
|
||||
!(range_par->max_key= (uchar*)alloc_root(alloc,total_key_len)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user