My Project
|
#include <sp_instr.h>
Public Member Functions | |
sp_instr_stmt (uint ip, LEX *lex, LEX_STRING query) | |
virtual bool | execute (THD *thd, uint *nextp) |
virtual void | print (String *str) |
virtual bool | exec_core (THD *thd, uint *nextp) |
virtual bool | is_invalid () const |
virtual void | invalidate () |
virtual void | get_query (String *sql_query) const |
virtual bool | on_after_expr_parsing (THD *thd) |
sp_instr_stmt represents almost all conventional SQL-statements, which are supported outside stored programs.
SET-statements, which deal with SP-variable or NEW/OLD trigger pseudo-rows are not represented by this instruction.
bool sp_instr_stmt::exec_core | ( | THD * | thd, |
uint * | nextp | ||
) | [virtual] |
Execute core function of instruction after all preparations (e.g. setting of proper LEX, saving part of the thread context).
thd | Thread context. |
nextp[out] | next instruction pointer |
Implements sp_lex_instr.
bool sp_instr_stmt::execute | ( | THD * | thd, |
uint * | nextp | ||
) | [virtual] |
Execute this instruction
thd | Thread context | |
[out] | nextp | index of the next instruction to execute. (For most instructions this will be the instruction following this one). Note that this parameter is undefined in case of errors, use get_cont_dest() to find the continuation instruction for CONTINUE error handlers. |
Reimplemented from sp_lex_instr.
virtual void sp_instr_stmt::get_query | ( | String * | sql_query | ) | const [inline, virtual] |
Return the query string, which can be passed to the parser. I.e. the operation should return a valid SQL-statement query string.
[out] | sql_query | SQL-statement query string. |
Reimplemented from sp_lex_instr.
virtual void sp_instr_stmt::invalidate | ( | ) | [inline, virtual] |
Invalidate the object.
Implements sp_lex_instr.
virtual bool sp_instr_stmt::is_invalid | ( | ) | const [inline, virtual] |
false | if the object (i.e. LEX-object) is valid and exec_core() can be just called. |
true | if the object is not valid any longer, exec_core() can not be called. The original query string should be re-parsed and a new LEX-object should be used. |
Implements sp_lex_instr.
virtual bool sp_instr_stmt::on_after_expr_parsing | ( | THD * | thd | ) | [inline, virtual] |
Callback function which is called after the statement query string is successfully parsed, and the thread context has not been switched to the outer context. The thread context contains new LEX-object corresponding to the parsed query string.
thd | Thread context. |
Reimplemented from sp_lex_instr.