diff options
author | Sergey Vojtovich <svoj@sun.com> | 2010-09-27 16:55:09 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@sun.com> | 2010-09-27 16:55:09 +0400 |
commit | 37afe1b34a20ffebe98381629ec615bd5957518a (patch) | |
tree | 9d2655f48144b0c9a7fe030e8c58bc01496c0a78 /sql/sql_plugin.h | |
parent | f4444c0016c68feb3f300c4b30b886cd407f5824 (diff) | |
download | mariadb-git-37afe1b34a20ffebe98381629ec615bd5957518a.tar.gz |
WL#5341 - Sticky plugins
This patch implements "permanent" load option for
plugins as specified by WL#5341.
mysql-test/r/plugin_load_option.result:
A test case for WL#5341.
mysql-test/t/plugin_load_option-master.opt:
A test case for WL#5341.
mysql-test/t/plugin_load_option.test:
A test case for WL#5341.
sql/share/errmsg-utf8.txt:
An error message for WL#5341.
sql/sql_plugin.cc:
Added FORCE_PLUS_PERMANENT plugin load option.
sql/sql_plugin.h:
Expose and use plugin load option instead of
is_mandatory flag. This is a requirement for
to-be-implemented WL5496.
Diffstat (limited to 'sql/sql_plugin.h')
-rw-r--r-- | sql/sql_plugin.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_plugin.h b/sql/sql_plugin.h index 079dc4e6dca..5fa9afb3066 100644 --- a/sql/sql_plugin.h +++ b/sql/sql_plugin.h @@ -32,6 +32,9 @@ class sys_var; enum SHOW_COMP_OPTION { SHOW_OPTION_YES, SHOW_OPTION_NO, SHOW_OPTION_DISABLED}; +enum enum_plugin_load_option { PLUGIN_OFF, PLUGIN_ON, PLUGIN_FORCE, + PLUGIN_FORCE_PLUS_PERMANENT }; +extern const char *global_plugin_typelib_names[]; #include <my_sys.h> @@ -95,7 +98,7 @@ struct st_plugin_int void *data; /* plugin type specific, e.g. handlerton */ MEM_ROOT mem_root; /* memory for dynamic plugin structures */ sys_var *system_vars; /* server variables for this plugin */ - bool is_mandatory; /* If true then plugin must not fail to load */ + enum enum_plugin_load_option load_option; /* OFF, ON, FORCE, F+PERMANENT */ }; @@ -110,6 +113,7 @@ typedef struct st_plugin_int *plugin_ref; #define plugin_data(pi,cast) ((cast)((pi)->data)) #define plugin_name(pi) (&((pi)->name)) #define plugin_state(pi) ((pi)->state) +#define plugin_load_option(pi) ((pi)->load_option) #define plugin_equals(p1,p2) ((p1) == (p2)) #else typedef struct st_plugin_int **plugin_ref; @@ -118,6 +122,7 @@ typedef struct st_plugin_int **plugin_ref; #define plugin_data(pi,cast) ((cast)((pi)[0]->data)) #define plugin_name(pi) (&((pi)[0]->name)) #define plugin_state(pi) ((pi)[0]->state) +#define plugin_load_option(pi) ((pi)[0]->load_option) #define plugin_equals(p1,p2) ((p1) && (p2) && (p1)[0] == (p2)[0]) #endif |