mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-24 21:35:00 +00:00
Add after nibble hook to pt-online-schema-change (#645)
* Include hook after nibble on copy rows * Update tests with new hook for pt-online-schema-change
This commit is contained in:

committed by
GitHub

parent
b920dc7639
commit
8ece30ff2f
@@ -10022,6 +10022,11 @@ sub main {
|
||||
sleep $sleep;
|
||||
}
|
||||
|
||||
# --plugin hook
|
||||
if ( $plugin && $plugin->can('on_copy_rows_after_nibble') ) {
|
||||
$plugin->on_copy_rows_after_nibble();
|
||||
}
|
||||
|
||||
return;
|
||||
},
|
||||
done => sub {
|
||||
@@ -13102,6 +13107,7 @@ These hooks, in this order, are called if defined:
|
||||
before_create_triggers
|
||||
after_create_triggers
|
||||
before_copy_rows
|
||||
on_copy_rows_after_nibble
|
||||
after_copy_rows
|
||||
before_swap_tables
|
||||
after_swap_tables
|
||||
@@ -13181,6 +13187,11 @@ Here's a plugin file template for all hooks:
|
||||
print "PLUGIN before_copy_rows\n";
|
||||
}
|
||||
|
||||
sub on_copy_rows_after_nibble {
|
||||
my ($self, %args) = @_;
|
||||
print "PLUGIN on_copy_rows_after_nibble\n";
|
||||
}
|
||||
|
||||
sub after_copy_rows {
|
||||
my ($self, %args) = @_;
|
||||
print "PLUGIN after_copy_rows\n";
|
||||
|
@@ -65,6 +65,7 @@ is_deeply(
|
||||
'PLUGIN before_create_triggers',
|
||||
'PLUGIN after_create_triggers',
|
||||
'PLUGIN before_copy_rows',
|
||||
'PLUGIN on_copy_rows_after_nibble',
|
||||
'PLUGIN after_copy_rows',
|
||||
'PLUGIN before_swap_tables',
|
||||
'PLUGIN after_swap_tables',
|
||||
|
@@ -51,6 +51,11 @@ sub before_copy_rows {
|
||||
print "PLUGIN before_copy_rows\n";
|
||||
}
|
||||
|
||||
sub on_copy_rows_after_nibble {
|
||||
my ($self, %args) = @_;
|
||||
print "PLUGIN on_copy_rows_after_nibble\n";
|
||||
}
|
||||
|
||||
sub after_copy_rows {
|
||||
my ($self, %args) = @_;
|
||||
print "PLUGIN after_copy_rows\n";
|
||||
|
Reference in New Issue
Block a user