diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-10-19 12:57:00 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-10-19 12:57:00 +0400 |
commit | e156db85a75b2a15b89ebc5f65eedb07e0574420 (patch) | |
tree | cbfe89a343d723c0cc7e9317f1ca2bfd41e9b46a /sql/sp_rcontext.cc | |
parent | f5e09b5f8f768c8758a024bcb6297851144a8f39 (diff) | |
download | mariadb-git-e156db85a75b2a15b89ebc5f65eedb07e0574420.tar.gz |
sp_rcontext::sp cleanup
- Renaming sp_rcontext::sp to sp_rcontext:m_sp for consistency
with other sp_rcontext_members, and for consistency with the
same purpose member Item_sp_variable::m_sp.
- Passing a "const sp_head*" pointer to sp_rcontext::sp_rcontext()
and to sp_rcontext::create().
Initializing sp_rcontext::m_sp right in the constructor
instead of having a separate initialization after "new sp_rcontext"
or sp_rcontext::create().
- Adding the "const" qualifier to sp_rcontext::m_sp and Item_sp_variable::m_sp
Diffstat (limited to 'sql/sp_rcontext.cc')
-rw-r--r-- | sql/sp_rcontext.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/sp_rcontext.cc b/sql/sp_rcontext.cc index 8290a927a77..96913f8619f 100644 --- a/sql/sp_rcontext.cc +++ b/sql/sp_rcontext.cc @@ -35,10 +35,14 @@ /////////////////////////////////////////////////////////////////////////// -sp_rcontext::sp_rcontext(const sp_pcontext *root_parsing_ctx, +sp_rcontext::sp_rcontext(const sp_head *owner, + const sp_pcontext *root_parsing_ctx, Field *return_value_fld, bool in_sub_stmt) :end_partial_result_set(false), +#ifndef DBUG_OFF + m_sp(owner), +#endif m_root_parsing_ctx(root_parsing_ctx), m_var_table(NULL), m_return_value_fld(return_value_fld), @@ -59,11 +63,13 @@ sp_rcontext::~sp_rcontext() sp_rcontext *sp_rcontext::create(THD *thd, + const sp_head *owner, const sp_pcontext *root_parsing_ctx, Field *return_value_fld, Row_definition_list &field_def_lst) { - sp_rcontext *ctx= new (thd->mem_root) sp_rcontext(root_parsing_ctx, + sp_rcontext *ctx= new (thd->mem_root) sp_rcontext(owner, + root_parsing_ctx, return_value_fld, thd->in_sub_stmt); if (!ctx) |