mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merge
mysql-test/r/bdb.result: Auto merged mysql-test/r/innodb.result: Auto merged sql/sql_select.cc: Merge
This commit is contained in:
@ -359,6 +359,7 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds,
|
||||
{
|
||||
conds->fix_fields(thd,tables);
|
||||
conds->change_ref_to_fields(thd,tables);
|
||||
conds->top_level_item();
|
||||
having=0;
|
||||
}
|
||||
}
|
||||
@ -868,6 +869,7 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds,
|
||||
sort_table_cond)))
|
||||
goto err;
|
||||
table->select_cond=table->select->cond;
|
||||
table->select_cond->top_level_item();
|
||||
DBUG_EXECUTE("where",print_where(table->select->cond,
|
||||
"select and having"););
|
||||
having=make_cond_for_table(having,~ (table_map) 0,~used_tables);
|
||||
@ -5384,6 +5386,7 @@ make_cond_for_table(COND *cond,table_map tables,table_map used_table)
|
||||
{
|
||||
if (((Item_cond*) cond)->functype() == Item_func::COND_AND_FUNC)
|
||||
{
|
||||
/* Create new top level AND item */
|
||||
Item_cond_and *new_cond=new Item_cond_and;
|
||||
if (!new_cond)
|
||||
return (COND*) 0; // OOM /* purecov: inspected */
|
||||
@ -5421,7 +5424,8 @@ make_cond_for_table(COND *cond,table_map tables,table_map used_table)
|
||||
new_cond->argument_list()->push_back(fix);
|
||||
}
|
||||
new_cond->used_tables_cache=((Item_cond_or*) cond)->used_tables_cache;
|
||||
return new_cond;
|
||||
new_cond->top_level_item();
|
||||
DBUG_RETURN(new_cond);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5772,6 +5776,7 @@ static bool fix_having(JOIN *join, Item **having)
|
||||
sort_table_cond)))
|
||||
return 1;
|
||||
table->select_cond=table->select->cond;
|
||||
table->select_cond->top_level_item();
|
||||
DBUG_EXECUTE("where",print_where(table->select_cond,
|
||||
"select and having"););
|
||||
*having=make_cond_for_table(*having,~ (table_map) 0,~used_tables);
|
||||
|
Reference in New Issue
Block a user