From eac12b6587c53d34f0241c404fb0ce8c5ee0da93 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 23 Mar 2007 10:14:46 -0700 Subject: 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* --- storage/ndb/src/mgmsrv/InitConfigFileParser.cpp | 27 ++++++------------------- 1 file changed, 6 insertions(+), 21 deletions(-) (limited to 'storage/ndb/src/mgmsrv') diff --git a/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp b/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp index b63d4d8bc17..603fea4a6da 100644 --- a/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp +++ b/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp @@ -612,10 +612,11 @@ static my_bool parse_mycnf_opt(int, const struct my_option * opt, char * value) { + long *app_type= (long*) &opt->app_type; if(opt->comment) - ((struct my_option *)opt)->app_type++; + (*app_type)++; else - ((struct my_option *)opt)->app_type = order++; + *app_type = order++; return 0; } @@ -948,22 +949,6 @@ end: template class Vector; -#if 0 -struct my_option -{ - const char *name; /* Name of the option */ - int id; /* unique id or short option */ - const char *comment; /* option comment, for autom. --help */ - gptr *value; /* The variable value */ - gptr *u_max_value; /* The user def. max variable value */ - const char **str_values; /* Pointer to possible values */ - ulong var_type; - enum get_opt_arg_type arg_type; - longlong def_value; /* Default value */ - longlong min_value; /* Min allowed value */ - longlong max_value; /* Max allowed value */ - longlong sub_size; /* Subtract this from given value */ - long block_size; /* Value should be a mult. of this */ - int app_type; /* To be used by an application */ -}; -#endif +/* + See include/my_getopt.h for the declaration of struct my_option +*/ -- cgit v1.2.1