mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
merge with MySQL 5.1.65
This commit is contained in:
@@ -538,6 +538,8 @@ JOIN::prepare(Item ***rref_pointer_array,
|
||||
|
||||
if (having)
|
||||
{
|
||||
Query_arena backup, *arena;
|
||||
arena= thd->activate_stmt_arena_if_needed(&backup);
|
||||
nesting_map save_allow_sum_func= thd->lex->allow_sum_func;
|
||||
thd->where="having clause";
|
||||
thd->lex->allow_sum_func|= 1 << select_lex_arg->nest_level;
|
||||
@@ -546,6 +548,10 @@ JOIN::prepare(Item ***rref_pointer_array,
|
||||
(having->fix_fields(thd, &having) ||
|
||||
having->check_cols(1)));
|
||||
select_lex->having_fix_field= 0;
|
||||
select_lex->having= having;
|
||||
if (arena)
|
||||
thd->restore_active_arena(arena, &backup);
|
||||
|
||||
if (having_fix_rc || thd->is_error())
|
||||
DBUG_RETURN(-1); /* purecov: inspected */
|
||||
thd->lex->allow_sum_func= save_allow_sum_func;
|
||||
@@ -12107,7 +12113,8 @@ int report_error(TABLE *table, int error)
|
||||
Locking reads can legally return also these errors, do not
|
||||
print them to the .err log
|
||||
*/
|
||||
if (error != HA_ERR_LOCK_DEADLOCK && error != HA_ERR_LOCK_WAIT_TIMEOUT)
|
||||
if (error != HA_ERR_LOCK_DEADLOCK && error != HA_ERR_LOCK_WAIT_TIMEOUT
|
||||
&& !table->in_use->killed)
|
||||
sql_print_error("Got error %d when reading table '%s'",
|
||||
error, table->s->path.str);
|
||||
table->file->print_error(error,MYF(0));
|
||||
@@ -14203,8 +14210,6 @@ check_reverse_order:
|
||||
join_read_first:join_read_last;
|
||||
tab->type=JT_NEXT; // Read with index_first(), index_next()
|
||||
|
||||
if (table->covering_keys.is_set(best_key) && ! table->key_read)
|
||||
table->enable_keyread();
|
||||
table->file->ha_index_or_rnd_end();
|
||||
if (tab->join->select_options & SELECT_DESCRIBE)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user