summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Shulga <dmitry.shulga@mariadb.com>2023-03-13 15:01:53 +0700
committerDmitry Shulga <dmitry.shulga@mariadb.com>2023-03-13 15:01:53 +0700
commit3f531b450a1862cabec3661658145bd945e481a9 (patch)
tree1c8ee9d9a2b7c630268897e3e7b2182a72f5c0a1
parent45ca4938c39590f893700c3ad6934e6dc2e56a18 (diff)
downloadmariadb-git-3f531b450a1862cabec3661658145bd945e481a9.tar.gz
MDEV-5816: Stored programs: validation of stored program statements10.11-MDEV-5816-2
Follow-up patch that fixes issue with missing set up of versioning condition for query involving a versioning partitioned table.
-rw-r--r--sql/sp_instr.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sp_instr.cc b/sql/sp_instr.cc
index de908ca361c..240887e6564 100644
--- a/sql/sp_instr.cc
+++ b/sql/sp_instr.cc
@@ -694,6 +694,7 @@ LEX* sp_lex_instr::parse_expr(THD *thd, sp_head *sp, LEX *sp_instr_lex)
list sp_instr->free_list on executing of every SP instruction.
*/
Query_arena backup;
+ state= STMT_INITIALIZED_FOR_SP;
thd->set_n_backup_active_arena(this, &backup);
thd->free_list= nullptr;
@@ -753,7 +754,6 @@ LEX* sp_lex_instr::parse_expr(THD *thd, sp_head *sp, LEX *sp_instr_lex)
*/
const char *m_tmp_query_bak= sp->m_tmp_query;
sp->m_tmp_query= sql_query.c_ptr();
-
bool parsing_failed= parse_sql(thd, &parser_state, nullptr);
sp->m_tmp_query= m_tmp_query_bak;