The world's most popular open source database
#include <sp_head.h>
Inheritance diagram for sp_instr_freturn:


Public Member Functions | |
| sp_instr_freturn (uint ip, sp_pcontext *ctx, Item *val, enum enum_field_types type, LEX *lex) | |
| virtual | ~sp_instr_freturn () |
| virtual int | execute (THD *thd, uint *nextp) |
| virtual int | exec_core (THD *thd, uint *nextp) |
| virtual void | print (String *str) |
| virtual uint | opt_mark (sp_head *sp) |
Protected Attributes | |
| Item * | m_value |
| enum enum_field_types | m_type |
| sp_lex_keeper | m_lex_keeper |
Private Member Functions | |
| sp_instr_freturn (const sp_instr_freturn &) | |
| void | operator= (sp_instr_freturn &) |
Definition at line 830 of file sp_head.h.
| sp_instr_freturn::sp_instr_freturn | ( | const sp_instr_freturn & | ) | [private] |
| sp_instr_freturn::sp_instr_freturn | ( | uint | ip, | |
| sp_pcontext * | ctx, | |||
| Item * | val, | |||
| enum enum_field_types | type, | |||
| LEX * | lex | |||
| ) | [inline] |
| virtual sp_instr_freturn::~sp_instr_freturn | ( | ) | [inline, virtual] |
| int sp_instr_freturn::exec_core | ( | THD * | thd, | |
| uint * | nextp | |||
| ) | [virtual] |
Reimplemented from sp_instr.
Definition at line 2810 of file sp_head.cc.
References m_value.
02811 { 02812 /* 02813 Change <next instruction pointer>, so that this will be the last 02814 instruction in the stored function. 02815 */ 02816 02817 *nextp= UINT_MAX; 02818 02819 /* 02820 Evaluate the value of return expression and store it in current runtime 02821 context. 02822 02823 NOTE: It's necessary to evaluate result item right here, because we must 02824 do it in scope of execution the current context/block. 02825 */ 02826 02827 return thd->spcont->set_return_value(thd, &m_value); 02828 }
| int sp_instr_freturn::execute | ( | THD * | thd, | |
| uint * | nextp | |||
| ) | [virtual] |
Implements sp_instr.
Definition at line 2802 of file sp_head.cc.
References DBUG_ENTER, DBUG_RETURN, m_lex_keeper, sp_lex_keeper::reset_lex_and_exec_core(), and TRUE.
02803 { 02804 DBUG_ENTER("sp_instr_freturn::execute"); 02805 DBUG_RETURN(m_lex_keeper.reset_lex_and_exec_core(thd, nextp, TRUE, this)); 02806 }
Here is the call graph for this function:

| void sp_instr_freturn::operator= | ( | sp_instr_freturn & | ) | [private] |
Reimplemented from sp_instr.
Definition at line 851 of file sp_head.h.
References sp_instr::marked.
00852 { 00853 marked= 1; 00854 return UINT_MAX; 00855 }
| void sp_instr_freturn::print | ( | String * | str | ) | [virtual] |
Implements sp_instr.
Definition at line 2831 of file sp_head.cc.
References m_type, m_value, Item::print(), String::qs_append(), String::reserve(), and STRING_WITH_LEN.
02832 { 02833 /* freturn type expr... */ 02834 if (str->reserve(UINT_MAX+8+32)) // Add some for the expr. too 02835 return; 02836 str->qs_append(STRING_WITH_LEN("freturn ")); 02837 str->qs_append((uint)m_type); 02838 str->qs_append(' '); 02839 m_value->print(str); 02840 }
Here is the call graph for this function:

sp_lex_keeper sp_instr_freturn::m_lex_keeper [protected] |
enum enum_field_types sp_instr_freturn::m_type [protected] |
Item* sp_instr_freturn::m_value [protected] |
1.4.7

