mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
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.
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user