mysqldumpslow broken with PS slow log format

Bug #856910 reported by Jervin R on 2011-09-23
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Percona Server
Oleg Tsarev

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:


Sample output with PS slow log format:

Count: 1 Time=0.0000s (0s) Lock=0.0000s (0s) Rows=0.0 (0), msandbox[msandbox]@localhost
  # 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_rec_lock_wait: 0.000000 InnoDB_queue_wait: 0.000000
  # InnoDB_pages_distinct: 121

Sample output with community slow log format:

Count: 11 Time=0.46s (5s) Lock=0.00s (0s) Rows=0.0 (0), msandbox[msandbox]@localhost
  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[msandbox]@localhost
  update emails set locked_at = now() where locked_at is NULL and id = 611394

I'm aware this is duplicate of - but please see Percona internal issue #18580

Related branches

Oleg Tsarev (community): Approve on 2012-01-01
Laurynas Biveinis: Approve on 2011-12-29
Oleg Tsarev (tsarev) on 2011-09-23
Changed in percona-server:
assignee: nobody → Oleg Tsarev (tsarev)
Oleg Tsarev (tsarev) on 2011-12-02
Changed in percona-server:
status: New → Fix Committed
tags: added: cr i18580
Changed in percona-server:
milestone: none → 5.1.61-13.2
Stewart Smith (stewart) on 2012-12-12
tags: added: slow-extended

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.

Changed in percona-server:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers