#include <sp_head.h>
Inheritance diagram for sp_instr_set:


Public Member Functions | |
| sp_instr_set (uint ip, sp_pcontext *ctx, uint offset, Item *val, enum enum_field_types type, LEX *lex, bool lex_resp) | |
| virtual | ~sp_instr_set () |
| virtual int | execute (THD *thd, uint *nextp) |
| virtual int | exec_core (THD *thd, uint *nextp) |
| virtual void | print (String *str) |
Private Member Functions | |
| sp_instr_set (const sp_instr_set &) | |
| void | operator= (sp_instr_set &) |
Private Attributes | |
| uint | m_offset |
| Item * | m_value |
| enum enum_field_types | m_type |
| sp_lex_keeper | m_lex_keeper |
Definition at line 630 of file sp_head.h.
| sp_instr_set::sp_instr_set | ( | const sp_instr_set & | ) | [private] |
| sp_instr_set::sp_instr_set | ( | uint | ip, | |
| sp_pcontext * | ctx, | |||
| uint | offset, | |||
| Item * | val, | |||
| enum enum_field_types | type, | |||
| LEX * | lex, | |||
| bool | lex_resp | |||
| ) | [inline] |
| virtual sp_instr_set::~sp_instr_set | ( | ) | [inline, virtual] |
| int sp_instr_set::exec_core | ( | THD * | thd, | |
| uint * | nextp | |||
| ) | [virtual] |
Reimplemented from sp_instr.
Definition at line 2555 of file sp_head.cc.
References ER_OUT_OF_RESOURCES, sp_instr::m_ip, m_offset, m_value, my_error(), and MYF.
02556 { 02557 int res= thd->spcont->set_variable(thd, m_offset, &m_value); 02558 02559 if (res && thd->spcont->found_handler_here()) 02560 { 02561 /* 02562 Failed to evaluate the value, and a handler has been found. Reset the 02563 variable to NULL. 02564 */ 02565 02566 if (thd->spcont->set_variable(thd, m_offset, 0)) 02567 { 02568 /* If this also failed, let's abort. */ 02569 02570 sp_rcontext *spcont= thd->spcont; 02571 02572 thd->spcont= 0; /* Avoid handlers */ 02573 my_error(ER_OUT_OF_RESOURCES, MYF(0)); 02574 spcont->clear_handler(); 02575 thd->spcont= spcont; 02576 } 02577 } 02578 02579 *nextp = m_ip+1; 02580 return res; 02581 }
Here is the call graph for this function:

| int sp_instr_set::execute | ( | THD * | thd, | |
| uint * | nextp | |||
| ) | [virtual] |
Implements sp_instr.
Definition at line 2545 of file sp_head.cc.
References DBUG_ENTER, DBUG_PRINT, DBUG_RETURN, m_lex_keeper, m_offset, sp_lex_keeper::reset_lex_and_exec_core(), and TRUE.
02546 { 02547 DBUG_ENTER("sp_instr_set::execute"); 02548 DBUG_PRINT("info", ("offset: %u", m_offset)); 02549 02550 DBUG_RETURN(m_lex_keeper.reset_lex_and_exec_core(thd, nextp, TRUE, this)); 02551 }
Here is the call graph for this function:

| void sp_instr_set::operator= | ( | sp_instr_set & | ) | [private] |
| void sp_instr_set::print | ( | String * | str | ) | [virtual] |
Implements sp_instr.
Definition at line 2584 of file sp_head.cc.
References sp_pcontext::find_variable(), LEX_STRING::length, sp_instr::m_ctx, m_offset, m_value, sp_variable::name, Item::print(), String::qs_append(), String::reserve(), SP_INSTR_UINT_MAXLEN, LEX_STRING::str, and STRING_WITH_LEN.
02585 { 02586 /* set name@offset ... */ 02587 int rsrv = SP_INSTR_UINT_MAXLEN+6; 02588 sp_variable_t *var = m_ctx->find_variable(m_offset); 02589 02590 /* 'var' should always be non-null, but just in case... */ 02591 if (var) 02592 rsrv+= var->name.length; 02593 if (str->reserve(rsrv)) 02594 return; 02595 str->qs_append(STRING_WITH_LEN("set ")); 02596 if (var) 02597 { 02598 str->qs_append(var->name.str, var->name.length); 02599 str->qs_append('@'); 02600 } 02601 str->qs_append(m_offset); 02602 str->qs_append(' '); 02603 m_value->print(str); 02604 }
Here is the call graph for this function:

sp_lex_keeper sp_instr_set::m_lex_keeper [private] |
uint sp_instr_set::m_offset [private] |
enum enum_field_types sp_instr_set::m_type [private] |
Item* sp_instr_set::m_value [private] |
1.4.7

