summaryrefslogtreecommitdiff
path: root/sql/sql_plugin.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2014-08-27 10:23:20 +0200
committerSergei Golubchik <serg@mariadb.org>2014-10-10 22:27:40 +0200
commitdb2399b0c189d96131bf0ac4997daeda4050d2ff (patch)
tree6600b263614148a09673422f907b519369e31f22 /sql/sql_plugin.cc
parent8f15bf9d0c0bc1bb8be2218411ae862a4903ae31 (diff)
downloadmariadb-git-db2399b0c189d96131bf0ac4997daeda4050d2ff.tar.gz
small cleanup
Diffstat (limited to 'sql/sql_plugin.cc')
-rw-r--r--sql/sql_plugin.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index c50ddbb5a81..e254d4330f7 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -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);