[DOC] Manual for pt-query-digest --type binlog is ambiguous

Bug #1377888 reported by Przemek
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Fix Released
Frank Cizmich

Bug Description

The manual suggests that the pt-query-digest is able to parse a raw binary log file, while it can only parse a file which was decoded with mysqlbinlog tool before.

Moreover, the tool does not write any errors when we try to parse raw binlog:

pt-query-digest --type binlog master/data/mysql-bin.000003

# 290ms user time, 10ms system time, 33.70M rss, 228.73M vsz
# Current date: Mon Oct 6 13:17:59 2014
# Hostname: pmlap
# Files: master/data/mysql-bin.000003
# Overall: 0 total, 1 unique, 0 QPS, 0x concurrency ______________________
# Time range: unknown
# Attribute total min max avg 95% stddev median
# ============ ======= ======= ======= ======= ======= ======= =======
# Query size 1.12k 1.12k 1.12k 1.12k 1.12k 0 1.12k

# Profile
# Rank Query ID Response time Calls R/Call V/M Item
# =========== =========== =========== =========== =========== ===== ======

In PTDEBUG=1 we can see:

# Pipeline:11527 28350 Pipeline process BinaryLogParser
\ogParser:9635 28350 �bin�s2Ttx5.6.21-log�s2T8
# BinaryLogParser:9687 28350 Got the query/arg line at pos 109
# BinaryLogParser:9708 28350 It's not a query/arg, it's just some SQL fluff
# BinaryLogParser:9743 28350 Properties of event: $VAR1 = [
# 'pos_in_log',
# 0,
# 'cmd',
# 'Query',
# 'ts',
# undef,
# 'arg',
# �
                           testDROP TABLE `test`.`t1` /* generated by server */��n��s2T~l!@std!!
                                                                                                         testcreate table test.t1 (id int auto_increment primary key)��[��s2TD�@std!BEGIN��+t�s2T-�Ftestt1*�!^�s2T
# 'bytes',
# 1147
# ];

No clear errors though.

Related branches

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

Changed the docs, and now the tool also checks if the file is binary, providing a relevant error message.

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-660

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

Other bug subscribers