diff options
author | Daniel Black <grooverdan@users.sourceforge.net> | 2015-03-15 14:50:22 +1100 |
---|---|---|
committer | Daniel Black <grooverdan@users.sourceforge.net> | 2015-03-15 14:50:22 +1100 |
commit | fd977398c7c9ab43f7502f66213a0dd6553fe238 (patch) | |
tree | adf163c270c8d076bf7a8e7575f4765f6d034a1e /sql/sql_plugin.cc | |
parent | d61573d3e5c8f9d85b88f9fa2e79160b159bf67d (diff) | |
download | mariadb-git-fd977398c7c9ab43f7502f66213a0dd6553fe238.tar.gz |
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.
Diffstat (limited to 'sql/sql_plugin.cc')
-rw-r--r-- | sql/sql_plugin.cc | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 4227641859d..7fbd6b63490 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -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 */ |