diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2021-08-02 10:11:41 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2021-08-02 10:11:41 +0200 |
commit | 6efb5e9f5e3cd3ec811ae832a67e1878c14f0dea (patch) | |
tree | b7c1a18b8bbc638ee12951d1d04db6d21bebcaed /sql/sql_plugin.cc | |
parent | 07674e6a741a82d2e30f9798f699209a6c34dfef (diff) | |
parent | ec8882b9ddbba2f9fc3571a1ac2ade0dabf412d9 (diff) | |
download | mariadb-git-6efb5e9f5e3cd3ec811ae832a67e1878c14f0dea.tar.gz |
Merge branch '10.5' into 10.6
Diffstat (limited to 'sql/sql_plugin.cc')
-rw-r--r-- | sql/sql_plugin.cc | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index c7a93a72a99..ab13e8cc569 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -313,14 +313,14 @@ public: sys_var_pluginvar(sys_var_chain *chain, const char *name_arg, st_plugin_int *p, st_mysql_sys_var *plugin_var_arg); sys_var_pluginvar *cast_pluginvar() { return this; } - uchar* real_value_ptr(THD *thd, enum_var_type type); - TYPELIB* plugin_var_typelib(void); - uchar* do_value_ptr(THD *thd, enum_var_type type, const LEX_CSTRING *base); - uchar* session_value_ptr(THD *thd, const LEX_CSTRING *base) + uchar* real_value_ptr(THD *thd, enum_var_type type) const; + TYPELIB* plugin_var_typelib(void) const; + const uchar* do_value_ptr(THD *thd, enum_var_type type, const LEX_CSTRING *base) const; + const uchar* session_value_ptr(THD *thd, const LEX_CSTRING *base) const { return do_value_ptr(thd, OPT_SESSION, base); } - uchar* global_value_ptr(THD *thd, const LEX_CSTRING *base) + const uchar* global_value_ptr(THD *thd, const LEX_CSTRING *base) const { return do_value_ptr(thd, OPT_GLOBAL, base); } - uchar *default_value_ptr(THD *thd) + const uchar *default_value_ptr(THD *thd) const { return do_value_ptr(thd, OPT_DEFAULT, 0); } bool do_check(THD *thd, set_var *var); virtual void session_save_default(THD *thd, set_var *var) {} @@ -3428,7 +3428,7 @@ sys_var_pluginvar::sys_var_pluginvar(sys_var_chain *chain, const char *name_arg, plugin_opt_set_limits(&option, pv); } -uchar* sys_var_pluginvar::real_value_ptr(THD *thd, enum_var_type type) +uchar* sys_var_pluginvar::real_value_ptr(THD *thd, enum_var_type type) const { if (type == OPT_DEFAULT) { @@ -3502,7 +3502,7 @@ bool sys_var_pluginvar::session_is_default(THD *thd) } -TYPELIB* sys_var_pluginvar::plugin_var_typelib(void) +TYPELIB* sys_var_pluginvar::plugin_var_typelib(void) const { switch (plugin_var->flags & (PLUGIN_VAR_TYPEMASK | PLUGIN_VAR_THDLOCAL)) { case PLUGIN_VAR_ENUM: @@ -3520,12 +3520,10 @@ TYPELIB* sys_var_pluginvar::plugin_var_typelib(void) } -uchar* sys_var_pluginvar::do_value_ptr(THD *thd, enum_var_type type, - const LEX_CSTRING *base) +const uchar* sys_var_pluginvar::do_value_ptr(THD *thd, enum_var_type type, + const LEX_CSTRING *base) const { - uchar* result; - - result= real_value_ptr(thd, type); + const uchar* result= real_value_ptr(thd, type); if ((plugin_var->flags & PLUGIN_VAR_TYPEMASK) == PLUGIN_VAR_ENUM) result= (uchar*) get_type(plugin_var_typelib(), *(ulong*)result); |