From e156db85a75b2a15b89ebc5f65eedb07e0574420 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Thu, 19 Oct 2017 12:57:00 +0400 Subject: 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 --- sql/sp_rcontext.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sql/sp_rcontext.h') diff --git a/sql/sp_rcontext.h b/sql/sp_rcontext.h index 9a4a8e27032..5e5bca62982 100644 --- a/sql/sp_rcontext.h +++ b/sql/sp_rcontext.h @@ -70,6 +70,7 @@ public: /// /// @return valid sp_rcontext object or NULL in case of OOM-error. static sp_rcontext *create(THD *thd, + const sp_head *owner, const sp_pcontext *root_parsing_ctx, Field *return_value_fld, Row_definition_list &defs); @@ -77,7 +78,8 @@ public: ~sp_rcontext(); private: - sp_rcontext(const sp_pcontext *root_parsing_ctx, + sp_rcontext(const sp_head *owner, + const sp_pcontext *root_parsing_ctx, Field *return_value_fld, bool in_sub_stmt); @@ -180,7 +182,7 @@ public: #ifndef DBUG_OFF /// The stored program for which this runtime context is created. Used for /// checking if correct runtime context is used for variable handling. - sp_head *sp; + const sp_head *m_sp; #endif ///////////////////////////////////////////////////////////////////////// -- cgit v1.2.1