summaryrefslogtreecommitdiff
path: root/sql/sql_plugin.cc
diff options
context:
space:
mode:
authorjani@a88-113-38-195.elisa-laajakaista.fi <>2008-02-08 12:13:33 +0100
committerjani@a88-113-38-195.elisa-laajakaista.fi <>2008-02-08 12:13:33 +0100
commit4f98f3e683afe4f524219b0640ce18896e278ab8 (patch)
tree84b77e8521fa1d155d7a44ba441199c0c89d547a /sql/sql_plugin.cc
parentccd53222d61d25ae2702d87a3b617a1f835eedc7 (diff)
parent707e899c9e7b1b135a394809937588f5c57047a3 (diff)
downloadmariadb-git-4f98f3e683afe4f524219b0640ce18896e278ab8.tar.gz
Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
Diffstat (limited to 'sql/sql_plugin.cc')
-rw-r--r--sql/sql_plugin.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index 2a86844c8c6..4852e6625a8 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -1422,6 +1422,7 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv,
#endif
case ';':
name.str[name.length]= '\0';
+ pthread_mutex_lock(&LOCK_plugin);
if (str != &dl) // load all plugins in named module
{
dl= name;
@@ -1445,6 +1446,7 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv,
if (plugin_add(tmp_root, &name, &dl, argc, argv, REPORT_TO_LOG))
goto error;
}
+ pthread_mutex_unlock(&LOCK_plugin);
name.length= dl.length= 0;
dl.str= NULL; name.str= p= buffer;
str= &name;
@@ -1464,6 +1466,7 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv,
}
DBUG_RETURN(FALSE);
error:
+ pthread_mutex_unlock(&LOCK_plugin);
sql_print_error("Couldn't load plugin named '%s' with soname '%s'.",
name.str, dl.str);
DBUG_RETURN(TRUE);