summaryrefslogtreecommitdiff
path: root/sql/sp_head.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r--sql/sp_head.cc22
1 files changed, 8 insertions, 14 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 4d286d237af..f5e32847fb0 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -490,7 +490,7 @@ sp_head::init(LEX *lex)
{
DBUG_ENTER("sp_head::init");
- lex->spcont= m_pcont= new sp_pcontext(NULL);
+ lex->spcont= m_pcont= new sp_pcontext();
/*
Altough trg_table_fields list is used only in triggers we init for all
@@ -1117,7 +1117,7 @@ sp_head::execute(THD *thd)
case SP_HANDLER_CONTINUE:
thd->restore_active_arena(&execute_arena, &backup_arena);
thd->set_n_backup_active_arena(&execute_arena, &backup_arena);
- ctx->push_hstack(ip);
+ ctx->push_hstack(i->get_cont_dest());
// Fall through
default:
ip= hip;
@@ -2449,7 +2449,7 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp,
reinit_stmt_before_use(thd, m_lex);
if (open_tables)
- res= instr->exec_open_and_lock_tables(thd, m_lex->query_tables, nextp);
+ res= instr->exec_open_and_lock_tables(thd, m_lex->query_tables);
if (!res)
{
@@ -2501,8 +2501,7 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp,
sp_instr class functions
*/
-int sp_instr::exec_open_and_lock_tables(THD *thd, TABLE_LIST *tables,
- uint *nextp)
+int sp_instr::exec_open_and_lock_tables(THD *thd, TABLE_LIST *tables)
{
int result;
@@ -2512,19 +2511,16 @@ int sp_instr::exec_open_and_lock_tables(THD *thd, TABLE_LIST *tables,
*/
if (check_table_access(thd, SELECT_ACL, tables, 0)
|| open_and_lock_tables(thd, tables))
- {
- get_cont_dest(nextp);
result= -1;
- }
else
result= 0;
return result;
}
-void sp_instr::get_cont_dest(uint *nextp)
+uint sp_instr::get_cont_dest()
{
- *nextp= m_ip+1;
+ return (m_ip+1);
}
@@ -2717,9 +2713,9 @@ sp_instr_set_trigger_field::print(String *str)
sp_instr_opt_meta
*/
-void sp_instr_opt_meta::get_cont_dest(uint *nextp)
+uint sp_instr_opt_meta::get_cont_dest()
{
- *nextp= m_cont_dest;
+ return m_cont_dest;
}
@@ -2811,7 +2807,6 @@ sp_instr_jump_if_not::exec_core(THD *thd, uint *nextp)
if (! it)
{
res= -1;
- *nextp = m_cont_dest;
}
else
{
@@ -3380,7 +3375,6 @@ sp_instr_set_case_expr::exec_core(THD *thd, uint *nextp)
spcont->clear_handler();
thd->spcont= spcont;
}
- *nextp= m_cont_dest; /* For continue handler */
}
else
*nextp= m_ip+1;