mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
BUG#47752, missed to sort values in list partitioning
This commit is contained in:
@@ -993,15 +993,16 @@ bool partition_info::check_list_constants(THD *thd)
|
||||
}
|
||||
} while (++i < num_parts);
|
||||
}
|
||||
if (fixed && num_list_values)
|
||||
DBUG_ASSERT(fixed);
|
||||
if (num_list_values)
|
||||
{
|
||||
bool first= TRUE;
|
||||
/*
|
||||
list_array and list_col_array are unions, so this works for both
|
||||
variants of LIST partitioning.
|
||||
*/
|
||||
my_qsort((void*)list_array, num_list_values, sizeof(LIST_PART_ENTRY),
|
||||
&list_part_cmp);
|
||||
my_qsort((void*)list_array, num_list_values, size_entries,
|
||||
compare_func);
|
||||
|
||||
i= 0;
|
||||
LINT_INIT(prev_value);
|
||||
|
@@ -1030,8 +1030,6 @@ static bool fix_fields_part_func(THD *thd, Item* func_expr, TABLE *table,
|
||||
if ((!is_sub_part) && (error= check_signed_flag(part_info)))
|
||||
goto end;
|
||||
result= set_up_field_array(table, is_sub_part);
|
||||
if (!is_sub_part)
|
||||
part_info->fixed= TRUE;
|
||||
end:
|
||||
table->get_fields_in_item_tree= FALSE;
|
||||
table->map= 0; //Restore old value
|
||||
@@ -1667,6 +1665,7 @@ bool fix_partition_func(THD *thd, TABLE *table,
|
||||
}
|
||||
part_info->part_result_type= INT_RESULT;
|
||||
}
|
||||
part_info->fixed= TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1683,6 +1682,7 @@ bool fix_partition_func(THD *thd, TABLE *table,
|
||||
table, FALSE)))
|
||||
goto end;
|
||||
}
|
||||
part_info->fixed= TRUE;
|
||||
if (part_info->part_type == RANGE_PARTITION)
|
||||
{
|
||||
error_str= partition_keywords[PKW_RANGE].str;
|
||||
|
Reference in New Issue
Block a user