summaryrefslogtreecommitdiff
path: root/sql/sql_plugin.cc
diff options
context:
space:
mode:
authorunknown <serg@janus.mylan>2007-10-22 20:05:06 +0200
committerunknown <serg@janus.mylan>2007-10-22 20:05:06 +0200
commite3bd02cfbfdaa467cc69c2183bb1b437006fb2b2 (patch)
tree33cce67b2e6cc3df13415b46772f315da6eeead0 /sql/sql_plugin.cc
parentbdab4dcefe7ba9ba44a7a8cbc9cd32d282cf3ee6 (diff)
parentfc800ff76d0c1f47126645c7ec742ae07434056b (diff)
downloadmariadb-git-e3bd02cfbfdaa467cc69c2183bb1b437006fb2b2.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into janus.mylan:/usr/home/serg/Abk/mysql-5.1 mysql-test/r/innodb_mysql.result: Auto merged sql/sql_base.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_plugin.cc: Auto merged sql/table.cc: Auto merged tests/mysql_client_test.c: Auto merged
Diffstat (limited to 'sql/sql_plugin.cc')
-rw-r--r--sql/sql_plugin.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index 1ec56e0caea..ca28d89f280 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -3059,7 +3059,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
MEM_ROOT *mem_root= alloc_root_inited(&tmp->mem_root) ?
&tmp->mem_root : &plugin_mem_root;
st_mysql_sys_var **opt;
- my_option *opts;
+ my_option *opts= NULL;
char *p, *varname;
int error;
st_mysql_sys_var *o;
@@ -3098,7 +3098,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);
- DBUG_RETURN(error);
+ goto err;
}
}
@@ -3108,6 +3108,8 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
*enabled= TRUE;
}
+ error= 1;
+
if (*enabled)
{
for (opt= tmp->plugin->system_vars; opt && *opt; opt++)
@@ -3146,7 +3148,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);
- DBUG_RETURN(1);
+ goto err;
}
tmp->system_vars= chain.first;
}
@@ -3156,7 +3158,10 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
if (enabled_saved && global_system_variables.log_warnings)
sql_print_information("Plugin '%s' disabled by command line option",
tmp->name.str);
- DBUG_RETURN(1);
+err:
+ if (opts)
+ my_cleanup_options(opts);
+ DBUG_RETURN(error);
}