Commit fd977398 authored by Daniel Black's avatar Daniel Black

Allow {un,}install plugins during bootstrap/skip-grant-tables

This aids packagers to install/uninstall plugins without starting a full
mysql instance.

for MDEV-7781.
parent d61573d3
......@@ -2085,14 +2085,8 @@ bool mysql_install_plugin(THD *thd, const LEX_STRING *name,
char **argv=orig_argv;
DBUG_ENTER("mysql_install_plugin");
if (opt_noacl)
{
my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--skip-grant-tables");
DBUG_RETURN(TRUE);
}
tables.init_one_table("mysql", 5, "plugin", 6, "plugin", TL_WRITE);
if (check_table_access(thd, INSERT_ACL, &tables, FALSE, 1, FALSE))
if (!opt_noacl && check_table_access(thd, INSERT_ACL, &tables, FALSE, 1, FALSE))
DBUG_RETURN(TRUE);
/* need to open before acquiring LOCK_plugin or it will deadlock */
......@@ -2227,15 +2221,9 @@ bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name,
bool error= false;
DBUG_ENTER("mysql_uninstall_plugin");
if (opt_noacl)
{
my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--skip-grant-tables");
DBUG_RETURN(TRUE);
}
tables.init_one_table("mysql", 5, "plugin", 6, "plugin", TL_WRITE);
if (check_table_access(thd, DELETE_ACL, &tables, FALSE, 1, FALSE))
if (!opt_noacl && check_table_access(thd, DELETE_ACL, &tables, FALSE, 1, FALSE))
DBUG_RETURN(TRUE);
/* need to open before acquiring LOCK_plugin or it will deadlock */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment