#At file:///home/mikael/mysql_clones/mysql-trunk-wl3352/
2880 Mikael Ronstrom 2009-10-01
BUG#47752, missed to sort values in list partitioning
modified:
sql/partition_info.cc
sql/sql_partition.cc
=== modified file 'sql/partition_info.cc'
--- a/sql/partition_info.cc 2009-10-01 13:04:42 +0000
+++ b/sql/partition_info.cc 2009-10-01 13:09:20 +0000
@@ -993,15 +993,16 @@ bool partition_info::check_list_constant
}
} 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);
=== modified file 'sql/sql_partition.cc'
--- a/sql/sql_partition.cc 2009-10-01 13:04:42 +0000
+++ b/sql/sql_partition.cc 2009-10-01 13:09:20 +0000
@@ -1030,8 +1030,6 @@ static bool fix_fields_part_func(THD *th
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
}
part_info->part_result_type= INT_RESULT;
}
+ part_info->fixed= TRUE;
}
else
{
@@ -1683,6 +1682,7 @@ bool fix_partition_func(THD *thd, TABLE
table, FALSE)))
goto end;
}
+ part_info->fixed= TRUE;
if (part_info->part_type == RANGE_PARTITION)
{
error_str= partition_keywords[PKW_RANGE].str;
Thread |
---|
• bzr commit into mysql-5.4 branch (mikael:2880) Bug#47752 | Mikael Ronstrom | 1 Oct |