fix a couple things for MySQL 5.5

This commit is contained in:
Baron Schwartz
2012-06-03 14:47:00 -04:00
parent 275ae93084
commit 1e082cfd34
2 changed files with 14 additions and 11 deletions

View File

@@ -1987,7 +1987,7 @@ sub main {
PTDEBUG && _d($sql); PTDEBUG && _d($sql);
eval { $dbh_child->do($sql); }; # Should block against parent. eval { $dbh_child->do($sql); }; # Should block against parent.
PTDEBUG && _d($EVAL_ERROR); # Parent inserted value 0. PTDEBUG && _d($EVAL_ERROR); # Parent inserted value 0.
$sql = "DROP TABLE $db_tbl"; $sql = "COMMIT";
PTDEBUG && _d($sql); PTDEBUG && _d($sql);
$dbh_child->do($sql); $dbh_child->do($sql);
exit; exit;
@@ -2001,6 +2001,9 @@ sub main {
eval { $dbh->do($sql); }; eval { $dbh->do($sql); };
PTDEBUG && _d($EVAL_ERROR); PTDEBUG && _d($EVAL_ERROR);
waitpid($pid, 0); waitpid($pid, 0);
$sql = "DROP TABLE $db_tbl";
PTDEBUG && _d($sql);
$dbh->do($sql);
} }
# If there's an --interval argument, run forever or till specified. # If there's an --interval argument, run forever or till specified.

View File

@@ -26,16 +26,16 @@ is_deeply(
pt_deadlock_logger::parse_deadlocks($innodb_status_sample), pt_deadlock_logger::parse_deadlocks($innodb_status_sample),
{ {
'1' => { '1' => {
db => '', db => 'test',
hostname => 'localhost', hostname => 'localhost',
id => 1, id => 1,
idx => '', idx => 'PRIMARY',
ip => '', ip => '',
lock_mode => '', lock_mode => 'X',
lock_type => '', lock_type => 'RECORD',
query => 'update a set movie_id=96 where id =2', query => 'update a set movie_id=96 where id =2',
server => '', server => '',
tbl => '', tbl => 'a',
thread => '19', thread => '19',
ts => '2011-12-12T22:52:42', ts => '2011-12-12T22:52:42',
txn_id => 0, txn_id => 0,
@@ -45,16 +45,16 @@ is_deeply(
wait_hold => 'w' wait_hold => 'w'
}, },
'2' => { '2' => {
db => '', db => 'test',
hostname => 'localhost', hostname => 'localhost',
id => 2, id => 2,
idx => '', idx => 'PRIMARY',
ip => '', ip => '',
lock_mode => '', lock_mode => 'X',
lock_type => '', lock_type => 'RECORD',
query => 'update a set movie_id=98 where id =4', query => 'update a set movie_id=98 where id =4',
server => '', server => '',
tbl => '', tbl => 'a',
thread => '18', thread => '18',
ts => '2011-12-12T22:52:42', ts => '2011-12-12T22:52:42',
txn_id => 0, txn_id => 0,