mysqldumpslow broken with PS slow log format
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.1 |
Fix Released
|
Low
|
Oleg Tsarev | |||
5.5 |
Fix Released
|
Low
|
Yura Sorokin | |||
5.6 |
Fix Released
|
Low
|
Yura Sorokin | |||
5.7 |
Fix Released
|
Low
|
Yura Sorokin |
Bug Description
The statistics line is not being calculated properly because the regexp line does not work well with the PS format.
This can easily be fixed by replacing line 104 from the mysqldumpslow script that ships with 5.1.58 with:
s/\s+#\
Sample output with PS slow log format:
Count: 1 Time=0.0000s (0s) Lock=0.0000s (0s) Rows=0.0 (0), msandbox[
# Thread_id: 7 Schema: employees Last_errno: 0 Killed: 0
# Query_time: 0.259588 Lock_time: 0.046811 Rows_sent: 0 Rows_examined: 0 Rows_affected: 24923 Rows_read: 6
# Bytes_sent: 56 Tmp_tables: 0 Tmp_disk_tables: 0 Tmp_table_sizes: 0
# InnoDB_trx_id: 3A0
# QC_Hit: No Full_scan: No Full_join: No Tmp_table: No Tmp_table_on_disk: No
# Filesort: No Filesort_on_disk: No Merge_passes: 0
# InnoDB_IO_r_ops: 0 InnoDB_IO_r_bytes: 0 InnoDB_IO_r_wait: 0.000000
# InnoDB_
# InnoDB_
Sample output with community slow log format:
Count: 11 Time=0.46s (5s) Lock=0.00s (0s) Rows=0.0 (0), msandbox[
update emails set locked_at = now() where locked_at is NULL and id = 611336
Count: 12 Time=0.43s (5s) Lock=0.00s (0s) Rows=0.0 (0), msandbox[
update emails set locked_at = now() where locked_at is NULL and id = 611394
I'm aware this is duplicate of https:/
Related branches
- Oleg Tsarev (community): Approve
- Laurynas Biveinis (community): Approve
-
Diff: 9659 lines (+9474/-7)11 files modifiedPercona-Server/mysql-test/mysql-test-run.pl (+1/-0)
Percona-Server/mysql-test/r/percona_mysqldumpslow.result (+9135/-0)
Percona-Server/mysql-test/r/percona_server_variables_debug.result (+2/-0)
Percona-Server/mysql-test/t/percona_mysqldumpslow.test (+214/-0)
Percona-Server/scripts/mysqldumpslow.sh (+36/-6)
Percona-Server/sql/log.cc (+25/-0)
Percona-Server/sql/log_event.cc (+31/-1)
Percona-Server/sql/log_event.h (+2/-0)
Percona-Server/sql/mysqld.cc (+20/-0)
Percona-Server/sql/set_var.cc (+6/-0)
Percona-Server/sql/sql_class.h (+2/-0)
Changed in percona-server: | |
assignee: | nobody → Oleg Tsarev (tsarev) |
Changed in percona-server: | |
status: | New → Fix Committed |
tags: | added: cr i18580 |
Changed in percona-server: | |
milestone: | none → 5.1.61-13.2 |
tags: | added: slow-extended |
Changed in percona-server: | |
status: | Triaged → Won't Fix |
Based on bug 734211 triage I am setting this to Won't Fix for 5.5+. If a fix for newer versions is desired, please let us know.