mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-13 14:39:28 +00:00
missing plugin.t and all_hooks.pm for pt-table-checksum --plugin functionality
This commit is contained in:
45
t/pt-table-checksum/samples/plugins/all_hooks.pm
Normal file
45
t/pt-table-checksum/samples/plugins/all_hooks.pm
Normal file
@@ -0,0 +1,45 @@
|
||||
package pt_table_checksum_plugin;
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use English qw(-no_match_vars);
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
sub new {
|
||||
my ($class, %args) = @_;
|
||||
my $self = { %args };
|
||||
return bless $self, $class;
|
||||
}
|
||||
|
||||
sub init {
|
||||
my ($self, %args) = @_;
|
||||
print "PLUGIN init\n";
|
||||
}
|
||||
|
||||
sub before_replicate_check {
|
||||
my ($self, %args) = @_;
|
||||
print "PLUGIN before_replicate_check\n";
|
||||
}
|
||||
|
||||
sub after_replicate_check {
|
||||
my ($self, %args) = @_;
|
||||
print "PLUGIN after_replicate_check\n";
|
||||
}
|
||||
|
||||
sub override_slavelag_check {
|
||||
my ($self, %args) = @_;
|
||||
print "PLUGIN override_slavelag_check\n";
|
||||
return sub { return 0; };
|
||||
}
|
||||
|
||||
sub before_checksum_table {
|
||||
my ($self, %args) = @_;
|
||||
print "PLUGIN before_checksum_table\n";
|
||||
}
|
||||
|
||||
sub after_checksum_table {
|
||||
my ($self, %args) = @_;
|
||||
print "PLUGIN after_checksum_table\n";
|
||||
}
|
||||
|
||||
1;
|
Reference in New Issue
Block a user