-
Notifications
You must be signed in to change notification settings - Fork 0
/
pt-online-schema-change.3.1.0.patch
34 lines (31 loc) · 1.16 KB
/
pt-online-schema-change.3.1.0.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--- /usr/bin/pt-online-schema-change 2019-11-19 07:40:58.000000000 +0000
+++ pt-online-schema-change 2020-03-01 22:54:38.968673926 +0000
@@ -9525,6 +9525,19 @@
my $statements = $nibble_iter->statements();
my $boundary = $nibble_iter->boundaries();
+
+ if ( $o->get('no-data') ) {
+ print "Not copying rows because --no-data was specified.\n";
+ if ($nibble_iter->{pause_file}) {
+ while(-f $nibble_iter->{pause_file}) {
+ print "Sleeping $nibble_iter->{sleep} seconds because $nibble_iter->{pause_file} exists\n";
+ sleep($nibble_iter->{sleep});
+ }
+ }
+ return;
+ }
+
+
if ( $o->get('dry-run') ) {
print "Not copying rows because this is a dry run.\n";
}
@@ -12428,6 +12441,11 @@
however; it will only give the server a chance to recover from the queueing. If
you notice queueing, it is best to decrease the chunk time.
+=item --no-data
+
+No row will be copied to the new table. This is really dangerous, please use it
+wisely.
+
=item --preserve-triggers
Preserves old triggers when specified.