summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-04-05 10:49:38 +0200
committerSergei Golubchik <sergii@pisem.net>2012-04-05 10:49:38 +0200
commitd4b30a7a84742ae03774fe25af2cbad144ba2d5d (patch)
treed65a66f9f2f9378a1f4ca014e18952ae514f4cb1 /sql/sql_select.cc
parentd993ce1bbf8413a0aaf5a524a11334359234c5f4 (diff)
parentcea2c5d28ead6ae4191aea164df9b80b41a743ad (diff)
downloadmariadb-git-mariadb-5.1.62.tar.gz
mysql-5.1.62 mergemariadb-5.1.62
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 790b7419d09..5fc6a8e9f8d 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -9037,11 +9037,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)
{
@@ -9055,15 +9053,7 @@ simplify_joins(JOIN *join, List<TABLE_LIST> *join_list, COND *conds, bool top)
tbl->join_list= table->join_list;
}
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);
}