diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-04-09 23:27:24 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-04-09 23:27:24 +0200 |
commit | 5f293dd694f9b1b4a0bdf73bb6ae80cda70f21d4 (patch) | |
tree | 24dde5c436f3c2687619de02e4ab5f4f957ff789 /sql/sql_plugin.cc | |
parent | 7d3288129f6e5b52c7377ff68295f51606c7f002 (diff) | |
download | mariadb-git-5f293dd694f9b1b4a0bdf73bb6ae80cda70f21d4.tar.gz |
MDEV-4022 table attributes with sysvar as a default value
Diffstat (limited to 'sql/sql_plugin.cc')
-rw-r--r-- | sql/sql_plugin.cc | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index b19d6853164..6cf1050998b 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -308,8 +308,6 @@ static void unlock_variables(THD *thd, struct system_variables *vars); static void cleanup_variables(THD *thd, struct system_variables *vars); static void plugin_vars_free_values(sys_var *vars); static void restore_pluginvar_names(sys_var *first); -static void plugin_opt_set_limits(struct my_option *, - const struct st_mysql_sys_var *); static plugin_ref intern_plugin_lock(LEX *lex, plugin_ref plugin); static void intern_plugin_unlock(LEX *lex, plugin_ref plugin); static void reap_plugins(void); @@ -3286,8 +3284,8 @@ bool sys_var_pluginvar::global_update(THD *thd, set_var *var) options->block_size= (long) (opt)->blk_sz -static void plugin_opt_set_limits(struct my_option *options, - const struct st_mysql_sys_var *opt) +void plugin_opt_set_limits(struct my_option *options, + const struct st_mysql_sys_var *opt) { options->sub_size= 0; @@ -3866,3 +3864,18 @@ void add_plugin_options(DYNAMIC_ARRAY *options, MEM_ROOT *mem_root) } } + +/** + Returns a sys_var corresponding to a particular MYSQL_SYSVAR(...) +*/ +sys_var *find_plugin_sysvar(st_plugin_int *plugin, st_mysql_sys_var *plugin_var) +{ + for (sys_var *var= plugin->system_vars; var; var= var->next) + { + sys_var_pluginvar *pvar=var->cast_pluginvar(); + if (pvar->plugin_var == plugin_var) + return var; + } + return 0; +} + |