5.6 slow query log Thead_id becomes Id

Bug #1299387 reported by Kenny Gryp
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Fix Released
Medium
Frank Cizmich

Bug Description

The logging format of the thread id is changed in Percona Server 5.6

# Time: 140328 9:25:23
# User@Host: sbtest[sbtest] @ bench1 [10.116.191.113] Id: 652
# Schema: sbtest Last_errno: 0 Killed: 0
# Query_time: 0.000050 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0 Rows_affected: 0
# Bytes_sent: 11 Tmp_tables: 0 Tmp_disk_tables: 0 Tmp_table_sizes: 0
# 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
# No InnoDB statistics available for this query
SET timestamp=1395998723;
BEGIN;

It's in the line with User@Host, Percona Server 5.5 had a separate Thread_id field. This prevents tools like pt-query-digest and percona-playback from working properly.

See Bug: https://bugs.launchpad.net/percona-server/+bug/1298881

Tags: 5.6

Related branches

Revision history for this message
Kenny Gryp (gryp) wrote :

Attached is a very basic patch:
- it doesn't work on non 56
- renames Id from slow query log to Thread_id (as everything is built to work with this event name)
- SlowLogParser and SlowLogWriter need changes, not only the bin/pt-query-digest

Changed in percona-toolkit:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Frank Cizmich (frank-cizmich)
milestone: none → 2.2.10
Changed in percona-toolkit:
status: In Progress → Fix Committed
Revision history for this message
Frank Cizmich (frank-cizmich) wrote :

Fixed basically using Kenny's approach, but making it backward compatible with 5.5.
I included a patch.
Although the fix committed for 2.2.10 will affect other tools that parse slow logs.

Changed in percona-toolkit:
status: Fix Committed → Fix Released
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-644

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.