PT-1554 Fixed tests for MySQL 8

This commit is contained in:
Carlos Salguero
2018-06-22 14:56:02 -03:00
parent d9142df0f6
commit 4f017cc61a
6 changed files with 11 additions and 7 deletions

View File

@@ -42,7 +42,7 @@ $output = output(
is( is(
PerconaTest::count_checksum_results($output, 'rows'), PerconaTest::count_checksum_results($output, 'rows'),
$sandbox_version ge '8.0' ? 30 : $sandbox_version lt '5.7' ? 24 : 25, $sandbox_version ge '8.0' ? 29 : $sandbox_version lt '5.7' ? 24 : 25,
"Large BLOB/TEXT/BINARY Checksum" "Large BLOB/TEXT/BINARY Checksum"
); );

View File

@@ -168,7 +168,7 @@ wait_until(
# ############################################################################# # #############################################################################
# Bug 916168: bug in pt-table-checksum privileges check # Bug 916168: bug in pt-table-checksum privileges check
# ############################################################################# # #############################################################################
diag(`/tmp/12345/use -u root < $trunk/t/pt-table-checksum/samples/privs-bug-916168.sql`); diag(`/tmp/12345/use -u root < $trunk/ t/pt-table-checksum/samples/privs-bug-916168.sql`);
$output = output( $output = output(
sub { $exit_status = pt_table_checksum::main(@args, sub { $exit_status = pt_table_checksum::main(@args,

View File

@@ -1,4 +1,5 @@
grant select, replication slave, replication client, super, process on *.* to 'test_user'@'%' identified by 'foo'; CREATE USER 'test_user'@'%' identified by 'foo';
grant select, replication slave, replication client, super, process on *.* to 'test_user'@'%';
grant all on percona.* to 'test_user'@'%'; grant all on percona.* to 'test_user'@'%';
create database if not exists percona; create database if not exists percona;
use percona; use percona;

View File

@@ -50,7 +50,8 @@ $slave_dbh->do('create table issue_907.t (i int)');
$slave_dbh->do('insert into issue_907.t values (1)'); $slave_dbh->do('insert into issue_907.t values (1)');
# On 5.1 user needs SUPER to set binlog_format, which mk-table-sync does. # On 5.1 user needs SUPER to set binlog_format, which mk-table-sync does.
`/tmp/12345/use -uroot -e "GRANT SUPER, SELECT, UPDATE, SHOW DATABASES ON *.* TO 'test_907'\@'localhost' IDENTIFIED BY 'msandbox'"`; `/tmp/12345/use -uroot -e "CREATE USER 'test_907'\@'localhost' IDENTIFIED BY 'msandbox'"`;
`/tmp/12345/use -uroot -e "GRANT SUPER, SELECT, UPDATE, SHOW DATABASES ON *.* TO 'test_907'\@'localhost'"`;
#2) run again to see what output is like when it works #2) run again to see what output is like when it works
chomp($output = output( chomp($output = output(

View File

@@ -9,7 +9,7 @@ BEGIN {
use strict; use strict;
use warnings FATAL => 'all'; use warnings FATAL => 'all';
use English qw(-no_match_vars); use English qw(-no_match_vars);
use Test::More tests => 4; use Test::More;
use PerconaTest; use PerconaTest;
use Sandbox; use Sandbox;
@@ -20,6 +20,8 @@ my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp);
if ($sandbox_version ge '8.0') { if ($sandbox_version ge '8.0') {
plan skip_all => "TODO master master sandbox is failing with MySQL 8.0+. FIX ME !!!!"; plan skip_all => "TODO master master sandbox is failing with MySQL 8.0+. FIX ME !!!!";
} else {
plan 4;
} }
# ############################################################################# # #############################################################################

View File

@@ -36,7 +36,7 @@ elsif ( !$slave1_dbh ) {
plan skip_all => 'Cannot connect to sandbox slave2'; plan skip_all => 'Cannot connect to sandbox slave2';
} }
else { else {
plan tests => 5; plan tests => 4;
} }
my ($output, $status); my ($output, $status);
@@ -77,7 +77,7 @@ is(
$row->{f2}, $row->{f2},
$want, $want,
"Character set is correct", "Character set is correct",
); ) or diag("Want '$want', got '$row->{f2}");
SKIP: { SKIP: {
skip "Skipping in MySQL 8.0.4-rc since there is an error in the server itself", 1 if ($sandbox_version ge '8.0'); skip "Skipping in MySQL 8.0.4-rc since there is an error in the server itself", 1 if ($sandbox_version ge '8.0');