pt-deadlock-logger doesn't handle usernames with dashes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
Low
|
Brian Fraser |
Bug Description
When you create a deadlock with a user that have a dash in the name, pt-deadlock-logger will not store the user name and will store the host name in the user field instead.
pt-deadlock-logger version 2.1.7
Deadlock example:
##### With a user name with a dash in the name (mar-tin) #####
-------
LATEST DETECTED DEADLOCK
-------
121119 18:56:52
*** (1) TRANSACTION:
TRANSACTION 5CD, ACTIVE 10 sec, process no 9490, OS thread id 139862860961536 starting index read
mysql tables in use 1, locked 1
LOCK WAIT 6 lock struct(s), heap size 1248, 3 row lock(s), undo log entries 1
MySQL thread id 26, query id 5024 localhost mar-tin Updating
UPDATE parent SET age=age+1 WHERE id=1
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 0 page no 4624 n bits 72 index `PRIMARY` of table `employees`
*** (2) TRANSACTION:
TRANSACTION 5CC, ACTIVE 23 sec, process no 9490, OS thread id 139862861227776 starting index read
mysql tables in use 1, locked 1
7 lock struct(s), heap size 1248, 4 row lock(s), undo log entries 2
MySQL thread id 38, query id 5043 localhost mar-tin Updating
UPDATE parent SET age=age+1 WHERE id=2
*** (2) HOLDS THE LOCK(S):
RECORD LOCKS space id 0 page no 4624 n bits 72 index `PRIMARY` of table `employees`
*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 0 page no 4624 n bits 72 index `PRIMARY` of table `employees`
*** WE ROLL BACK TRANSACTION (1)
> select * from deadlocks\G
*******
server: Localhost
ts: 2012-11-19 18:56:52
thread: 26
txn_id: 0
txn_time: 10
user: localhost
hostname:
ip:
db: employees
tbl: parent
idx: PRIMARY
lock_type: RECORD
lock_mode: X
wait_hold: w
victim: 1
query: UPDATE parent SET age=age+1 WHERE id=1
*******
server: Localhost
ts: 2012-11-19 18:56:52
thread: 38
txn_id: 0
txn_time: 23
user: localhost <------ Here is the error.
hostname:
ip:
db: employees
tbl: parent
idx: PRIMARY
lock_type: RECORD
lock_mode: X
wait_hold: w
victim: 0
query: UPDATE parent SET age=age+1 WHERE id=2
Thanks!
Martin Arrieta
@martinarrietac
Related branches
- Daniel Nichter: Approve
- Brian Fraser (community): Approve
-
Diff: 173 lines (+115/-4)3 files modifiedbin/pt-deadlock-logger (+8/-3)
t/pt-deadlock-logger/bugs.t (+54/-1)
t/pt-deadlock-logger/samples/bug_1082104.txt (+53/-0)
description: | updated |
Changed in percona-toolkit: | |
status: | New → Triaged |
assignee: | nobody → Brian Fraser (fraserbn) |
Changed in percona-toolkit: | |
status: | Triaged → In Progress |
milestone: | none → 2.1.8 |
Changed in percona-toolkit: | |
importance: | Undecided → Low |
Changed in percona-toolkit: | |
status: | In Progress → Fix Committed |
summary: |
- pt-deadlock-logger problem when the user have a dash in the name + pt-deadlock-logger doesn't handle usernames with dashes |
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-791