mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-04-17 01:01:39 +08:00
PT-2340 - Support MySQL 8.4
- Removed runtime.txt after discussion with Anastasia Alexandrova - Added "use VersionParser" into tests in t/lib when needed - Removed word master from tests for pt-archiver, pt-config-diff, pt-deadlock-logger, pt-duplicate-key-checker, pt-find, pt-fk-error-logger, pt-heartbeat, pt-index-usage, pt-ioprofile, pt-kill, pt-mysql-summary - Removed word slave from tests for pt-archiver, pt-config-diff, pt-deadlock-logger, pt-duplicate-key-checker, pt-find, pt-fk-error-logger, pt-heartbeat, pt-index-usage, pt-ioprofile, pt-kill, pt-mysql-summary - Updated modules for pt-archiver, pt-config-diff, pt-deadlock-logger, pt-duplicate-key-checker, pt-find, pt-fk-error-logger, pt-heartbeat, pt-index-usage, pt-ioprofile, pt-kill, pt-mysql-summary - Changed mysql_ssl patch, so it is now short option s - Added a check for existing zombies in t/pt-kill/execute_command.t - Added bin/pt-galera-log-explainer to .gitignore
This commit is contained in:
@@ -132,7 +132,7 @@ sub parse {
|
||||
# Parse given props
|
||||
foreach my $dsn_part ( split($dsn_sep, $dsn) ) {
|
||||
$dsn_part =~ s/\\,/,/g;
|
||||
if ( my ($prop_key, $prop_val) = $dsn_part =~ m/^(.*?)=(.*)$/ ) {
|
||||
if ( my ($prop_key, $prop_val) = $dsn_part =~ m/^(.)=(.*)$/ ) {
|
||||
# Handle the typical DSN parts like h=host, P=3306, etc.
|
||||
$given_props{$prop_key} = $prop_val;
|
||||
}
|
||||
@@ -243,9 +243,8 @@ sub get_cxn_params {
|
||||
$dsn = 'DBI:mysql:' . ( $info->{D} || '' ) . ';'
|
||||
. join(';', map { "$opts{$_}->{dsn}=$info->{$_}" }
|
||||
grep { defined $info->{$_} }
|
||||
qw(F h P S A mysql_ssl))
|
||||
qw(F h P S A s))
|
||||
. ';mysql_read_default_group=client'
|
||||
#. ($info->{s} ? ';mysql_ssl=1' : '')
|
||||
. ($info->{L} ? ';mysql_local_infile=1' : '');
|
||||
}
|
||||
PTDEBUG && _d($dsn);
|
||||
|
||||
@@ -70,6 +70,7 @@ our @EXPORT = qw(
|
||||
$test_diff
|
||||
$source_name
|
||||
$source_status
|
||||
$source_reset
|
||||
$replica_name
|
||||
);
|
||||
|
||||
@@ -83,10 +84,12 @@ eval {
|
||||
|
||||
our $source_name = 'source';
|
||||
our $source_status = 'binary log';
|
||||
our $source_reset = 'binary logs and gtids';
|
||||
our $replica_name = 'replica';
|
||||
if ( $sandbox_version < '8.1' || ( $ENV{FORK} || "" eq 'mariadb' ) ) {
|
||||
$source_name = 'master';
|
||||
$source_status = 'master';
|
||||
$source_reset = 'master';
|
||||
$replica_name = 'slave';
|
||||
}
|
||||
|
||||
@@ -150,7 +153,7 @@ our $dsn_opts = [
|
||||
copy => 1,
|
||||
},
|
||||
{
|
||||
key => 'mysql_ssl',
|
||||
key => 's',
|
||||
desc => 'Use SSL',
|
||||
dsn => 'mysql_ssl',
|
||||
copy => 1,
|
||||
|
||||
@@ -38,7 +38,6 @@ $Data::Dumper::Sortkeys = 1;
|
||||
$Data::Dumper::Quotekeys = 0;
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
use constant PTDEVDEBUG => $ENV{PTDEVDEBUG} || 0;
|
||||
use VersionParser;
|
||||
|
||||
use IO::Socket::INET;
|
||||
|
||||
@@ -636,8 +635,8 @@ sub _d {
|
||||
print STDERR "# $package:$line $PID ", join(' ', @_), "\n";
|
||||
}
|
||||
|
||||
1;
|
||||
}
|
||||
1;
|
||||
# ###########################################################################
|
||||
# End Sandbox package
|
||||
# ###########################################################################
|
||||
|
||||
@@ -1217,11 +1217,11 @@ section_mysqld () {
|
||||
|
||||
section_replica_hosts () {
|
||||
local replica_hosts_file="$1"
|
||||
local replica_name="$2"
|
||||
local replica_name=`echo "$2" | sed 's/[^ ]*/\u&/'`
|
||||
|
||||
[ -e "$replica_hosts_file" ] || return
|
||||
|
||||
section "${replica_name^} Hosts"
|
||||
section "${replica_name} Hosts"
|
||||
if [ -s "$replica_hosts_file" ]; then
|
||||
cat "$replica_hosts_file"
|
||||
else
|
||||
@@ -1248,7 +1248,6 @@ section_mysql_files () {
|
||||
section_percona_xtradb_cluster () {
|
||||
local mysql_var="$1"
|
||||
local mysql_status="$2"
|
||||
local replica_name="$3"
|
||||
|
||||
name_val "Cluster Name" "$(get_var "wsrep_cluster_name" "$mysql_var")"
|
||||
name_val "Cluster Address" "$(get_var "wsrep_cluster_address" "$mysql_var")"
|
||||
@@ -1259,7 +1258,7 @@ section_percona_xtradb_cluster () {
|
||||
name_val "Node Status" "$(get_var "wsrep_cluster_status" "$mysql_status")"
|
||||
|
||||
name_val "SST Method" "$(get_var "wsrep_sst_method" "$mysql_var")"
|
||||
name_val "${replica_name^} Threads" "$(get_var "wsrep_${replica_name}_threads" "$mysql_var")"
|
||||
name_val "Slave Threads" "$(get_var "wsrep_slave_threads" "$mysql_var")"
|
||||
|
||||
name_val "Ignore Split Brain" "$( parse_wsrep_provider_options "pc.ignore_sb" "$mysql_var" )"
|
||||
name_val "Ignore Quorum" "$( parse_wsrep_provider_options "pc.ignore_quorum" "$mysql_var" )"
|
||||
@@ -1427,7 +1426,7 @@ report_mysql_summary () {
|
||||
if [ -n "${has_wsrep:-""}" ]; then
|
||||
local wsrep_on="$(feat_on "$dir/mysql-variables" "wsrep_on")"
|
||||
if [ "${wsrep_on:-""}" = "Enabled" ]; then
|
||||
section_percona_xtradb_cluster "$dir/mysql-variables" "$dir/mysql-status" "$replica_name"
|
||||
section_percona_xtradb_cluster "$dir/mysql-variables" "$dir/mysql-status"
|
||||
else
|
||||
name_val "wsrep_on" "OFF"
|
||||
fi
|
||||
@@ -1465,7 +1464,8 @@ report_mysql_summary () {
|
||||
fi
|
||||
local semisync_enabled_replica="$(get_var rpl_semi_sync_${replica_name}_enabled "$dir/mysql-variables")"
|
||||
if [ "$semisync_enabled_replica" = "OFF" -o "$semisync_enabled_replica" = "0" -o -z "$semisync_enabled_replica" ]; then
|
||||
name_val "${replica_name^}" "Disabled"
|
||||
local replica_name_cap=`echo "$replica_name" | sed 's/[^ ]*/\u&/'`
|
||||
name_val "${replica_name_cap}" "Disabled"
|
||||
else
|
||||
_semi_sync_stats_for "${replica_name}" "$dir/mysql-variables" "${replica_name}"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user