summaryrefslogtreecommitdiff
path: root/sql/sp_rcontext.cc
diff options
context:
space:
mode:
authorunknown <pem@mysql.com>2006-04-07 16:53:15 +0200
committerunknown <pem@mysql.com>2006-04-07 16:53:15 +0200
commit148cf113e590e4f465c5c1c608ba4cf848abc388 (patch)
treed1ea49f47c3b15c046b21220b75e5683fcb2eb7f /sql/sp_rcontext.cc
parent70f4dbaa6e67d61df5ad19da47bcd2338e4eb7f3 (diff)
downloadmariadb-git-148cf113e590e4f465c5c1c608ba4cf848abc388.tar.gz
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.
Diffstat (limited to 'sql/sp_rcontext.cc')
-rw-r--r--sql/sp_rcontext.cc24
1 files changed, 12 insertions, 12 deletions
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<create_field> 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<struct sp_pvar> *vars)
+sp_cursor::fetch(THD *thd, List<struct sp_variable> *vars)
{
if (! server_side_cursor)
{
@@ -528,9 +528,9 @@ int Select_fetch_into_spvars::prepare(List<Item> &fields, SELECT_LEX_UNIT *u)
bool Select_fetch_into_spvars::send_data(List<Item> &items)
{
- List_iterator_fast<struct sp_pvar> pv_iter(*spvar_list);
+ List_iterator_fast<struct sp_variable> spvar_iter(*spvar_list);
List_iterator_fast<Item> 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<Item> &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;