PT-1536 Updated samples for mysql-summary tests

This commit is contained in:
Carlos Salguero
2018-05-11 11:58:47 -03:00
parent 94e122adc0
commit b6526f6739
9 changed files with 75 additions and 4 deletions

View File

@@ -9,16 +9,37 @@ BEGIN {
use strict;
use warnings FATAL => 'all';
use English qw(-no_match_vars);
use PerconaTest;
my ($tool) = $PROGRAM_NAME =~ m/([\w-]+)\.t$/;
use Sandbox;
use DSNParser;
require VersionParser;
use Test::More;
use File::Temp qw( tempdir );
local $ENV{PTDEBUG} = "";
my $dp = new DSNParser(opts=>$dsn_opts);
my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp);
my $master_dbh = $sb->get_dbh_for('master');
my $has_keyring_plugin;
my $db_flavor = VersionParser->new($master_dbh)->flavor();
if ( $db_flavor =~ m/Percona Server/ ) {
my $rows = $master_dbh->selectall_hashref("SHOW PLUGINS", "name");
while (my ($key, $values) = each %$rows) {
if ($key =~ m/^keyring_/) {
$has_keyring_plugin=1;
last;
}
}
}
if ($has_keyring_plugin) {
plan skip_all => 'Keyring plugins are enabled.';
}
my ($tool) = $PROGRAM_NAME =~ m/([\w-]+)\.t$/;
# mysqldump from earlier versions doesn't seem to work with 5.6,
# so use the actual mysqldump from each MySQL bin which should
# always be compatible with itself.