Details
-
Bug
-
Status: Done
-
High
-
Resolution: Fixed
-
None
-
None
-
None
Description
**Reported in Launchpad by Baron Schwartz last update 16-11-2012 00:04:29
Newer versions of MySQL add the partition information to lock output in SHOW ENGINE INNODB STATUS, and pt-deadlock-logger doesn't expect this. Here is a sample:
-
-
- (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 34511934 page no 8475 n bits 296 index `PRIMARY` of table `mydb`.`mytbl` /* Partition `cl71` */ trx id 1E29B11F9 lock_mode X locks rec but not gap waiting
- (1) WAITING FOR THIS LOCK TO BE GRANTED:
-
A small change to the pattern, just before "trx id", fixes this:
@@ -2736,7 +2736,7 @@
$hash->
= $what eq 'WAITING FOR THIS LOCK TO BE GRANTED' ? 'w' : 'h';
@{$hash}
= $body
- =~ m{^(RECORD|TABLE) LOCKS? (?:space id \d+ page no \d+ n bits \d+ index `?$n`? of )?table `$n(?:/|`\.`)$n` trx id $t lock.mode (\S+)}m;
+ =~ m{^(RECORD|TABLE) LOCKS? (?:space id \d+ page no \d+ n bits \d+ index `?$n`? of )?table `$n(?:/|`\.`)$n`.*?trx id $t lock.mode (\S+)}m;
if ( $hash-> {txn_id} ) {
my ( $high, $low ) = $hash->{txn_id}=~ m/^(\d+) (\d+)$/;
{txn_id}
$hash->= $high ? ( $low + ($high << 32) ) : $low;