mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
small cleanup
This commit is contained in:
parent
8f15bf9d0c
commit
db2399b0c1
1 changed files with 8 additions and 9 deletions
|
@ -3910,7 +3910,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
|
|||
{
|
||||
sql_print_error("Parsing options for plugin '%s' failed.",
|
||||
tmp->name.str);
|
||||
goto err;
|
||||
goto err1;
|
||||
}
|
||||
/*
|
||||
Set plugin loading policy from option value. First element in the option
|
||||
|
@ -3924,6 +3924,8 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
|
|||
disable_plugin= (plugin_load_option == PLUGIN_OFF);
|
||||
tmp->load_option= plugin_load_option;
|
||||
|
||||
error= 1;
|
||||
|
||||
/*
|
||||
If the plugin is disabled it should not be initialized.
|
||||
*/
|
||||
|
@ -3932,9 +3934,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
|
|||
if (global_system_variables.log_warnings)
|
||||
sql_print_information("Plugin '%s' is disabled.",
|
||||
tmp->name.str);
|
||||
if (opts)
|
||||
my_cleanup_options(opts);
|
||||
DBUG_RETURN(1);
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (!my_strcasecmp(&my_charset_latin1, tmp->name.str, "NDBCLUSTER"))
|
||||
|
@ -3945,8 +3945,6 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
|
|||
else
|
||||
plugin_name= tmp->name;
|
||||
|
||||
error= 1;
|
||||
|
||||
if (tmp->plugin->system_vars)
|
||||
{
|
||||
for (len=0, opt= tmp->plugin->system_vars; *opt; len++, opt++) /* no-op */;
|
||||
|
@ -4002,7 +4000,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
|
|||
if (!tmp->ptr_backup)
|
||||
{
|
||||
restore_ptr_backup(tmp->nbackups, tmp_backup);
|
||||
goto err;
|
||||
goto err1;
|
||||
}
|
||||
memcpy(tmp->ptr_backup, tmp_backup, bytes);
|
||||
}
|
||||
|
@ -4014,7 +4012,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
|
|||
{
|
||||
sql_print_error("Plugin '%s' has conflicting system variables",
|
||||
tmp->name.str);
|
||||
goto err;
|
||||
goto err1;
|
||||
}
|
||||
tmp->system_vars= chain.first;
|
||||
}
|
||||
|
@ -4023,9 +4021,10 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
|
|||
|
||||
DBUG_RETURN(0);
|
||||
|
||||
err:
|
||||
err1:
|
||||
if (tmp_backup)
|
||||
my_afree(tmp_backup);
|
||||
err:
|
||||
if (opts)
|
||||
my_cleanup_options(opts);
|
||||
DBUG_RETURN(error);
|
||||
|
|
Loading…
Reference in a new issue