diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-07-12 11:57:47 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-07-12 11:57:47 +0400 |
commit | 7c3df72d0a627aa6c12af14d57b2664af7f8b380 (patch) | |
tree | 9653ac4cee54b8e8a0210023c7abfe5f00ec4fb4 /sql/sp_head.h | |
parent | 31b35118490357063047755d849ab4c8687ce938 (diff) | |
download | mariadb-git-7c3df72d0a627aa6c12af14d57b2664af7f8b380.tar.gz |
MDEV-13298 Change sp_head::m_chistics from a pointer to a structure
Diffstat (limited to 'sql/sp_head.h')
-rw-r--r-- | sql/sp_head.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/sql/sp_head.h b/sql/sp_head.h index cf05d47a95c..1435bb460c3 100644 --- a/sql/sp_head.h +++ b/sql/sp_head.h @@ -179,7 +179,15 @@ public: Column_definition m_return_field_def; /**< This is used for FUNCTIONs only. */ const char *m_tmp_query; ///< Temporary pointer to sub query string - st_sp_chistics *m_chistics; +private: + /* + Private to guarantee that m_chistics.comment is properly set to: + - a string which is alloced on this->mem_root + - or (NULL,0) + set_chistics() makes sure this. + */ + Sp_chistics m_chistics; +public: sql_mode_t m_sql_mode; ///< For SHOW CREATE and execution bool m_explicit_name; /**< Prepend the db name? */ LEX_CSTRING m_qname; ///< db.name @@ -189,6 +197,12 @@ public: LEX_CSTRING m_defstr; AUTHID m_definer; + const st_sp_chistics &chistics() const { return m_chistics; } + const LEX_CSTRING &comment() const { return m_chistics.comment; } + void set_suid(enum_sp_suid_behaviour suid) { m_chistics.suid= suid; } + enum_sp_suid_behaviour suid() const { return m_chistics.suid; } + bool detistic() const { return m_chistics.detistic; } + enum_sp_data_access daccess() const { return m_chistics.daccess; } /** Is this routine being executed? */ @@ -671,8 +685,9 @@ public: m_flags|= sp_head::HAS_COLUMN_TYPE_REFS; } + void set_chistics(const st_sp_chistics &chistics); void set_info(longlong created, longlong modified, - const st_sp_chistics *chistics, sql_mode_t sql_mode); + const st_sp_chistics &chistics, sql_mode_t sql_mode); void set_definer(const char *definer, uint definerlen); void set_definer(const LEX_CSTRING *user_name, const LEX_CSTRING *host_name) |