From 10fe056242781b880a0e88ed5e215e029cf91c06 Mon Sep 17 00:00:00 2001 From: Carlos Salguero Date: Thu, 19 Sep 2019 14:29:55 -0300 Subject: [PATCH] WIP --- bin/pt-online-schema-change | 6 ++++++ t/pt-online-schema-change/alter_active_table.t | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/bin/pt-online-schema-change b/bin/pt-online-schema-change index 12af840f..d9fbda38 100755 --- a/bin/pt-online-schema-change +++ b/bin/pt-online-schema-change @@ -6697,10 +6697,16 @@ sub index_length { ); my $sth = $cxn->dbh()->prepare($sql); PTDEBUG && _d($sth->{Statement}, 'params:', @$vals); + warn "===================================================================================================="; + _d($sth->{Statement}, 'params:', @$vals); + warn "===================================================================================================="; $sth->execute(@$vals); my $row = $sth->fetchrow_hashref(); $sth->finish(); PTDEBUG && _d('Range scan:', Dumper($row)); + warn "===================================================================================================="; + _d('Range scan:', Dumper($row)); + warn "===================================================================================================="; return $row->{key_len}, $row->{key}; } diff --git a/t/pt-online-schema-change/alter_active_table.t b/t/pt-online-schema-change/alter_active_table.t index 1eaaf460..297acd58 100644 --- a/t/pt-online-schema-change/alter_active_table.t +++ b/t/pt-online-schema-change/alter_active_table.t @@ -170,6 +170,7 @@ $master_dbh->do("TRUNCATE 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(); +sleep(2); # Start inserting, updating, and deleting rows at random. start_query_table(qw(pt_osc t id)); @@ -179,7 +180,7 @@ start_query_table(qw(pt_osc t id)); sub { pt_online_schema_change::main( "$master_dsn,D=pt_osc,t=t", qw(--set-vars innodb_lock_wait_timeout=5), - qw(--print --execute --chunk-size 100 --alter ENGINE=InnoDB)) }, + qw(--print --execute --chunk-size 100 --alter ENGINE=InnoDB --no-check-plan)) }, stderr => 1, ); @@ -234,6 +235,7 @@ start_query_table(qw(pt_osc t id)); ) }, stderr => 1, ); +diag($output); # Stop changing the table's data. stop_query_table();