Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

Commit

Permalink
Updated privileges management
Browse files Browse the repository at this point in the history
In MySQL 5.7.9 there is a new user defined by default (mysql.sys) which
is needed for the sys schema. The privilege tables are no longer cleaned
by sandbox management: this is no longer necessary, since there are no
anonymous accounts.
The test has been updated to reflect the changes
  • Loading branch information
datacharmer committed Nov 21, 2015
1 parent f72e8f6 commit d6f57d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lib/MySQL/Sandbox/Scripts.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1509,9 +1509,9 @@ GRANTS_MYSQL
use mysql;
set password='_DBPASSWORD_';
delete from tables_priv;
delete from columns_priv;
delete from db;
-- delete from tables_priv;
-- delete from columns_priv;
-- delete from db;
delete from user where user not in ('root', 'mysql.sys');
flush privileges;
Expand Down
5 changes: 2 additions & 3 deletions t/user_privileges.sb.pl
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@

if ( (($major ==5) && ($minor > 7) )
or
( ($major ==5) && ($minor == 7) && ($rev > 7) )
( ($major ==5) && ($minor == 7) && ($rev > 8) )
)
# Starting with MySQL 5.7.8 we have the sys schema included with MySQL.
# This requires an extra user
# Starting with MySQL 5.7.9 we have the mysql.sys user created by default.
{
$number_of_users = 9;
}
Expand Down

0 comments on commit d6f57d8

Please sign in to comment.