MySQL 8.4.2
Source Code Documentation
|
sp_instr_freturn represents RETURN statement in stored functions. More...
#include <sp_instr.h>
Public Member Functions | |
sp_instr_freturn (uint ip, LEX *lex, Item *expr_item, LEX_CSTRING expr_query, enum enum_field_types return_field_type) | |
void | print (const THD *thd, String *str) override |
uint | opt_mark (sp_head *, List< sp_instr > *) override |
Mark this instruction as reachable during optimization and return the index to the next instruction. More... | |
bool | exec_core (THD *thd, uint *nextp) override |
Execute core function of instruction after all preparations (e.g. More... | |
bool | is_invalid () const override |
void | invalidate () override |
Invalidate the object. More... | |
bool | on_after_expr_parsing (THD *thd) override |
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. More... | |
LEX_CSTRING | get_expr_query () const override |
void | adjust_sql_command (LEX *lex) override |
Some expressions may be re-parsed as SELECT statements, but need to be adjusted to another SQL command. More... | |
PSI_statement_info * | get_psi_info () override |
Public Member Functions inherited from sp_lex_instr | |
sp_lex_instr (uint ip, sp_pcontext *ctx, LEX *lex, bool is_lex_owner) | |
~sp_lex_instr () override | |
bool | validate_lex_and_execute_core (THD *thd, uint *nextp, bool open_tables) |
Make a few attempts to execute the instruction. More... | |
SQL_I_List< Item_trigger_field > * | get_instr_trig_field_list () override |
bool | execute (THD *thd, uint *nextp) override |
Execute this instruction. More... | |
Public Member Functions inherited from sp_instr | |
sp_instr (uint ip, sp_pcontext *ctx) | |
~sp_instr () override | |
uint | get_ip () const |
virtual uint | get_cont_dest () const |
Get the continuation destination (instruction pointer for the CONTINUE HANDLER) of this instruction. More... | |
sp_pcontext * | get_parsing_ctx () const |
virtual uint | opt_shortcut_jump (sp_head *, sp_instr *start) |
Short-cut jumps to jumps during optimization. More... | |
virtual void | opt_move (uint dst, List< sp_branch_instr > *ibp) |
Inform the instruction that it has been moved during optimization. More... | |
bool | opt_is_marked () const |
Public Member Functions inherited from sp_printable | |
virtual | ~sp_printable ()=default |
Static Public Attributes | |
static PSI_statement_info | psi_info |
Private Attributes | |
Item * | m_expr_item |
RETURN-expression item. More... | |
LEX_CSTRING | m_expr_query |
SQL-query corresponding to the RETURN-expression. More... | |
enum enum_field_types | m_return_field_type |
RETURN-field type code. More... | |
Additional Inherited Members | |
Public Attributes inherited from sp_instr | |
Query_arena | m_arena |
Protected Member Functions inherited from sp_lex_instr | |
virtual void | get_query (String *sql_query) const |
Return the query string, which can be passed to the parser. More... | |
virtual void | cleanup_before_parsing (THD *thd) |
Destroy items in the free list before re-parsing the statement query string (and thus, creating new items). More... | |
Protected Member Functions inherited from sp_instr | |
void | clear_da (THD *thd) const |
Clear diagnostics area. More... | |
Protected Attributes inherited from sp_lex_instr | |
LEX * | m_lex |
LEX-object. More... | |
Protected Attributes inherited from sp_instr | |
bool | m_marked |
Show if this instruction is reachable within the SP (used by SP-optimizer). More... | |
uint | m_ip |
Instruction pointer. More... | |
sp_pcontext * | m_parsing_ctx |
Instruction parsing context. More... | |
sp_instr_freturn represents RETURN statement in stored functions.
|
inline |
|
inlineoverridevirtual |
Some expressions may be re-parsed as SELECT statements, but need to be adjusted to another SQL command.
This function facilitates that change.
Reimplemented from sp_lex_instr.
|
overridevirtual |
Execute core function of instruction after all preparations (e.g.
setting of proper LEX, saving part of the thread context).
thd | Thread context. | |
[out] | nextp | next instruction pointer |
Implements sp_lex_instr.
|
inlineoverridevirtual |
Reimplemented from sp_lex_instr.
|
inlineoverridevirtual |
Implements sp_instr.
|
inlineoverridevirtual |
Invalidate the object.
Implements sp_lex_instr.
|
inlineoverridevirtual |
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.
|
inlineoverridevirtual |
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.
Mark this instruction as reachable during optimization and return the index to the next instruction.
Jump instruction will add their destination to the leads list.
Reimplemented from sp_instr.
Implements sp_printable.
|
private |
RETURN-expression item.
|
private |
SQL-query corresponding to the RETURN-expression.
|
private |
RETURN-field type code.
|
static |