I’m running into a potential issue with pt-query-digest and MySQL 5.7. When I run pt-query-digest on the MySQL slow query log, one of the fields (Time range) is missing (see below):
# 450ms user time, 50ms system time, 17.58M rss, 23.87M vsz
# Current date: Fri Jun 3 11:20:24 2016
# Hostname: host
# Files: mysqld-slow.log
# Overall: 1.15k total, 10 unique, 0 QPS, 0x concurrency _________________
....
Compared to:
# 1.9s user time, 20ms system time, 18.88M rss, 25.03M vsz
# Current date: Fri Jun 3 11:21:45 2016
# Hostname: host
# Files: mysqld-slow.log
# Overall: 9.37k total, 116 unique, 0.00 QPS, 0.01x concurrency __________
# Time range: 2016-01-20 21:59:01 to 2016-05-23 00:43:39
....
May 23rd was the date when I stopped using MySQL 5.6 and started using 5.7.
Is the missing Time range field a bug in pt-query-digest, or is it a reflection of the fact that MySQL 5.7’s default timestamp in the slow query log has changed from YYMMDD to YYYY-MM-DD?