1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

Merge with MySQL 5.1.55

- Fixed some issues with partitions and connection_string, which also fixed lp:716890 "Pre- and post-recovery crash in Aria"
- Fixed wrong assert in Aria

Now need to merge with latest xtradb before pushing 

sql/ha_partition.cc:
  Ensure that m_ordered_rec_buffer is not freed before close.
sql/mysqld.cc:
  Changed to use opt_stack_trace instead of opt_pstack.
  Removed references to pstack
sql/partition_element.h:
  Ensure that connect_string is initialized
storage/maria/ma_key_recover.c:
  Fixed wrong assert
This commit is contained in:
Michael Widenius
2011-02-20 18:51:43 +02:00
1288 changed files with 19581 additions and 38443 deletions

View File

@@ -1014,12 +1014,13 @@ static bool fix_fields_part_func(THD *thd, Item* func_expr, TABLE *table,
}
/*
We don't allow creating partitions with timezone-dependent expressions as
a (sub)partitioning function, but we want to allow such expressions when
opening existing tables for easier maintenance. This exception should be
deprecated at some point in future so that we always throw an error.
We don't allow creating partitions with expressions with non matching
arguments as a (sub)partitioning function,
but we want to allow such expressions when opening existing tables for
easier maintenance. This exception should be deprecated at some point
in future so that we always throw an error.
*/
if (func_expr->walk(&Item::is_timezone_dependent_processor,
if (func_expr->walk(&Item::check_valid_arguments_processor,
0, NULL))
{
if (is_create_table_ind)
@@ -5934,6 +5935,12 @@ static void alter_partition_lock_handling(ALTER_PARTITION_PARAM_TYPE *lpt)
int err;
if (lpt->thd->locked_tables)
{
/*
Close the table if open, to remove/destroy the already altered
table->part_info object, so that it is not reused.
*/
if (lpt->table->db_stat)
abort_and_upgrade_lock_and_close_table(lpt);
/*
When we have the table locked, it is necessary to reopen the table
since all table objects were closed and removed as part of the
@@ -6436,7 +6443,20 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
table, table_list, FALSE, NULL,
written_bin_log));
err:
close_thread_tables(thd);
if (thd->locked_tables)
{
/*
table->part_info was altered in prep_alter_part_table and must be
destroyed and recreated, since otherwise it will be reused, since
we are under LOCK TABLE.
*/
alter_partition_lock_handling(lpt);
}
else
{
/* Force the table to be closed to avoid reuse of the table->part_info */
close_thread_tables(thd);
}
DBUG_RETURN(TRUE);
}
#endif
@@ -6747,8 +6767,8 @@ int get_part_iter_for_interval_via_mapping(partition_info *part_info,
{
DBUG_ASSERT(!is_subpart);
Field *field= part_info->part_field_array[0];
uint32 max_endpoint_val;
get_endpoint_func get_endpoint;
uint32 UNINIT_VAR(max_endpoint_val);
get_endpoint_func UNINIT_VAR(get_endpoint);
bool can_match_multiple_values; /* is not '=' */
uint field_len= field->pack_length_in_rec();
part_iter->ret_null_part= part_iter->ret_null_part_orig= FALSE;