Bug#42610 Dynamic plugin broken in 5.1.31
added ignore-builtin-innodb option which disabled initialization of builtin InnoDB plugin mysql-test/r/innodb_ignore_builtin.result: test case mysql-test/t/innodb_ignore_builtin-master.opt: test case mysql-test/t/innodb_ignore_builtin.test: test case sql/mysql_priv.h: added ignore-builtin-innodb option which disabled initialization of builtin InnoDB plugin sql/mysqld.cc: added ignore-builtin-innodb option which disabled initialization of builtin InnoDB plugin sql/set_var.cc: added ignore-builtin-innodb option which disabled initialization of builtin InnoDB plugin sql/sql_plugin.cc: added ignore-builtin-innodb option which disabled initialization of builtin InnoDB plugin
This commit is contained in:
parent
461cad77b4
commit
4d0557a2e6
9
mysql-test/r/innodb_ignore_builtin.result
Normal file
9
mysql-test/r/innodb_ignore_builtin.result
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
show variables like 'ignore_builtin_innodb';
|
||||||
|
Variable_name Value
|
||||||
|
ignore_builtin_innodb ON
|
||||||
|
select PLUGIN_NAME from information_schema.plugins
|
||||||
|
where PLUGIN_NAME = "InnoDb";
|
||||||
|
PLUGIN_NAME
|
||||||
|
select ENGINE from information_schema.engines
|
||||||
|
where ENGINE = "InnoDB";
|
||||||
|
ENGINE
|
1
mysql-test/t/innodb_ignore_builtin-master.opt
Normal file
1
mysql-test/t/innodb_ignore_builtin-master.opt
Normal file
@ -0,0 +1 @@
|
|||||||
|
--ignore_builtin_innodb
|
8
mysql-test/t/innodb_ignore_builtin.test
Normal file
8
mysql-test/t/innodb_ignore_builtin.test
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#
|
||||||
|
# Bug #42610: Dynamic plugin broken in 5.1.31
|
||||||
|
#
|
||||||
|
show variables like 'ignore_builtin_innodb';
|
||||||
|
select PLUGIN_NAME from information_schema.plugins
|
||||||
|
where PLUGIN_NAME = "InnoDb";
|
||||||
|
select ENGINE from information_schema.engines
|
||||||
|
where ENGINE = "InnoDB";
|
@ -1953,6 +1953,7 @@ extern my_bool opt_log, opt_slow_log;
|
|||||||
extern ulong log_output_options;
|
extern ulong log_output_options;
|
||||||
extern my_bool opt_log_queries_not_using_indexes;
|
extern my_bool opt_log_queries_not_using_indexes;
|
||||||
extern bool opt_disable_networking, opt_skip_show_db;
|
extern bool opt_disable_networking, opt_skip_show_db;
|
||||||
|
extern bool opt_ignore_builtin_innodb;
|
||||||
extern my_bool opt_character_set_client_handshake;
|
extern my_bool opt_character_set_client_handshake;
|
||||||
extern bool volatile abort_loop, shutdown_in_progress;
|
extern bool volatile abort_loop, shutdown_in_progress;
|
||||||
extern uint volatile thread_count, thread_running, global_read_lock;
|
extern uint volatile thread_count, thread_running, global_read_lock;
|
||||||
|
@ -378,7 +378,7 @@ static pthread_cond_t COND_thread_cache, COND_flush_thread_cache;
|
|||||||
|
|
||||||
/* Global variables */
|
/* Global variables */
|
||||||
|
|
||||||
bool opt_update_log, opt_bin_log;
|
bool opt_update_log, opt_bin_log, opt_ignore_builtin_innodb= 0;
|
||||||
my_bool opt_log, opt_slow_log;
|
my_bool opt_log, opt_slow_log;
|
||||||
ulong log_output_options;
|
ulong log_output_options;
|
||||||
my_bool opt_log_queries_not_using_indexes= 0;
|
my_bool opt_log_queries_not_using_indexes= 0;
|
||||||
@ -5585,7 +5585,8 @@ enum options_mysqld
|
|||||||
OPT_OLD_MODE,
|
OPT_OLD_MODE,
|
||||||
OPT_SLAVE_EXEC_MODE,
|
OPT_SLAVE_EXEC_MODE,
|
||||||
OPT_GENERAL_LOG_FILE,
|
OPT_GENERAL_LOG_FILE,
|
||||||
OPT_SLOW_QUERY_LOG_FILE
|
OPT_SLOW_QUERY_LOG_FILE,
|
||||||
|
OPT_IGNORE_BUILTIN_INNODB
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -5791,6 +5792,9 @@ Disable with --skip-large-pages.",
|
|||||||
(uchar**) &opt_large_pages, (uchar**) &opt_large_pages, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
(uchar**) &opt_large_pages, (uchar**) &opt_large_pages, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||||
0, 0, 0},
|
0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
|
{"ignore-builtin-innodb", OPT_IGNORE_BUILTIN_INNODB ,
|
||||||
|
"Disable initialization of builtin InnoDB plugin",
|
||||||
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"init-connect", OPT_INIT_CONNECT, "Command(s) that are executed for each new connection",
|
{"init-connect", OPT_INIT_CONNECT, "Command(s) that are executed for each new connection",
|
||||||
(uchar**) &opt_init_connect, (uchar**) &opt_init_connect, 0, GET_STR_ALLOC,
|
(uchar**) &opt_init_connect, (uchar**) &opt_init_connect, 0, GET_STR_ALLOC,
|
||||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
@ -7484,6 +7488,7 @@ static int mysql_init_variables(void)
|
|||||||
log_output_options= find_bit_type(log_output_str, &log_output_typelib);
|
log_output_options= find_bit_type(log_output_str, &log_output_typelib);
|
||||||
opt_bin_log= 0;
|
opt_bin_log= 0;
|
||||||
opt_disable_networking= opt_skip_show_db=0;
|
opt_disable_networking= opt_skip_show_db=0;
|
||||||
|
opt_ignore_builtin_innodb= 0;
|
||||||
opt_logname= opt_update_logname= opt_binlog_index_name= opt_slow_logname= 0;
|
opt_logname= opt_update_logname= opt_binlog_index_name= opt_slow_logname= 0;
|
||||||
opt_tc_log_file= (char *)"tc.log"; // no hostname in tc_log file name !
|
opt_tc_log_file= (char *)"tc.log"; // no hostname in tc_log file name !
|
||||||
opt_secure_auth= 0;
|
opt_secure_auth= 0;
|
||||||
@ -7781,6 +7786,9 @@ mysqld_get_one_option(int optid,
|
|||||||
case (int) OPT_BIG_TABLES:
|
case (int) OPT_BIG_TABLES:
|
||||||
thd_startup_options|=OPTION_BIG_TABLES;
|
thd_startup_options|=OPTION_BIG_TABLES;
|
||||||
break;
|
break;
|
||||||
|
case (int) OPT_IGNORE_BUILTIN_INNODB:
|
||||||
|
opt_ignore_builtin_innodb= 1;
|
||||||
|
break;
|
||||||
case (int) OPT_ISAM_LOG:
|
case (int) OPT_ISAM_LOG:
|
||||||
opt_myisam_log=1;
|
opt_myisam_log=1;
|
||||||
break;
|
break;
|
||||||
|
@ -275,6 +275,11 @@ static sys_var_const sys_ft_query_expansion_limit(&vars,
|
|||||||
static sys_var_const sys_ft_stopword_file(&vars, "ft_stopword_file",
|
static sys_var_const sys_ft_stopword_file(&vars, "ft_stopword_file",
|
||||||
OPT_GLOBAL, SHOW_CHAR_PTR,
|
OPT_GLOBAL, SHOW_CHAR_PTR,
|
||||||
(uchar*) &ft_stopword_file);
|
(uchar*) &ft_stopword_file);
|
||||||
|
|
||||||
|
static sys_var_const sys_ignore_builtin_innodb(&vars, "ignore_builtin_innodb",
|
||||||
|
OPT_GLOBAL, SHOW_BOOL,
|
||||||
|
(uchar*) &opt_ignore_builtin_innodb);
|
||||||
|
|
||||||
sys_var_str sys_init_connect(&vars, "init_connect", 0,
|
sys_var_str sys_init_connect(&vars, "init_connect", 0,
|
||||||
sys_update_init_connect,
|
sys_update_init_connect,
|
||||||
sys_default_init_connect,0);
|
sys_default_init_connect,0);
|
||||||
|
@ -1138,6 +1138,9 @@ int plugin_init(int *argc, char **argv, int flags)
|
|||||||
{
|
{
|
||||||
for (plugin= *builtins; plugin->info; plugin++)
|
for (plugin= *builtins; plugin->info; plugin++)
|
||||||
{
|
{
|
||||||
|
if (opt_ignore_builtin_innodb &&
|
||||||
|
!my_strcasecmp(&my_charset_latin1, plugin->name, "InnoDB"))
|
||||||
|
continue;
|
||||||
/* by default, ndbcluster and federated are disabled */
|
/* by default, ndbcluster and federated are disabled */
|
||||||
def_enabled=
|
def_enabled=
|
||||||
my_strcasecmp(&my_charset_latin1, plugin->name, "NDBCLUSTER") != 0 &&
|
my_strcasecmp(&my_charset_latin1, plugin->name, "NDBCLUSTER") != 0 &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user