PT-1616 Added invalid utf-8 chars to the test

This commit is contained in:
Carlos Salguero
2018-10-07 14:00:39 -03:00
parent 91484a7bb5
commit 9d52a1b5e2
2 changed files with 16 additions and 3 deletions

14
Gopkg.lock generated
View File

@@ -73,6 +73,18 @@
packages = ["."] packages = ["."]
revision = "bf9dde6d0d2c004a008c27aaee91170c786f6db8" revision = "bf9dde6d0d2c004a008c27aaee91170c786f6db8"
[[projects]]
name = "github.com/kr/pretty"
packages = ["."]
revision = "73f6ac0b30a98e433b289500d779f50c1a6f0712"
version = "v0.1.0"
[[projects]]
name = "github.com/kr/text"
packages = ["."]
revision = "e2ffdb16a802fe2bb95e2e35ff34f0e53aeef34f"
version = "v0.1.0"
[[projects]] [[projects]]
name = "github.com/mattn/go-shellwords" name = "github.com/mattn/go-shellwords"
packages = ["."] packages = ["."]
@@ -195,6 +207,6 @@
[solve-meta] [solve-meta]
analyzer-name = "dep" analyzer-name = "dep"
analyzer-version = 1 analyzer-version = 1
inputs-digest = "6e2c1fd110c892297e79498479e87f7d4c63755a5a1d63d13c82eb42a7e5fbf2" inputs-digest = "35a93d0003438bc707c085101ccfca910f349d201cd01edc986d0ed64ef2a12f"
solver-name = "gps-cdcl" solver-name = "gps-cdcl"
solver-version = 1 solver-version = 1

View File

@@ -31,7 +31,7 @@ diag("loading samples");
$sb->load_file('master', 't/pt-table-checksum/samples/pt-1616.sql'); $sb->load_file('master', 't/pt-table-checksum/samples/pt-1616.sql');
my $num_rows = 50000; my $num_rows = 50000;
diag("Loading $num_rows into the table. This might take some time."); diag("Loading $num_rows rows into the table. This might take some time.");
# diag(`util/mysql_random_data_load --host=127.0.0.1 --port=12345 --user=msandbox --password=msandbox junk pt_test_100 $num_rows`); # diag(`util/mysql_random_data_load --host=127.0.0.1 --port=12345 --user=msandbox --password=msandbox junk pt_test_100 $num_rows`);
my $sql = "INSERT INTO junk.pt_test_100 (id1, id2) VALUES (?, ?)"; my $sql = "INSERT INTO junk.pt_test_100 (id1, id2) VALUES (?, ?)";
@@ -48,6 +48,7 @@ for (my $i=0; $i < $num_rows; $i++) {
$sth->execute($id1, $id2); $sth->execute($id1, $id2);
} }
$sth->finish(); $sth->finish();
$dbh->do('INSERT INTO junk.pt_test_100 (id1, id2) VALUES(UNHEX("F96DD7"), UNHEX("F96DD7"))');
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic # 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. # so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
@@ -78,7 +79,7 @@ is(
"--chunk-size", "1", "--chunk-size", "1",
"--resume", "--run-time", "5s", $master_dsn "--resume", "--run-time", "5s", $master_dsn
); );
#diag("Running test 1: \nbin/pt-table-checksum ".join(" ", @args) );
$output = output( $output = output(
sub { $exit_status = pt_table_checksum::main(@args) }, sub { $exit_status = pt_table_checksum::main(@args) },
stderr => 1, stderr => 1,