~percona-toolkit-dev/percona-toolkit/release-2.2.13

« back to all changes in this revision

Viewing changes to t/pt-table-checksum/samples/plugins/all_hooks.pm

  • Committer: Daniel Nichter
  • Date: 2014-05-30 01:09:13 UTC
  • mfrom: (598.5.6 release-2.2.8)
  • Revision ID: daniel@percona.com-20140530010913-4wep0en37aa4vvok
Merge release-2.2.8.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package pt_table_checksum_plugin;
 
2
 
 
3
use strict;
 
4
use warnings FATAL => 'all';
 
5
use English qw(-no_match_vars);
 
6
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
 
7
 
 
8
sub new {
 
9
   my ($class, %args) = @_;
 
10
   my $self = { %args };
 
11
   return bless $self, $class;
 
12
}
 
13
 
 
14
sub init {
 
15
   my ($self, %args) = @_;
 
16
   print "PLUGIN init\n";
 
17
}
 
18
 
 
19
sub before_replicate_check {
 
20
   my ($self, %args) = @_;
 
21
   print "PLUGIN before_replicate_check\n";
 
22
}
 
23
 
 
24
sub after_replicate_check {
 
25
   my ($self, %args) = @_;
 
26
   print "PLUGIN after_replicate_check\n";
 
27
}
 
28
 
 
29
sub get_slave_lag {
 
30
   my ($self, %args) = @_;
 
31
   print "PLUGIN get_slave_lag\n";
 
32
   return sub { return 0; };
 
33
}
 
34
 
 
35
sub before_checksum_table {
 
36
   my ($self, %args) = @_;
 
37
   print "PLUGIN before_checksum_table\n";
 
38
}
 
39
 
 
40
sub after_checksum_table {
 
41
   my ($self, %args) = @_;
 
42
   print "PLUGIN after_checksum_table\n";
 
43
}
 
44
 
 
45
1;