mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-11 13:40:07 +00:00
Add forked Maatkit tools in bin/ and their tests in t/.
This commit is contained in:
22
t/pt-archiver/samples/Plugin3.pm
Normal file
22
t/pt-archiver/samples/Plugin3.pm
Normal file
@@ -0,0 +1,22 @@
|
||||
package Plugin3;
|
||||
|
||||
sub new {
|
||||
my ( $class, %args ) = @_;
|
||||
$args{sth} = $args{dbh}->prepare(
|
||||
"INSERT INTO test.table_2 values(?,?,?,?)");
|
||||
return bless(\%args, $class);
|
||||
}
|
||||
|
||||
sub is_archivable {1} # Always yes
|
||||
|
||||
sub before_delete {
|
||||
my ( $self, %args ) = @_;
|
||||
$self->{sth}->execute(@{$args{row}});
|
||||
}
|
||||
|
||||
sub before_insert {} # Take no action
|
||||
sub before_begin {} # Take no action
|
||||
sub after_finish {} # Take no action
|
||||
|
||||
1;
|
||||
|
Reference in New Issue
Block a user