From 56f97843f15be53c83ad3e18190256d0acd9c302 Mon Sep 17 00:00:00 2001 From: Carlos Salguero Date: Tue, 6 Feb 2018 14:14:29 -0300 Subject: [PATCH 1/4] PT-1455 Added test case --- t/pt-online-schema-change/pt-1455.t | 110 ++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 t/pt-online-schema-change/pt-1455.t diff --git a/t/pt-online-schema-change/pt-1455.t b/t/pt-online-schema-change/pt-1455.t new file mode 100644 index 00000000..8e3c6efc --- /dev/null +++ b/t/pt-online-schema-change/pt-1455.t @@ -0,0 +1,110 @@ +#!/usr/bin/env perl + +BEGIN { + die "The PERCONA_TOOLKIT_BRANCH environment variable is not set.\n" + unless $ENV{PERCONA_TOOLKIT_BRANCH} && -d $ENV{PERCONA_TOOLKIT_BRANCH}; + unshift @INC, "$ENV{PERCONA_TOOLKIT_BRANCH}/lib"; +}; + +use strict; +use warnings FATAL => 'all'; +use threads; +use threads::shared; +use Thread::Semaphore; + +use English qw(-no_match_vars); +use Test::More; + +use Data::Dumper; +use PerconaTest; +use Sandbox; +use SqlModes; +use File::Temp qw/ tempdir /; + +plan tests => 4; + +require "$trunk/bin/pt-online-schema-change"; + +my $dp = new DSNParser(opts=>$dsn_opts); +my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp); + +my $master_dbh = $sb->get_dbh_for("master"); +my $master_dsn = $sb->dsn_for("master"); + +my $slave1_dbh = $sb->get_dbh_for("slave1"); +my $slave1_dsn = $sb->dsn_for("slave1"); + +# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic +# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the +# tool will die. +my @args = (qw(--set-vars innodb_lock_wait_timeout=3)); +my $output; +my $exit_status; + +# $sb->load_file('master3', "t/pt-online-schema-change/samples/pt-244.sql"); +$slave1_dbh->do("STOP SLAVE"); +$slave1_dbh->do("CHANGE REPLICATION FILTER REPLICATE_IGNORE_DB = (ignored_db)"); +$slave1_dbh->do("START SLAVE"); + +$master_dbh->do("DROP DATABASE IF EXISTS ignored_db"); +$master_dbh->do("CREATE DATABASE ignored_db"); +$master_dbh->do("CREATE TABLE ignored_db.t1 (id int, f2 int) ENGINE=InnoDB"); + +my $num_rows = 1000; +my $master_port = $Sandbox::port_for{master}; + +diag("Loading $num_rows into the table. This might take some time."); +diag(`util/mysql_random_data_load_linux_amd64 --host=127.1 --port=$master_port --user=msandbox --password=msandbox test t3 $num_rows`); +diag("$num_rows rows loaded. Starting tests."); + +$master_dbh->do("FLUSH TABLES"); + +my $new_dir='/tmp/tdir'; +diag(`rm -rf $new_dir`); +diag(`mkdir $new_dir`); + +diag("2"); +($output, $exit_status) = full_output( + sub { pt_online_schema_change::main(@args, "$master_dsn,D=test,t=t3", + '--execute', + '--alter', "engine=innodb", + '--data-dir', $new_dir, + ), + }, + stderr => 1, +); +diag("3"); + +is( + $exit_status, + 0, + "PT-244 Successfully altered. Exit status = 0", +); + +like( + $output, + qr/Successfully altered/s, + "PT-244 Got successfully altered message.", +); + + +my $db_dir="$new_dir/test/"; +opendir(my $dh, $db_dir) || die "Can't opendir $db_dir: $!"; +my @files = grep { /^t3#P#p/ } readdir($dh); +closedir $dh; + +is( + scalar @files, + 4, + "PT-224 Number of files is correct", +); + +$dbh3->do("DROP DATABASE IF EXISTS test"); + +# ############################################################################# +# Done. +# ############################################################################# +$sb->wipe_clean($dbh3); +diag(`$trunk/sandbox/stop-sandbox $master3_port >/dev/null`); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); +done_testing; From 943cb68ee0f69b250183687723f5e2d816d955ef Mon Sep 17 00:00:00 2001 From: Carlos Salguero Date: Thu, 8 Feb 2018 13:07:13 -0300 Subject: [PATCH 2/4] PMM-1455 Tests added --- bin/pt-online-schema-change | 11 ++++--- t/pt-online-schema-change/pt-1455.t | 29 +++++++------------ .../samples/pt-1455_master.sql | 6 ++++ .../samples/pt-1455_slave.sql | 4 +++ util/check-load-data | 2 +- 5 files changed, 28 insertions(+), 24 deletions(-) create mode 100644 t/pt-online-schema-change/samples/pt-1455_master.sql create mode 100644 t/pt-online-schema-change/samples/pt-1455_slave.sql diff --git a/bin/pt-online-schema-change b/bin/pt-online-schema-change index 91184b0d..3d6cfccd 100755 --- a/bin/pt-online-schema-change +++ b/bin/pt-online-schema-change @@ -4281,7 +4281,8 @@ sub recurse_to_slaves { PTDEBUG && _d('Connected to', $dp->as_string($slave_dsn)); }; if ( $EVAL_ERROR ) { - print STDERR "Cannot connect to ", $dp->as_string($slave_dsn), "\n" + #TODO REMOVE DEBUG + print STDERR "1> Cannot connect to ", $dp->as_string($slave_dsn), "\n" or die "Cannot print: $OS_ERROR"; return; } @@ -8693,7 +8694,8 @@ sub main { # to stop lagging. If any replica is stopped, the tool # waits forever until the replica is started." # https://bugs.launchpad.net/percona-toolkit/+bug/1402051 - PTDEBUG && _d('Cannot connect to', $cxn->name(), ':', + #TODO REMOVE DEBUG + PTDEBUG && _d('2> Cannot connect to', $cxn->name(), ':', $EVAL_ERROR); # Make ReplicaLagWaiter::wait() report slave is stopped. return undef; @@ -9134,7 +9136,8 @@ sub main { } }; - if ( $slaves && scalar @$slaves ) { + my $table_is_replicated; + if ( $slaves && scalar @$slaves && $table_is_replicated) { foreach my $slave (@$slaves) { my ($pr, $pr_first_report); if ( $o->get('progress') ) { @@ -12843,7 +12846,7 @@ Default character set. =item * D -dsn: database; copy: yes +dsn: database; copy: no Database for the old and new table. diff --git a/t/pt-online-schema-change/pt-1455.t b/t/pt-online-schema-change/pt-1455.t index 8e3c6efc..7a961646 100644 --- a/t/pt-online-schema-change/pt-1455.t +++ b/t/pt-online-schema-change/pt-1455.t @@ -41,20 +41,15 @@ my @args = (qw(--set-vars innodb_lock_wait_timeout=3)); my $output; my $exit_status; -# $sb->load_file('master3', "t/pt-online-schema-change/samples/pt-244.sql"); -$slave1_dbh->do("STOP SLAVE"); -$slave1_dbh->do("CHANGE REPLICATION FILTER REPLICATE_IGNORE_DB = (ignored_db)"); -$slave1_dbh->do("START SLAVE"); - -$master_dbh->do("DROP DATABASE IF EXISTS ignored_db"); -$master_dbh->do("CREATE DATABASE ignored_db"); -$master_dbh->do("CREATE TABLE ignored_db.t1 (id int, f2 int) ENGINE=InnoDB"); +$sb->load_file('slave1', "t/pt-online-schema-change/samples/pt-1455_slave.sql"); +$sb->load_file('slave2', "t/pt-online-schema-change/samples/pt-1455_slave.sql"); +$sb->load_file('master', "t/pt-online-schema-change/samples/pt-1455_master.sql"); my $num_rows = 1000; my $master_port = $Sandbox::port_for{master}; diag("Loading $num_rows into the table. This might take some time."); -diag(`util/mysql_random_data_load_linux_amd64 --host=127.1 --port=$master_port --user=msandbox --password=msandbox test t3 $num_rows`); +diag(`util/mysql_random_data_load_linux_amd64 --host=127.1 --port=$master_port --user=msandbox --password=msandbox ignored_db t1 $num_rows`); diag("$num_rows rows loaded. Starting tests."); $master_dbh->do("FLUSH TABLES"); @@ -63,28 +58,25 @@ my $new_dir='/tmp/tdir'; diag(`rm -rf $new_dir`); diag(`mkdir $new_dir`); -diag("2"); ($output, $exit_status) = full_output( - sub { pt_online_schema_change::main(@args, "$master_dsn,D=test,t=t3", + sub { pt_online_schema_change::main(@args, "$master_dsn,D=ignored_db,t=t1", '--execute', '--alter', "engine=innodb", - '--data-dir', $new_dir, ), }, stderr => 1, ); -diag("3"); is( $exit_status, 0, - "PT-244 Successfully altered. Exit status = 0", + "PT-1455 Successfully altered. Exit status = 0", ); like( $output, qr/Successfully altered/s, - "PT-244 Got successfully altered message.", + "PT-1455 Got successfully altered message.", ); @@ -96,15 +88,14 @@ closedir $dh; is( scalar @files, 4, - "PT-224 Number of files is correct", + "PT-1455 Number of files is correct", ); -$dbh3->do("DROP DATABASE IF EXISTS test"); +$master_dbh->do("DROP DATABASE IF EXISTS ignored_db"); # ############################################################################# # Done. # ############################################################################# -$sb->wipe_clean($dbh3); -diag(`$trunk/sandbox/stop-sandbox $master3_port >/dev/null`); +$sb->wipe_clean($master_dbh); ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); done_testing; diff --git a/t/pt-online-schema-change/samples/pt-1455_master.sql b/t/pt-online-schema-change/samples/pt-1455_master.sql new file mode 100644 index 00000000..ca5967ac --- /dev/null +++ b/t/pt-online-schema-change/samples/pt-1455_master.sql @@ -0,0 +1,6 @@ +DROP DATABASE IF EXISTS employees; +CREATE DATABASE employees; +CREATE TABLE employees.t1 ( + id INT AUTO_INCREMENT PRIMARY KEY, + f2 INT +) ENGINE=InnoDB; diff --git a/t/pt-online-schema-change/samples/pt-1455_slave.sql b/t/pt-online-schema-change/samples/pt-1455_slave.sql new file mode 100644 index 00000000..fbb9b928 --- /dev/null +++ b/t/pt-online-schema-change/samples/pt-1455_slave.sql @@ -0,0 +1,4 @@ +STOP SLAVE; +CHANGE REPLICATION FILTER REPLICATE_WILD_IGNORE_TABLE = ('employees.%'); +RESET SLAVE; +START SLAVE; diff --git a/util/check-load-data b/util/check-load-data index 69f25577..23732ce5 100755 --- a/util/check-load-data +++ b/util/check-load-data @@ -44,7 +44,7 @@ $dbh->do("CREATE TABLE IF NOT EXISTS percona_test.load_data (i int)"); `echo 1 > /tmp/load_data_test.$$`; eval { - $dbh->do("LOAD DATA LOCAL INFILE '/tmp/load_data_test.$$' INTO TABLE percona_test.load_data"); + $dbh->do("LOAD DATA INFILE '/tmp/load_data_test.$$' INTO TABLE percona_test.load_data"); }; if ( $EVAL_ERROR ) { From d8ec16f2132bca970d348a157cc33fc1825668a9 Mon Sep 17 00:00:00 2001 From: Carlos Salguero Date: Fri, 16 Feb 2018 14:27:16 -0300 Subject: [PATCH 3/4] PMM-1455 pt-osc is stuck when the table that is being altered is filtered out in the slave --- bin/pt-online-schema-change | 2 +- .../alter_active_table.t | 4 +- t/pt-online-schema-change/issue-1646713.t | 14 +++++- t/pt-online-schema-change/pt-1455.t | 39 +++++++--------- .../samples/issue-1646713.sql | 44 +------------------ .../samples/pt-1455_master.sql | 2 + .../samples/pt-1455_reset_slave.sql | 6 +++ .../samples/pt-1455_slave.sql | 4 +- 8 files changed, 44 insertions(+), 71 deletions(-) create mode 100644 t/pt-online-schema-change/samples/pt-1455_reset_slave.sql diff --git a/bin/pt-online-schema-change b/bin/pt-online-schema-change index 3d6cfccd..0804bb84 100755 --- a/bin/pt-online-schema-change +++ b/bin/pt-online-schema-change @@ -5002,7 +5002,7 @@ sub wait { my $lag = $get_lag->($lagged_slaves[$i]->{cxn}); PTDEBUG && _d($lagged_slaves[$i]->{cxn}->name(), 'slave lag:', $lag); - if ( !defined $lag || $lag > $max_lag ) { + if ( defined $lag && $lag > $max_lag ) { $lagged_slaves[$i]->{lag} = $lag; } else { diff --git a/t/pt-online-schema-change/alter_active_table.t b/t/pt-online-schema-change/alter_active_table.t index b3c42a20..f5fe7e43 100644 --- a/t/pt-online-schema-change/alter_active_table.t +++ b/t/pt-online-schema-change/alter_active_table.t @@ -165,7 +165,7 @@ else { } $master_dbh->do("USE pt_osc"); $master_dbh->do("TRUNCATE TABLE t"); -$master_dbh->do("LOAD DATA LOCAL INFILE '$trunk/t/pt-online-schema-change/samples/basic_no_fks.data' INTO TABLE t"); +$master_dbh->do("LOAD DATA INFILE '$trunk/t/pt-online-schema-change/samples/basic_no_fks.data' INTO TABLE t"); $master_dbh->do("ANALYZE TABLE t"); $sb->wait_for_slaves(); @@ -215,7 +215,7 @@ is( $master_dbh->do("USE pt_osc"); $master_dbh->do("TRUNCATE TABLE t"); -$master_dbh->do("LOAD DATA LOCAL INFILE '$trunk/t/pt-online-schema-change/samples/basic_no_fks.data' INTO TABLE t"); +$master_dbh->do("LOAD DATA INFILE '$trunk/t/pt-online-schema-change/samples/basic_no_fks.data' INTO TABLE t"); $master_dbh->do("ANALYZE TABLE t"); $sb->wait_for_slaves(); diff --git a/t/pt-online-schema-change/issue-1646713.t b/t/pt-online-schema-change/issue-1646713.t index 3d716db8..10e529f5 100644 --- a/t/pt-online-schema-change/issue-1646713.t +++ b/t/pt-online-schema-change/issue-1646713.t @@ -46,6 +46,11 @@ my $exit_status; my $sample = "t/pt-online-schema-change/samples/"; $sb->load_file('master', "$sample/issue-1646713.sql"); +my $num_rows = 1000; +my $master_port = 12345; + +$master_dbh->do("FLUSH TABLES"); +$sb->wait_for_slaves(); sub start_thread { my ($dsn_opts, $sleep_time) = @_; @@ -53,14 +58,18 @@ sub start_thread { my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp); my $dbh = $sb->get_dbh_for('master'); diag("Thread started: Sleeping $sleep_time seconds before updating the PK field for row with id=1 in test.sbtest"); - sleep($sleep_time); + # We need to lock the tables to prevent osc to really start before we are able to write the row to the table + $dbh->do("LOCK TABLES `test`.`o1` WRITE"); + select(undef, undef, undef, $sleep_time); $dbh->do("UPDATE `test`.`o1` SET id=0 WHERE id=1"); + $dbh->do("UNLOCK TABLES"); diag("Row updated"); } -my $thr = threads->create('start_thread', $dsn_opts, 1); +my $thr = threads->create('start_thread', $dsn_opts, 0.50); $thr->detach(); threads->yield(); + diag("Starting osc. A row will be updated in a different thread."); my $dir = tempdir( CLEANUP => 1 ); $output = output( @@ -71,6 +80,7 @@ $output = output( ), }, ); +diag($output); like( $output, diff --git a/t/pt-online-schema-change/pt-1455.t b/t/pt-online-schema-change/pt-1455.t index 7a961646..3861019d 100644 --- a/t/pt-online-schema-change/pt-1455.t +++ b/t/pt-online-schema-change/pt-1455.t @@ -21,7 +21,7 @@ use Sandbox; use SqlModes; use File::Temp qw/ tempdir /; -plan tests => 4; +plan tests => 3; require "$trunk/bin/pt-online-schema-change"; @@ -41,26 +41,26 @@ my @args = (qw(--set-vars innodb_lock_wait_timeout=3)); my $output; my $exit_status; -$sb->load_file('slave1', "t/pt-online-schema-change/samples/pt-1455_slave.sql"); +diag("Setting replication filters on slave 2"); $sb->load_file('slave2', "t/pt-online-schema-change/samples/pt-1455_slave.sql"); -$sb->load_file('master', "t/pt-online-schema-change/samples/pt-1455_master.sql"); +diag("Setting replication filters on slave 1"); +$sb->load_file('slave1', "t/pt-online-schema-change/samples/pt-1455_slave.sql"); +diag("Setting replication filters on master"); +$sb->load_file('master', "t/pt-online-schema-change/samples/pt-1455_master.sql",undef, no_wait => 1); +diag("replication filters set"); my $num_rows = 1000; -my $master_port = $Sandbox::port_for{master}; +my $master_port = 12345; diag("Loading $num_rows into the table. This might take some time."); -diag(`util/mysql_random_data_load_linux_amd64 --host=127.1 --port=$master_port --user=msandbox --password=msandbox ignored_db t1 $num_rows`); +diag(`util/mysql_random_data_load_linux_amd64 --host=127.1 --port=$master_port --user=msandbox --password=msandbox employees t1 $num_rows`); diag("$num_rows rows loaded. Starting tests."); $master_dbh->do("FLUSH TABLES"); -my $new_dir='/tmp/tdir'; -diag(`rm -rf $new_dir`); -diag(`mkdir $new_dir`); - ($output, $exit_status) = full_output( - sub { pt_online_schema_change::main(@args, "$master_dsn,D=ignored_db,t=t1", - '--execute', + sub { pt_online_schema_change::main(@args, "$master_dsn,D=employees,t=t1", + '--execute', '--no-check-replication-filters', '--alter', "engine=innodb", ), }, @@ -79,19 +79,12 @@ like( "PT-1455 Got successfully altered message.", ); +$master_dbh->do("DROP DATABASE IF EXISTS employees"); -my $db_dir="$new_dir/test/"; -opendir(my $dh, $db_dir) || die "Can't opendir $db_dir: $!"; -my @files = grep { /^t3#P#p/ } readdir($dh); -closedir $dh; - -is( - scalar @files, - 4, - "PT-1455 Number of files is correct", -); - -$master_dbh->do("DROP DATABASE IF EXISTS ignored_db"); +diag("Resetting replication filters on slave 2"); +$sb->load_file('slave2', "t/pt-online-schema-change/samples/pt-1455_reset_slave.sql"); +diag("Resetting replication filters on slave 1"); +$sb->load_file('slave1', "t/pt-online-schema-change/samples/pt-1455_reset_slave.sql"); # ############################################################################# # Done. diff --git a/t/pt-online-schema-change/samples/issue-1646713.sql b/t/pt-online-schema-change/samples/issue-1646713.sql index e4ac06e0..5f44e4e7 100644 --- a/t/pt-online-schema-change/samples/issue-1646713.sql +++ b/t/pt-online-schema-change/samples/issue-1646713.sql @@ -2,40 +2,12 @@ DROP DATABASE IF EXISTS `test`; CREATE DATABASE IF NOT EXISTS `test`; USE test; --- MySQL dump 10.13 Distrib 5.7.14-8, for debian-linux-gnu (x86_64) --- --- Host: localhost Database: test --- ------------------------------------------------------ --- Server version 5.7.14-8-log - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; - --- --- Table structure for table `sbtest` --- - DROP TABLE IF EXISTS `o1`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; CREATE TABLE `o1` ( - `id` int -(10) unsigned NOT NULL AUTO_INCREMENT, + `id` int (10) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=1100001 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1; --- --- Dumping data for table `sbtest` --- LOCK TABLES `o1` WRITE; /*!40000 ALTER TABLE `o1` DISABLE KEYS */; @@ -140,16 +112,4 @@ INSERT INTO `o1` VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9), (980),(981),(982),(983),(984),(985),(986),(987),(988),(989), (990),(991),(992),(993),(994),(995),(996),(997),(998),(999), (10000); -/*!40000 ALTER TABLE `o1` ENABLE KEYS */; UNLOCK TABLES; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - --- Dump completed on 2017-03-14 15:19:26 diff --git a/t/pt-online-schema-change/samples/pt-1455_master.sql b/t/pt-online-schema-change/samples/pt-1455_master.sql index ca5967ac..fd6bed3a 100644 --- a/t/pt-online-schema-change/samples/pt-1455_master.sql +++ b/t/pt-online-schema-change/samples/pt-1455_master.sql @@ -1,6 +1,8 @@ DROP DATABASE IF EXISTS employees; CREATE DATABASE employees; +-- This table should be replicated CREATE TABLE employees.t1 ( id INT AUTO_INCREMENT PRIMARY KEY, f2 INT ) ENGINE=InnoDB; + diff --git a/t/pt-online-schema-change/samples/pt-1455_reset_slave.sql b/t/pt-online-schema-change/samples/pt-1455_reset_slave.sql new file mode 100644 index 00000000..59c207b0 --- /dev/null +++ b/t/pt-online-schema-change/samples/pt-1455_reset_slave.sql @@ -0,0 +1,6 @@ +STOP SLAVE; +CHANGE REPLICATION FILTER REPLICATE_IGNORE_DB = (); +CHANGE REPLICATION FILTER REPLICATE_IGNORE_TABLE = (); +CHANGE REPLICATION FILTER REPLICATE_WILD_IGNORE_TABLE = (); +RESET SLAVE; +START SLAVE; diff --git a/t/pt-online-schema-change/samples/pt-1455_slave.sql b/t/pt-online-schema-change/samples/pt-1455_slave.sql index fbb9b928..86ee176a 100644 --- a/t/pt-online-schema-change/samples/pt-1455_slave.sql +++ b/t/pt-online-schema-change/samples/pt-1455_slave.sql @@ -1,4 +1,6 @@ STOP SLAVE; -CHANGE REPLICATION FILTER REPLICATE_WILD_IGNORE_TABLE = ('employees.%'); +CHANGE REPLICATION FILTER REPLICATE_IGNORE_DB = (`ignored_db`); +CHANGE REPLICATION FILTER REPLICATE_IGNORE_TABLE = (`idb1`.`it1`, `idb1`.`it2`); +CHANGE REPLICATION FILTER REPLICATE_WILD_IGNORE_TABLE = ('employees.eit%'); RESET SLAVE; START SLAVE; From 99479b0480bc5bd918eb779a6cb5f792b9fa65d0 Mon Sep 17 00:00:00 2001 From: Carlos Salguero Date: Fri, 16 Feb 2018 14:35:46 -0300 Subject: [PATCH 4/4] PT-1455 Updated version number --- bin/pt-online-schema-change | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/pt-online-schema-change b/bin/pt-online-schema-change index 89505e66..b7c7c64b 100755 --- a/bin/pt-online-schema-change +++ b/bin/pt-online-schema-change @@ -13038,6 +13038,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-online-schema-change 3.0.6 +pt-online-schema-change 3.0.7 =cut