This commit is contained in:
Carlos Salguero
2019-09-19 14:29:55 -03:00
parent b03767a260
commit 10fe056242
2 changed files with 9 additions and 1 deletions
+6
View File
@@ -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};
}
@@ -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();