mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
WL#2936
"Server variables for plugins"
Post review fixes.
client/mysql.cc:
wl2936 "Plugin server variables" post review fixes
compile fix. app_type is now a void* and it isn't actually used here.
include/my_getopt.h:
wl2936 "Plugin server variables" post review fixes
make app_type into a void*. This also required changes to
client/mysql.cc and storage/ndb/src/mgmsrv/InitConfigFileParser.cpp
in order to compile.
include/my_global.h:
wl2936 "Plugin server variables" post-review fixes
declare compile_time_assert() macro.
(provided by serg)
include/mysql/plugin.h:
wl2936 "Plugin server variables" post review fixes
Add comments
mysys/array.c:
wl2936 "Plugin server variables" post review fixes
mysys/typelib.c:
wl2936 "Plugin server variables" post review fixes
find_typeset() should not alter string
sql/set_var.cc:
wl2936 "Plugin server variables" post review fixes
remove unnecessary code.
sql/sql_class.cc:
wl2936 "Plugin server variables" post review fixes
explicitly declare export style for functions.
sql/sql_lex.cc:
wl2936 "Plugin server variables" post review fixes
enforce that lex::plugins_static_buffer is declared immediately after
lex::plugins.
sql/sql_plugin.cc:
wl2936 "Plugin Server variables" post review fixes
sys_var_pluginvar does not need st_plugin_int at construction.
remove debug code which was accidentially committed.
add comments.
fix mutex lock order.
sql/sql_plugin.h:
wl2936 "Plugin server variables" post review fixes
add comment and macro to compare plugin_refs
sql/table.cc:
wl2936 "plugin server variables" post review fixes
remove unneccessary unlock and variable.
add checks for legacy type validity
storage/ndb/src/mgmsrv/InitConfigFileParser.cpp:
wl2936 "plugin server variables" post review fixes
fix compile failure now that my_option::app_type is a void*
This commit is contained in:
@@ -79,6 +79,11 @@ struct st_plugin_int
|
||||
sys_var *system_vars; /* server variables for this plugin */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
See intern_plugin_lock() for the explanation for the
|
||||
conditionally defined plugin_ref type
|
||||
*/
|
||||
#ifdef DBUG_OFF
|
||||
typedef struct st_plugin_int *plugin_ref;
|
||||
#define plugin_decl(pi) ((pi)->plugin)
|
||||
@@ -86,6 +91,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_equals(p1,p2) ((p1) == (p2))
|
||||
#else
|
||||
typedef struct st_plugin_int **plugin_ref;
|
||||
#define plugin_decl(pi) ((pi)[0]->plugin)
|
||||
@@ -93,6 +99,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_equals(p1,p2) ((p1) && (p2) && (p1)[0] == (p2)[0])
|
||||
#endif
|
||||
|
||||
typedef int (*plugin_type_init)(struct st_plugin_int *);
|
||||
|
||||
Reference in New Issue
Block a user