summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 0c4b1396245..3d9698d6247 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -7239,7 +7239,8 @@ static bool are_tables_local(JOIN_TAB *jtab, table_map used_tables)
except the const tables.
*/
table_map local_tables= jtab->emb_sj_nest->nested_join->used_tables |
- jtab->join->const_table_map;
+ jtab->join->const_table_map |
+ OUTER_REF_TABLE_BIT;
return !test(used_tables & ~local_tables);
}