summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index f1640bf71ed..48f0b3bdbd5 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -3123,7 +3123,7 @@ bool st_select_lex::optimize_unflattened_subqueries()
un->set_limit(un->global_parameters);
un->thd->lex->current_select= sl;
save_options= inner_join->select_options;
- if (un->outer_select()->options & SELECT_DESCRIBE)
+ if (options & SELECT_DESCRIBE)
{
/* Optimize the subquery in the context of EXPLAIN. */
sl->set_explain_type();