mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
merge 5.1->5.2
This commit is contained in:
@ -1203,10 +1203,11 @@ void plugin_unlock_list(THD *thd, plugin_ref *list, uint count)
|
||||
static int plugin_initialize(struct st_plugin_int *plugin)
|
||||
{
|
||||
int ret= 1;
|
||||
uint state;
|
||||
DBUG_ENTER("plugin_initialize");
|
||||
|
||||
safe_mutex_assert_owner(&LOCK_plugin);
|
||||
uint state= plugin->state;
|
||||
state= plugin->state;
|
||||
DBUG_ASSERT(state == PLUGIN_IS_UNINITIALIZED);
|
||||
|
||||
pthread_mutex_unlock(&LOCK_plugin);
|
||||
@ -1273,7 +1274,6 @@ static int plugin_initialize(struct st_plugin_int *plugin)
|
||||
err:
|
||||
pthread_mutex_lock(&LOCK_plugin);
|
||||
plugin->state= state;
|
||||
|
||||
DBUG_RETURN(ret);
|
||||
}
|
||||
|
||||
@ -1863,6 +1863,12 @@ bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING *dl
|
||||
struct st_plugin_int *tmp;
|
||||
DBUG_ENTER("mysql_install_plugin");
|
||||
|
||||
if (opt_noacl)
|
||||
{
|
||||
my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--skip-grant-tables");
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
|
||||
bzero(&tables, sizeof(tables));
|
||||
tables.db= (char *)"mysql";
|
||||
tables.table_name= tables.alias= (char *)"plugin";
|
||||
@ -1940,9 +1946,17 @@ bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name)
|
||||
struct st_plugin_int *plugin;
|
||||
DBUG_ENTER("mysql_uninstall_plugin");
|
||||
|
||||
if (opt_noacl)
|
||||
{
|
||||
my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--skip-grant-tables");
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
|
||||
bzero(&tables, sizeof(tables));
|
||||
tables.db= (char *)"mysql";
|
||||
tables.table_name= tables.alias= (char *)"plugin";
|
||||
if (check_table_access(thd, DELETE_ACL, &tables, 1, FALSE))
|
||||
DBUG_RETURN(TRUE);
|
||||
|
||||
/* need to open before acquiring LOCK_plugin or it will deadlock */
|
||||
if (! (table= open_ltable(thd, &tables, TL_WRITE, 0)))
|
||||
|
Reference in New Issue
Block a user