1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-10 23:02:54 +03:00

mysql-5.1 -> mysql-5.5 merge

This commit is contained in:
Sergei Golubchik
2010-11-05 10:59:51 +01:00
94 changed files with 2028 additions and 1160 deletions

View File

@@ -2411,13 +2411,8 @@ JOIN::destroy()
cleanup(1);
/* Cleanup items referencing temporary table columns */
if (!tmp_all_fields3.is_empty())
{
List_iterator_fast<Item> it(tmp_all_fields3);
Item *item;
while ((item= it++))
item->cleanup();
}
cleanup_item_list(tmp_all_fields1);
cleanup_item_list(tmp_all_fields3);
if (exec_tmp_table1)
free_tmp_table(thd, exec_tmp_table1);
if (exec_tmp_table2)
@@ -2428,6 +2423,19 @@ JOIN::destroy()
DBUG_RETURN(error);
}
void JOIN::cleanup_item_list(List<Item> &items) const
{
if (!items.is_empty())
{
List_iterator_fast<Item> it(items);
Item *item;
while ((item= it++))
item->cleanup();
}
}
/**
An entry point to single-unit select (a select without UNION).
@@ -9017,10 +9025,10 @@ simplify_joins(JOIN *join, List<TABLE_LIST> *join_list, COND *conds, bool top)
/* Flatten nested joins that can be flattened. */
TABLE_LIST *right_neighbor= NULL;
bool fix_name_res= FALSE;
li.rewind();
while ((table= li++))
{
bool fix_name_res= FALSE;
nested_join= table->nested_join;
if (nested_join && !table->on_expr)
{