From 313ed85e8bdff8788dc5c78cf6a8da2f2c6a82ec Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 7 Apr 2006 16:53:15 +0200 Subject: Renaming sp_pcontext members and methods; less cryptic and more consistent. Also added comments, and fixing some coding style (mostly in comments too). There are no functional changes, so no tests or documentation needed. (This was originally part of a bugfix, but it was decided to not include this in that patch; instead it's done separately.) sql/sp_head.cc: Renaming sp_pcontext members and methods; less cryptic and more consistent. sql/sp_head.h: Renaming sp_pcontext members and methods; less cryptic and more consistent. sql/sp_pcontext.cc: Renaming sp_pcontext members and methods; less cryptic and more consistent. Also added comments, and fixing some coding style (mostly in comments too). sql/sp_pcontext.h: Renaming sp_pcontext members and methods; less cryptic and more consistent. Also added comments, and fixing some coding style (mostly in comments too). sql/sp_rcontext.cc: Renaming sp_pcontext members and methods; less cryptic and more consistent. sql/sp_rcontext.h: Renaming sp_pcontext members and methods; less cryptic and more consistent. sql/sql_yacc.yy: Renaming sp_pcontext members and methods; less cryptic and more consistent. --- sql/sp_rcontext.cc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'sql/sp_rcontext.cc') diff --git a/sql/sp_rcontext.cc b/sql/sp_rcontext.cc index af4e41c29be..38b6de0e75a 100644 --- a/sql/sp_rcontext.cc +++ b/sql/sp_rcontext.cc @@ -73,16 +73,16 @@ bool sp_rcontext::init(THD *thd) return !(m_handler= - (sp_handler_t*)thd->alloc(m_root_parsing_ctx->max_handlers() * + (sp_handler_t*)thd->alloc(m_root_parsing_ctx->max_handler_index() * sizeof(sp_handler_t))) || !(m_hstack= - (uint*)thd->alloc(m_root_parsing_ctx->max_handlers() * + (uint*)thd->alloc(m_root_parsing_ctx->max_handler_index() * sizeof(uint))) || !(m_in_handler= - (uint*)thd->alloc(m_root_parsing_ctx->max_handlers() * + (uint*)thd->alloc(m_root_parsing_ctx->max_handler_index() * sizeof(uint))) || !(m_cstack= - (sp_cursor**)thd->alloc(m_root_parsing_ctx->max_cursors() * + (sp_cursor**)thd->alloc(m_root_parsing_ctx->max_cursor_index() * sizeof(sp_cursor*))) || !(m_case_expr_holders= (Item_cache**)thd->calloc(m_root_parsing_ctx->get_num_case_exprs() * @@ -105,12 +105,12 @@ sp_rcontext::init_var_table(THD *thd) { List field_def_lst; - if (!m_root_parsing_ctx->total_pvars()) + if (!m_root_parsing_ctx->max_var_index()) return FALSE; m_root_parsing_ctx->retrieve_field_definitions(&field_def_lst); - DBUG_ASSERT(field_def_lst.elements == m_root_parsing_ctx->total_pvars()); + DBUG_ASSERT(field_def_lst.elements == m_root_parsing_ctx->max_var_index()); if (!(m_var_table= create_virtual_tmp_table(thd, field_def_lst))) return TRUE; @@ -134,7 +134,7 @@ bool sp_rcontext::init_var_items() { uint idx; - uint num_vars= m_root_parsing_ctx->total_pvars(); + uint num_vars= m_root_parsing_ctx->max_var_index(); if (!(m_var_items= (Item**) sql_alloc(num_vars * sizeof (Item *)))) return TRUE; @@ -381,7 +381,7 @@ sp_cursor::destroy() int -sp_cursor::fetch(THD *thd, List *vars) +sp_cursor::fetch(THD *thd, List *vars) { if (! server_side_cursor) { @@ -528,9 +528,9 @@ int Select_fetch_into_spvars::prepare(List &fields, SELECT_LEX_UNIT *u) bool Select_fetch_into_spvars::send_data(List &items) { - List_iterator_fast pv_iter(*spvar_list); + List_iterator_fast spvar_iter(*spvar_list); List_iterator_fast item_iter(items); - sp_pvar_t *pv; + sp_variable_t *spvar; Item *item; /* Must be ensured by the caller */ @@ -540,9 +540,9 @@ bool Select_fetch_into_spvars::send_data(List &items) Assign the row fetched from a server side cursor to stored procedure variables. */ - for (; pv= pv_iter++, item= item_iter++; ) + for (; spvar= spvar_iter++, item= item_iter++; ) { - if (thd->spcont->set_variable(thd, pv->offset, item)) + if (thd->spcont->set_variable(thd, spvar->offset, item)) return TRUE; } return FALSE; -- cgit v1.2.1