pt-deadlock-logger can't parse db/tbl/index on partitioned tables
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 @@
= $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(?:/
if ( $hash->{txn_id} ) {
my ( $high, $low ) = $hash->{txn_id} =~ m/^(\d+) (\d+)$/;
Related branches
- Daniel Nichter: Approve
-
Diff: 182 lines (+94/-44)3 files modifiedbin/pt-deadlock-logger (+1/-1)
t/pt-deadlock-logger/basics.t (+74/-43)
t/pt-deadlock-logger/samples/dead-lock-with-partitions.sql (+19/-0)
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 |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
Percona now uses JIRA for bug reports so this bug report is migrated to: https:/ /jira.percona. com/browse/ PT-575