mysqldumpslow is broken by the more detailed slow log format
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
mysqldumpslow is confused by slow query log in percona-server. This results in every single query being treated individually, preventing the tool from performing aggregate analysis.
For example asking for the top 10 slow queries results in the same query being listed 10 times
# mysqldumpslow -t 10 mysql-slow.log
Reading mysql slow query log from mysql-slow.log
Count: 1 Time=0.00s (0s) Lock=0.00s (0s) Rows=0.0 (0), pressthing[
# Thread_id: N Schema: pressthing_
# Query_time: N.N Lock_time: N.N Rows_sent: N Rows_examined: N Rows_affected: N Rows_read: N
# Bytes_sent: N Tmp_tables: N Tmp_disk_tables: N Tmp_table_sizes: N
# InnoDB_trx_id: F82E01
SET timestamp=N;
SELECT * FROM `delayed_jobs` WHERE ((run_at <= 'S' AND (locked_at IS NULL OR locked_at < 'S') OR (locked_by = 'S')) AND failed_at IS NULL) ORDER BY priority DESC, run_at ASC LIMIT N
Count: 1 Time=0.00s (0s) Lock=0.00s (0s) Rows=0.0 (0), pressthing[
# Thread_id: N Schema: pressthing_
# Query_time: N.N Lock_time: N.N Rows_sent: N Rows_examined: N Rows_affected: N Rows_read: N
# Bytes_sent: N Tmp_tables: N Tmp_disk_tables: N Tmp_table_sizes: N
# InnoDB_trx_id: F82365
SET timestamp=N;
SELECT * FROM `delayed_jobs` WHERE ((run_at <= 'S' AND (locked_at IS NULL OR locked_at < 'S') OR (locked_by = 'S')) AND failed_at IS NULL) ORDER BY priority DESC, run_at ASC LIMIT N
Changed in percona-server: | |
status: | New → Won't Fix |
It's definitely the transaction id if I run:
grep -v InnoDB_trx_id mysql-slow.log | mysqldumpslow -
I get the correct output.