mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-12-19 01:09:21 +08:00
Check PXC version in ptc and pt-osc, die if < 5.5.28.
This commit is contained in:
@@ -7826,6 +7826,22 @@ sub main {
|
|||||||
|
|
||||||
my $cxn = $make_cxn->(dsn => $dsn);
|
my $cxn = $make_cxn->(dsn => $dsn);
|
||||||
|
|
||||||
|
my $cluster = Percona::XtraDB::Cluster->new;
|
||||||
|
if ( $cluster->is_cluster_node($cxn) ) {
|
||||||
|
# Because of https://bugs.launchpad.net/codership-mysql/+bug/1040108
|
||||||
|
# ptc and pt-osc check Threads_running by default for --max-load.
|
||||||
|
# Strictly speaking, they can run on 5.5.27 as long as that bug doesn't
|
||||||
|
# manifest itself. If it does, however, then the tools will wait forever.
|
||||||
|
my $pxc_version = VersionParser->new($cxn->dbh);
|
||||||
|
if ( $pxc_version < '5.5.28' ) {
|
||||||
|
die "Percona XtraDB Cluster 5.5.28 or newer is required to run "
|
||||||
|
. "this tool on a cluster, but node " . $cxn->name
|
||||||
|
. " is running version " . $pxc_version->version
|
||||||
|
. ". Please upgrade the node, or run the tool on a newer node, "
|
||||||
|
. "or contact Percona for support.\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# ########################################################################
|
# ########################################################################
|
||||||
# Check if MySQL is new enough to have the triggers we need.
|
# Check if MySQL is new enough to have the triggers we need.
|
||||||
# Although triggers were introduced in 5.0.2, "Prior to MySQL 5.0.10,
|
# Although triggers were introduced in 5.0.2, "Prior to MySQL 5.0.10,
|
||||||
|
|||||||
@@ -8644,6 +8644,21 @@ sub main {
|
|||||||
my %cluster_name_for;
|
my %cluster_name_for;
|
||||||
$cluster_name_for{$master_cxn} = $cluster->is_cluster_node($master_cxn);
|
$cluster_name_for{$master_cxn} = $cluster->is_cluster_node($master_cxn);
|
||||||
|
|
||||||
|
if ( $cluster_name_for{$master_cxn} ) {
|
||||||
|
# Because of https://bugs.launchpad.net/codership-mysql/+bug/1040108
|
||||||
|
# ptc and pt-osc check Threads_running by default for --max-load.
|
||||||
|
# Strictly speaking, they can run on 5.5.27 as long as that bug doesn't
|
||||||
|
# manifest itself. If it does, however, then the tools will wait forever.
|
||||||
|
my $pxc_version = VersionParser->new($master_dbh);
|
||||||
|
if ( $pxc_version < '5.5.28' ) {
|
||||||
|
die "Percona XtraDB Cluster 5.5.28 or newer is required to run "
|
||||||
|
. "this tool on a cluster, but node " . $master_cxn->name
|
||||||
|
. " is running version " . $pxc_version->version
|
||||||
|
. ". Please upgrade the node, or run the tool on a newer node, "
|
||||||
|
. "or contact Percona for support.\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# ########################################################################
|
# ########################################################################
|
||||||
# If this is not a dry run (--explain was not specified), then we're
|
# If this is not a dry run (--explain was not specified), then we're
|
||||||
# going to checksum the tables, so do the necessary preparations and
|
# going to checksum the tables, so do the necessary preparations and
|
||||||
|
|||||||
Reference in New Issue
Block a user