1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +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

@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2010 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2009-2010 Monty Program Ab
/* Copyright (c) 2000, 2010 Oracle and/or its affiliates.
2009-2011 Monty Program Ab
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -548,7 +548,8 @@ JOIN::prepare(Item ***rref_pointer_array,
thd->lex->allow_sum_func= save_allow_sum_func;
}
if (!thd->lex->view_prepare_mode && !(select_options & SELECT_DESCRIBE))
if (!(thd->lex->context_analysis_only & CONTEXT_ANALYSIS_ONLY_VIEW) &&
!(select_options & SELECT_DESCRIBE))
{
Item_subselect *subselect;
/* Is it subselect? */
@ -4112,10 +4113,13 @@ update_ref_and_keys(THD *thd, DYNAMIC_ARRAY *keyuse,JOIN_TAB *join_tab,
continue;
}
#ifdef HAVE_valgrind
/* Valgrind complains about overlapped memcpy when save_pos==use. */
/*
Old gcc used a memcpy(), which is undefined if save_pos==use:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19410
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39480
This also disables a valgrind warning, so better to have the test.
*/
if (save_pos != use)
#endif
*save_pos= *use;
prev=use;
found_eq_constant= !use->used_tables;
@ -6443,7 +6447,6 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
tab->select_cond=sel->cond=tmp;
/* Push condition to storage engine if this is enabled
and the condition is not guarded */
tab->table->file->pushed_cond= NULL;
if (thd->variables.engine_condition_pushdown)
{
COND *push_cond=
@ -9913,7 +9916,12 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
convert_blob_length);
if (orig_type == Item::REF_ITEM && orig_modify)
((Item_ref*)orig_item)->set_result_field(result);
if (field->field->eq_def(result))
/*
Fields that are used as arguments to the DEFAULT() function already have
their data pointers set to the default value during name resolution. See
Item_default_value::fix_fields.
*/
if (orig_type != Item::DEFAULT_VALUE_ITEM && field->field->eq_def(result))
*default_field= field->field;
return result;
}
@ -15547,6 +15555,8 @@ calc_group_buffer(JOIN *join,ORDER *group)
{
key_length+= 8;
}
else if (type == MYSQL_TYPE_BLOB)
key_length+= MAX_BLOB_WIDTH; // Can't be used as a key
else
{
/*