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


Public Member Functions | |
| sp_instr_cfetch (uint ip, sp_pcontext *ctx, uint c) | |
| virtual | ~sp_instr_cfetch () |
| virtual int | execute (THD *thd, uint *nextp) |
| virtual void | print (String *str) |
| void | add_to_varlist (struct sp_variable *var) |
Private Member Functions | |
| sp_instr_cfetch (const sp_instr_cfetch &) | |
| void | operator= (sp_instr_cfetch &) |
Private Attributes | |
| uint | m_cursor |
| List< struct sp_variable > | m_varlist |
Definition at line 1072 of file sp_head.h.
| sp_instr_cfetch::sp_instr_cfetch | ( | const sp_instr_cfetch & | ) | [private] |
| sp_instr_cfetch::sp_instr_cfetch | ( | uint | ip, | |
| sp_pcontext * | ctx, | |||
| uint | c | |||
| ) | [inline] |
| virtual sp_instr_cfetch::~sp_instr_cfetch | ( | ) | [inline, virtual] |
| void sp_instr_cfetch::add_to_varlist | ( | struct sp_variable * | var | ) | [inline] |
| int sp_instr_cfetch::execute | ( | THD * | thd, | |
| uint * | nextp | |||
| ) | [virtual] |
Implements sp_instr.
Definition at line 3182 of file sp_head.cc.
References DBUG_ENTER, DBUG_RETURN, sp_cursor::fetch(), m_cursor, sp_instr::m_ip, and m_varlist.
03183 { 03184 sp_cursor *c= thd->spcont->get_cursor(m_cursor); 03185 int res; 03186 Query_arena backup_arena; 03187 DBUG_ENTER("sp_instr_cfetch::execute"); 03188 03189 res= c ? c->fetch(thd, &m_varlist) : -1; 03190 03191 *nextp= m_ip+1; 03192 DBUG_RETURN(res); 03193 }
Here is the call graph for this function:

| void sp_instr_cfetch::operator= | ( | sp_instr_cfetch & | ) | [private] |
| void sp_instr_cfetch::print | ( | String * | str | ) | [virtual] |
Implements sp_instr.
Definition at line 3197 of file sp_head.cc.
References sp_pcontext::find_cursor(), LEX_STRING::length, sp_instr::m_ctx, m_cursor, m_varlist, n, sp_variable::name, sp_variable::offset, String::qs_append(), String::reserve(), SP_INSTR_UINT_MAXLEN, LEX_STRING::str, and STRING_WITH_LEN.
03198 { 03199 List_iterator_fast<struct sp_variable> li(m_varlist); 03200 sp_variable_t *pv; 03201 LEX_STRING n; 03202 my_bool found= m_ctx->find_cursor(m_cursor, &n); 03203 /* cfetch name@offset vars... */ 03204 uint rsrv= SP_INSTR_UINT_MAXLEN+8; 03205 03206 if (found) 03207 rsrv+= n.length; 03208 if (str->reserve(rsrv)) 03209 return; 03210 str->qs_append(STRING_WITH_LEN("cfetch ")); 03211 if (found) 03212 { 03213 str->qs_append(n.str, n.length); 03214 str->qs_append('@'); 03215 } 03216 str->qs_append(m_cursor); 03217 while ((pv= li++)) 03218 { 03219 if (str->reserve(pv->name.length+SP_INSTR_UINT_MAXLEN+2)) 03220 return; 03221 str->qs_append(' '); 03222 str->qs_append(pv->name.str, pv->name.length); 03223 str->qs_append('@'); 03224 str->qs_append(pv->offset); 03225 } 03226 }
Here is the call graph for this function:

uint sp_instr_cfetch::m_cursor [private] |
List<struct sp_variable> sp_instr_cfetch::m_varlist [private] |
Definition at line 1100 of file sp_head.h.
Referenced by add_to_varlist(), execute(), print(), and sp_instr_cfetch().
1.4.7

