Skip to content

Commit db2399b

Browse files
committed
small cleanup
1 parent 8f15bf9 commit db2399b

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

sql/sql_plugin.cc

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3910,7 +3910,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
39103910
{
39113911
sql_print_error("Parsing options for plugin '%s' failed.",
39123912
tmp->name.str);
3913-
goto err;
3913+
goto err1;
39143914
}
39153915
/*
39163916
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,
39243924
disable_plugin= (plugin_load_option == PLUGIN_OFF);
39253925
tmp->load_option= plugin_load_option;
39263926

3927+
error= 1;
3928+
39273929
/*
39283930
If the plugin is disabled it should not be initialized.
39293931
*/
@@ -3932,9 +3934,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
39323934
if (global_system_variables.log_warnings)
39333935
sql_print_information("Plugin '%s' is disabled.",
39343936
tmp->name.str);
3935-
if (opts)
3936-
my_cleanup_options(opts);
3937-
DBUG_RETURN(1);
3937+
goto err;
39383938
}
39393939

39403940
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,
39453945
else
39463946
plugin_name= tmp->name;
39473947

3948-
error= 1;
3949-
39503948
if (tmp->plugin->system_vars)
39513949
{
39523950
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,
40024000
if (!tmp->ptr_backup)
40034001
{
40044002
restore_ptr_backup(tmp->nbackups, tmp_backup);
4005-
goto err;
4003+
goto err1;
40064004
}
40074005
memcpy(tmp->ptr_backup, tmp_backup, bytes);
40084006
}
@@ -4014,7 +4012,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
40144012
{
40154013
sql_print_error("Plugin '%s' has conflicting system variables",
40164014
tmp->name.str);
4017-
goto err;
4015+
goto err1;
40184016
}
40194017
tmp->system_vars= chain.first;
40204018
}
@@ -4023,9 +4021,10 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
40234021

40244022
DBUG_RETURN(0);
40254023

4026-
err:
4024+
err1:
40274025
if (tmp_backup)
40284026
my_afree(tmp_backup);
4027+
err:
40294028
if (opts)
40304029
my_cleanup_options(opts);
40314030
DBUG_RETURN(error);

0 commit comments

Comments
 (0)