Uploaded image for project: 'Percona Server'
  1. Percona Server
  2. PS-1888

LP #856910: mysqldumpslow broken with PS slow log format

    Details

      Description

      **Reported in Launchpad by Jervin R last update 02-03-2016 11:28:57

      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+#\s+Query_time:\s+(\d+\.?\d*)\s+Lock_time:\s+(\d+\.?\d*)\s+Rows_sent:\s+(\d+\.?\d*).*\n//;

      Sample output with PS slow log format:

      Count: 1 Time=0.0000s (0s) Lock=0.0000s (0s) Rows=0.0 (0), msandbox[msandbox]@localhost

      1. Thread_id: 7 Schema: employees Last_errno: 0 Killed: 0
      2. Query_time: 0.259588 Lock_time: 0.046811 Rows_sent: 0 Rows_examined: 0 Rows_affected: 24923 Rows_read: 6
      3. Bytes_sent: 56 Tmp_tables: 0 Tmp_disk_tables: 0 Tmp_table_sizes: 0
      4. InnoDB_trx_id: 3A0
      5. QC_Hit: No Full_scan: No Full_join: No Tmp_table: No Tmp_table_on_disk: No
      6. Filesort: No Filesort_on_disk: No Merge_passes: 0
      7. InnoDB_IO_r_ops: 0 InnoDB_IO_r_bytes: 0 InnoDB_IO_r_wait: 0.000000
      8. InnoDB_rec_lock_wait: 0.000000 InnoDB_queue_wait: 0.000000
      9. 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 https://bugs.launchpad.net/bugs/734211 - but please see Percona internal issue #18580

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                lpjirasync lpjirasync (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: