summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-04-05 12:01:52 +0200
committerSergei Golubchik <sergii@pisem.net>2012-04-05 12:01:52 +0200
commitcbd52a42ee9b93675e5cdaa043df878c423b6571 (patch)
treef7159b893a8dc1d5efd540ef2b3b21227aaf2b6d /sql/sql_select.cc
parent70a3cafe4d1aa28e1b6c36d9001bc0d487262976 (diff)
parentdea3544b2d9bd68961b8e84c3772deda435f15b5 (diff)
downloadmariadb-git-cbd52a42ee9b93675e5cdaa043df878c423b6571.tar.gz
merge
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc12
1 files changed, 1 insertions, 11 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 28425743c87..72e82dbfe04 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -9052,11 +9052,9 @@ 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;
li.rewind();
while ((table= li++))
{
- bool fix_name_res= FALSE;
nested_join= table->nested_join;
if (nested_join && !table->on_expr)
{
@@ -9071,15 +9069,7 @@ simplify_joins(JOIN *join, List<TABLE_LIST> *join_list, COND *conds, bool top)
tbl->dep_tables|= table->dep_tables;
}
li.replace(nested_join->join_list);
- /* Need to update the name resolution table chain when flattening joins */
- fix_name_res= TRUE;
- table= *li.ref();
- }
- if (fix_name_res)
- table->next_name_resolution_table= right_neighbor ?
- right_neighbor->first_leaf_for_name_resolution() :
- NULL;
- right_neighbor= table;
+ }
}
DBUG_RETURN(conds);
}