• Davi Arnaut's avatar
    Bug#51770: UNINSTALL PLUGIN requires no privileges · 81ffd72a
    Davi Arnaut authored
    The problem was that UNINSTALL PLUGIN wasn't performing privilege
    checks before removing a plugin. Any user (including users without 
    any kind of privileges) could uninstall any plugin.
    
    The solution is to verify if the user has the DELETE privilege for
    the mysql.plugin table before uninstalling a plugin.
    
    mysql-test/r/plugin_not_embedded.result:
      Add test case result for Bug#51770.
    mysql-test/t/plugin_not_embedded-master.opt:
      Add example plugin path.
    mysql-test/t/plugin_not_embedded.test:
      Add test case for Bug#51770.
      Skip embedded as test relies on privileges checks.
    81ffd72a
sql_plugin.cc 98.8 KB