PT-1554 (WIP) Tests for MySQL 8

There are tests failing but the sandbox doesn't crash
This commit is contained in:
Carlos Salguero
2018-05-30 21:25:28 -03:00
parent b801dfa156
commit 0004bb7bbc
14 changed files with 168 additions and 152 deletions

View File

@@ -260,7 +260,12 @@ is(
# --check-read-only
# #############################################################################
diag(`/tmp/12345/use -u root -e "GRANT ALL ON *.* TO 'bob'\@'%' IDENTIFIED BY 'msandbox'"`);
if ($sandbox_version ge '8.0') {
diag(`/tmp/12345/use -u root -e "CREATE USER 'bob'\@'%' IDENTIFIED WITH mysql_native_password BY 'msandbox'"`);
} else {
diag(`/tmp/12345/use -u root -e "CREAE USER 'bob'\@'%' IDENTIFIED BY 'msandbox'"`);
}
diag(`/tmp/12345/use -u root -e "GRANT ALL ON *.* TO 'bob'\@'%'"`);
diag(`/tmp/12345/use -u root -e "REVOKE SUPER ON *.* FROM 'bob'\@'%'"`);
if ($sandbox_version ge '8.0') {
diag(`/tmp/12345/use -u root -e "REVOKE CONNECTION_ADMIN ON *.* FROM 'bob'\@'%'"`);

View File

@@ -65,7 +65,12 @@ my $create_table_sql = <<__EOQ;
__EOQ
$sb->do_as_root('master', "$create_table_sql");
$sb->do_as_root('slave1', 'GRANT SELECT, INSERT, UPDATE, REPLICATION CLIENT ON *.* TO "unprivileged"@"localhost" IDENTIFIED BY "password"');
if ($sandbox_version ge '8.0') {
$sb->do_as_root('slave1', 'CREATE USER "unprivileged"@"localhost" IDENTIFIED WITH mysql_native_password BY "password"');
} else {
$sb->do_as_root('slave1', 'CREATE USER "unprivileged"@"localhost" IDENTIFIED BY "password"');
}
$sb->do_as_root('slave1', 'GRANT SELECT, INSERT, UPDATE, REPLICATION CLIENT ON *.* TO "unprivileged"@"localhost"');
$sb->do_as_root('slave1', "FLUSH TABLES WITH READ LOCK;");
$sb->do_as_root('slave1', "SET GLOBAL read_only = 1;");