some changes to work with MySQL 5.5

This commit is contained in:
Baron Schwartz
2012-06-03 13:50:02 -04:00
parent a0b54b145d
commit cae983afc2
2 changed files with 9 additions and 1 deletions

View File

@@ -31,6 +31,8 @@ my $output;
my $cnf = "/tmp/12345/my.sandbox.cnf";
my $cmd = "$trunk/bin/pt-deadlock-logger -F $cnf h=127.1";
$dbh1->commit;
$dbh2->commit;
$sb->wipe_clean($dbh1);
$sb->create_dbs($dbh1, ['test']);
@@ -38,6 +40,7 @@ $sb->create_dbs($dbh1, ['test']);
$dbh1->do("create table test.dl(a int) engine=innodb");
$dbh1->do("insert into test.dl(a) values(0), (1)");
$dbh1->commit;
$dbh2->commit;
$dbh1->{InactiveDestroy} = 1;
$dbh2->{InactiveDestroy} = 1;
@@ -79,6 +82,8 @@ foreach my $child ( 0..1 ) {
foreach my $child ( keys %children ) {
my $pid = waitpid($children{$child}, 0);
}
$dbh1->commit;
$dbh2->commit;
# Test that there is a deadlock
$output = $dbh1->selectrow_hashref('show /*!40101 engine*/ innodb status')->{status};
@@ -160,6 +165,8 @@ ok(
# #############################################################################
# Done.
# #############################################################################
$dbh1->commit;
$dbh2->commit;
$sb->wipe_clean($dbh1);
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
exit;