mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-15 07:55:51 +00:00
PT-2340 - Support MySQL 8.4
- Removed offensive terminology from library files and their tests - Removed unused sandbox/prove2junit.pl - Added option mysql_ssl to DSN and possibility to have DSN of multiple letters
This commit is contained in:
19
t/lib/Cxn.t
19
t/lib/Cxn.t
@@ -23,9 +23,9 @@ use Data::Dumper;
|
||||
my $q = new Quoter();
|
||||
my $dp = new DSNParser(opts=>$dsn_opts);
|
||||
my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp);
|
||||
my $master_dbh = $sb->get_dbh_for('master');
|
||||
my $slave1_dbh = $sb->get_dbh_for('slave1');
|
||||
my $slave1_dsn = $sb->dsn_for('slave1');
|
||||
my $master_dbh = $sb->get_dbh_for('source');
|
||||
my $slave1_dbh = $sb->get_dbh_for('replica1');
|
||||
my $slave1_dsn = $sb->dsn_for('replica1');
|
||||
|
||||
if ( !$master_dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox master';
|
||||
@@ -125,7 +125,7 @@ ok(
|
||||
"cxn->connect()"
|
||||
);
|
||||
|
||||
my ($row) = $cxn->dbh()->selectrow_hashref('SHOW MASTER STATUS');
|
||||
my ($row) = $cxn->dbh()->selectrow_hashref("SHOW ${source_status} STATUS");
|
||||
ok(
|
||||
exists $row->{binlog_ignore_db},
|
||||
"FetchHashKeyName = NAME_lc",
|
||||
@@ -174,7 +174,7 @@ test_var_val(
|
||||
$cxn->dbh()->disconnect();
|
||||
$cxn->connect();
|
||||
|
||||
($row) = $cxn->dbh()->selectrow_hashref('SHOW MASTER STATUS');
|
||||
($row) = $cxn->dbh()->selectrow_hashref("SHOW ${source_status} STATUS");
|
||||
ok(
|
||||
exists $row->{binlog_ignore_db},
|
||||
"Reconnect FetchHashKeyName = NAME_lc",
|
||||
@@ -213,6 +213,7 @@ is_deeply(
|
||||
S => undef,
|
||||
D => undef,
|
||||
t => undef,
|
||||
mysql_ssl => undef,
|
||||
},
|
||||
"cxn->dsn()"
|
||||
);
|
||||
@@ -240,6 +241,7 @@ is_deeply(
|
||||
S => undef,
|
||||
D => undef,
|
||||
t => undef,
|
||||
mysql_ssl => undef,
|
||||
},
|
||||
"Defaults to h=localhost"
|
||||
);
|
||||
@@ -259,6 +261,7 @@ is_deeply(
|
||||
S => undef,
|
||||
D => undef,
|
||||
t => undef,
|
||||
mysql_ssl => undef,
|
||||
},
|
||||
"Default cxn inherits default connection options"
|
||||
);
|
||||
@@ -339,7 +342,7 @@ SKIP: {
|
||||
"First connect()"
|
||||
);
|
||||
|
||||
($row) = $cxn->dbh()->selectrow_hashref('SHOW SLAVE STATUS');
|
||||
($row) = $cxn->dbh()->selectrow_hashref("SHOW ${replica_name} STATUS");
|
||||
ok(
|
||||
!defined $row,
|
||||
"First connect() to master"
|
||||
@@ -356,7 +359,7 @@ SKIP: {
|
||||
PXC_SKIP: {
|
||||
skip 'Not for PXC' if ( $sb->is_cluster_mode );
|
||||
|
||||
($row) = $cxn->dbh()->selectrow_hashref('SHOW SLAVE STATUS');
|
||||
($row) = $cxn->dbh()->selectrow_hashref("SHOW ${replica_name} STATUS");
|
||||
ok(
|
||||
$row,
|
||||
"Re-connect connect(slave_dsn) to slave"
|
||||
@@ -370,7 +373,7 @@ PXC_SKIP: {
|
||||
"Re-re-connect connect()"
|
||||
);
|
||||
|
||||
($row) = $cxn->dbh()->selectrow_hashref('SHOW SLAVE STATUS');
|
||||
($row) = $cxn->dbh()->selectrow_hashref("SHOW ${source_status} STATUS");
|
||||
ok(
|
||||
$row,
|
||||
"Re-re-connect connect() to slave"
|
||||
|
Reference in New Issue
Block a user