summaryrefslogtreecommitdiff
path: root/sql/sp_head.h
diff options
context:
space:
mode:
authorunknown <malff/marcsql@weblab.(none)>2007-03-07 09:53:46 -0700
committerunknown <malff/marcsql@weblab.(none)>2007-03-07 09:53:46 -0700
commita6131b85c0a938c2ba951ca5bfd772ec94d76d06 (patch)
tree3329dd6104f87fa278268a64a1aaa98a05ac1b4e /sql/sp_head.h
parent4d6e16f284d9699307461b0081269bf4ce8be87e (diff)
downloadmariadb-git-a6131b85c0a938c2ba951ca5bfd772ec94d76d06.tar.gz
Bug 8407, post review cleanup: use instr::get_cont_dest() to get the instruction
continuation instruction, for CONTINUE exception handlers. sql/sp_head.cc: Post review cleanup: use instr::get_cont_dest() to get the instruction continuation instruction, for CONTINUE exception handlers. sql/sp_head.h: Post review cleanup: use instr::get_cont_dest() to get the instruction continuation instruction, for CONTINUE exception handlers.
Diffstat (limited to 'sql/sp_head.h')
-rw-r--r--sql/sp_head.h27
1 files changed, 12 insertions, 15 deletions
diff --git a/sql/sp_head.h b/sql/sp_head.h
index 10eada43721..4ef4077cc79 100644
--- a/sql/sp_head.h
+++ b/sql/sp_head.h
@@ -449,13 +449,15 @@ public:
thd Thread handle
nextp OUT index of the next instruction to execute. (For most
instructions this will be the instruction following this
- one).
-
- RETURN
- 0 on success,
- other if some error occured
+ one). Note that this parameter is undefined in case of
+ errors, use get_cont_dest() to find the continuation
+ instruction for CONTINUE error handlers.
+
+ RETURN
+ 0 on success,
+ other if some error occurred
*/
-
+
virtual int execute(THD *thd, uint *nextp) = 0;
/**
@@ -463,22 +465,17 @@ public:
Open and lock the tables used by this statement, as a pre-requisite
to execute the core logic of this instruction with
<code>exec_core()</code>.
- If this statement fails, the next instruction to execute is also returned.
- This is useful when a user defined SQL continue handler needs to be
- executed.
@param thd the current thread
@param tables the list of tables to open and lock
- @param nextp the continuation instruction, returned to the caller if this
- method fails.
@return zero on success, non zero on failure.
*/
- int exec_open_and_lock_tables(THD *thd, TABLE_LIST *tables, uint *nextp);
+ int exec_open_and_lock_tables(THD *thd, TABLE_LIST *tables);
/**
Get the continuation destination of this instruction.
- @param nextp the continuation destination (output)
+ @return the continuation destination
*/
- virtual void get_cont_dest(uint *nextp);
+ virtual uint get_cont_dest();
/*
Execute core function of instruction after all preparations (e.g.
@@ -744,7 +741,7 @@ public:
virtual void set_destination(uint old_dest, uint new_dest)
= 0;
- virtual void get_cont_dest(uint *nextp);
+ virtual uint get_cont_dest();
protected: