diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-05-20 02:07:21 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-05-20 20:25:35 +0200 |
commit | ff1d10ef9c8595136cc7687aa59e638cf31db332 (patch) | |
tree | 1aeb1d16ce75cb40a56d34789f0b2c083e4aa8f6 /sql/sql_view.cc | |
parent | 6f530c63cd90a86e3acb5e5e6bf81c6d666025eb (diff) | |
parent | 91dfb6141f45aed5cf3fe585d8c5db86f9ddbfe9 (diff) | |
download | mariadb-git-ff1d10ef9c8595136cc7687aa59e638cf31db332.tar.gz |
Merge branch '10.1' into 10.2
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r-- | sql/sql_view.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 024fe53ce83..e3bdde77ee3 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -1323,6 +1323,7 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table, now Lex placed in statement memory */ + table->view= lex= thd->lex= (LEX*) new(thd->mem_root) st_lex_local; if (!table->view) { @@ -1348,8 +1349,9 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table, goto end; lex_start(thd); + lex->stmt_lex= old_lex; view_select= &lex->select_lex; - view_select->select_number= ++thd->stmt_lex->current_select_number; + view_select->select_number= ++thd->lex->stmt_lex->current_select_number; sql_mode_t saved_mode= thd->variables.sql_mode; /* switch off modes which can prevent normal parsing of VIEW |