diff options
author | Kristian Nielsen <knielsen@knielsen-hq.org> | 2017-04-20 16:19:01 +0200 |
---|---|---|
committer | Kristian Nielsen <knielsen@knielsen-hq.org> | 2017-04-21 10:30:17 +0200 |
commit | 8953c7e48426671f8fb3a68cae22eb7a00cfee61 (patch) | |
tree | 484da6ca719b02bbf8d5fd6f199a7b85e84e297a /sql/set_var.h | |
parent | 00eebb22435c871bbe9938582d96e6a3d1c00861 (diff) | |
download | mariadb-git-8953c7e48426671f8fb3a68cae22eb7a00cfee61.tar.gz |
MDEV-12179: Per-engine mysql.gtid_slave_pos table
Intermediate commit.
Fix engine list lifetime for sys_var_pluginlist.
The Sys_var class assumes that some operations can be done without
explicitly freeing resources, for example default_value_ptr(). Thus,
methods (like Sys_var_pluginlist::do_check) need to generally work
with temporary lists, which are registered in the THD to be
freed/unlocked automatically. And do_update() needs to make a
permanent copy to store in the global variable.
Diffstat (limited to 'sql/set_var.h')
-rw-r--r-- | sql/set_var.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/set_var.h b/sql/set_var.h index cdd0f7da1ba..66a3eeae42d 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -423,10 +423,11 @@ int sys_var_init(); uint sys_var_elements(); int sys_var_add_options(DYNAMIC_ARRAY *long_options, int parse_flags); void sys_var_end(void); -plugin_ref *resolve_engine_list(const char *str_arg, size_t str_arg_len, - bool error_on_unknown_engine); +plugin_ref *resolve_engine_list(THD *thd, const char *str_arg, size_t str_arg_len, + bool error_on_unknown_engine, bool temp_copy); void free_engine_list(plugin_ref *list); plugin_ref *copy_engine_list(plugin_ref *list); +plugin_ref *temp_copy_engine_list(THD *thd, plugin_ref *list); char *pretty_print_engine_list(THD *thd, plugin_ref *list); #endif |