pt-query-digest show wrong database name for queries from information_schema

42 views
Skip to first unread message

g...@ideil.com

unread,
Dec 9, 2017, 4:10:04 PM12/9/17
to Percona Discussion
Hello, All!

pt-query-digest 3.0.5 show wrong database in report if I do select from information_schema database.

real database is information_schema, but pt-query-digest show in report database name prod_shop_ozz

How I can fix or workaround this bug?

detailed report:

# Query 12: 0.00 QPS, 0.00x concurrency, ID 0x0186C519C171D331 at byte 20807165
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.02
# Time range: 2017-12-09T11:02:24 to 2017-12-09T22:38:34
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count          0       9
# Exec time      0   545ms    37ms   155ms    61ms   148ms    32ms    48ms
# Lock time      0   762us    73us   112us    84us   108us    10us    76us
# Rows sent      0     189      21      21      21      21       0      21
# Rows examine   0  11.24k   1.25k   1.25k   1.25k   1.25k       0   1.25k
# Rows affecte   0       0       0       0       0       0       0       0
# Bytes sent     0   6.73k     766     766     766     766       0     766
# Merge passes   0       0       0       0       0       0       0       0
# Tmp tables     2      18       2       2       2       2       0       2
# Tmp disk tbl   0       0       0       0       0       0       0       0
# Tmp tbl size  89  71.97M   8.00M   8.00M   8.00M   8.00M       0   8.00M
# Query size     0   2.77k     315     315     315     315       0     315
# Boolean:
# Filesort     100% yes,   0% no
# Full scan    100% yes,   0% no
# Tmp table    100% yes,   0% no
# String:
# Databases    prod_shop_ozz
# Hosts        172.22.22.114
# Users        root
# Query_time distribution
#   1us
#  10us
# 100us
#   1ms
#  10ms  ################################################################
# 100ms  ########
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS FROM `information_schema` LIKE 'TABLES'\G
#    SHOW CREATE TABLE `information_schema`.`TABLES`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT table_schema AS "database", SUM(data_length + index_length) AS "size"
                FROM information_schema.TABLES
                WHERE TABLE_SCHEMA NOT IN('mysql', 'sys', 'information_schema', 'performance_schema', 'phpmyadmin')
                GROUP BY table_schema
                ORDER BY size DESC\G

carlos....@percona.com

unread,
Dec 11, 2017, 10:41:35 AM12/11/17
to Percona Discussion
Hi, 

I've created this issue to fix the error: https://jira.percona.com/browse/PT-232
Reply all
Reply to author
Forward
0 new messages