summaryrefslogtreecommitdiff
path: root/sql/sql_cte.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-05-20 02:07:21 +0200
committerSergei Golubchik <serg@mariadb.org>2018-05-20 20:25:35 +0200
commitff1d10ef9c8595136cc7687aa59e638cf31db332 (patch)
tree1aeb1d16ce75cb40a56d34789f0b2c083e4aa8f6 /sql/sql_cte.cc
parent6f530c63cd90a86e3acb5e5e6bf81c6d666025eb (diff)
parent91dfb6141f45aed5cf3fe585d8c5db86f9ddbfe9 (diff)
downloadmariadb-git-ff1d10ef9c8595136cc7687aa59e638cf31db332.tar.gz
Merge branch '10.1' into 10.2
Diffstat (limited to 'sql/sql_cte.cc')
-rw-r--r--sql/sql_cte.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_cte.cc b/sql/sql_cte.cc
index fdd6943af93..45f24c3a248 100644
--- a/sql/sql_cte.cc
+++ b/sql/sql_cte.cc
@@ -817,8 +817,9 @@ st_select_lex_unit *With_element::clone_parsed_spec(THD *thd,
if (parser_state.init(thd, unparsed_spec.str, unparsed_spec.length))
goto err;
lex_start(thd);
+ lex->stmt_lex= old_lex;
with_select= &lex->select_lex;
- with_select->select_number= ++thd->stmt_lex->current_select_number;
+ with_select->select_number= ++thd->lex->stmt_lex->current_select_number;
parse_status= parse_sql(thd, &parser_state, 0);
if (parse_status)
goto err;