diff options
author | Mikael Ronstrom <mikael@mysql.com> | 2009-10-01 15:09:20 +0200 |
---|---|---|
committer | Mikael Ronstrom <mikael@mysql.com> | 2009-10-01 15:09:20 +0200 |
commit | 66ea81cdb1f6499d8661d6f0c0750218bcb326c5 (patch) | |
tree | de45f3e1b3661f56c3d57dcb3f69d664bf0d5c58 | |
parent | dc97402c11e7b19d1358772e94d34ce5b4496fc6 (diff) | |
download | mariadb-git-66ea81cdb1f6499d8661d6f0c0750218bcb326c5.tar.gz |
BUG#47752, missed to sort values in list partitioning
-rw-r--r-- | sql/partition_info.cc | 7 | ||||
-rw-r--r-- | sql/sql_partition.cc | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/sql/partition_info.cc b/sql/partition_info.cc index aaa6d0d3767..0540c094ccc 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -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); diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index 9a9618108e5..05b3822ce43 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -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; |