1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

remove sys_var specific restore_pluginvar_names() function,

use generic restore_ptr_backup() approach
This commit is contained in:
Sergei Golubchik
2013-12-09 12:39:19 +01:00
parent 47ee721923
commit f6fcb348ad
2 changed files with 78 additions and 67 deletions

View File

@@ -85,6 +85,7 @@ struct st_ptr_backup {
void **ptr;
void *value;
void save(void **p) { ptr= p; value= *p; }
void save(const char **p) { save((void**)p); }
void restore() { *ptr= value; }
};
@@ -108,6 +109,8 @@ struct st_plugin_int
LEX_STRING name;
struct st_maria_plugin *plugin;
struct st_plugin_dl *plugin_dl;
st_ptr_backup *ptr_backup;
uint nbackups;
uint state;
uint ref_count; /* number of threads using the plugin */
uint locks_total; /* how many times the plugin was locked */