summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-04-21 07:25:48 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-04-21 07:25:48 +0300
commit75c01f39b1b4a6d27d36d075f8baab9bdda7cc7e (patch)
treedff54cd8894bf7f9b46847fb1d3e03690179cf11 /sql/sql_parse.cc
parent562bbf5212412437273a469fc59138a939f123cd (diff)
parent922e676b43c7b5cb0f20ca67c6d2222e2fc5ec03 (diff)
downloadmariadb-git-75c01f39b1b4a6d27d36d075f8baab9bdda7cc7e.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 1208ed536e1..b16091dbab4 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -7492,6 +7492,7 @@ mysql_new_select(LEX *lex, bool move_down, SELECT_LEX *select_lex)
{
THD *thd= lex->thd;
bool new_select= select_lex == NULL;
+ Name_resolution_context *curr_context= lex->context_stack.head();
DBUG_ENTER("mysql_new_select");
if (new_select)
@@ -7529,7 +7530,8 @@ mysql_new_select(LEX *lex, bool move_down, SELECT_LEX *select_lex)
By default we assume that it is usual subselect and we have outer name
resolution context, if no we will assign it to 0 later
*/
- select_lex->context.outer_context= &select_lex->outer_select()->context;
+
+ select_lex->context.outer_context= curr_context;
}
else
{