pt-deadlock-logger can't parse db/tbl/index on partitioned tables

Bug #1043528 reported by Baron Schwartz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Fix Released
Medium
Daniel Nichter

Bug Description

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

A small change to the pattern, just before "trx id", fixes this:

@@ -2736,7 +2736,7 @@
             $hash->{wait_hold} = $what eq 'WAITING FOR THIS LOCK TO BE GRANTED' ? 'w' : 'h';
             @{$hash}{ qw(lock_type idx db tbl txn_id lock_mode) }
                = $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+)$/;
                $hash->{txn_id} = $high ? ( $low + ($high << 32) ) : $low;

Related branches

Brian Fraser (fraserbn)
Changed in percona-toolkit:
status: New → Triaged
milestone: none → 2.1.5
Changed in percona-toolkit:
importance: Undecided → Medium
Changed in percona-toolkit:
assignee: nobody → Daniel Nichter (daniel-nichter)
tags: added: partitions
Changed in percona-toolkit:
status: Triaged → Fix Committed
Brian Fraser (fraserbn)
Changed in percona-toolkit:
status: Fix Committed → Fix Released
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-575

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.