Query fingerprint doesn't match example

Description

Impact on the user:

User getting 2 different presentation about the query. this makes vey big confusion and brakes the trust to the tool because "it's obwious bug, so we don't know what query presentation to trust"

STR:

  1. Open QAN

  2. Select the first query:
    SELECT `performance_schema` . `events_waits_summary_global_by_event_name` . `EVENT_NAME` AS `events` , `performance_schema` . `events_waits_summary_global_by_event_name` . `COUNT_STAR` AS `total` , `performance_schema` . `events_waits_summary_global_by_event_name` . `SUM_TIMER_WAIT` AS `total_latency` , `performance_schema` . `events_waits_summary_global_by_event_name` . `AVG_TIMER_WAIT` AS `avg_latency` , `performance_schema` . `events_waits_summary_global_by_event_name` . `MAX_TIMER_WAIT` AS `max_latency` FROM `performance_schema` . `events_waits_summary_global_by_event_name` WHERE ( ( `performance_schema` . `events_waits_summary_global_by_event_name` . `EVENT_NAME` != ? ) AND ( `performance_schema` . `events_waits_summary_global_by_event_name` . `SUM_TIMER_WAIT` > ? ) ) ORDER BY `performance_schema` . `events_waits_summary_global_by_event_name` . `SUM_TIMER_WAIT` DESC

  3. Open Examples tab

Actual result:

select
table_schema,
table_name,
table_type,
ifnull(engine, 'none') as engine,
ifnull(version, '0') as version,
ifnull(row_format, 'none') as row_format,
ifnull(table_rows, '0') as table_rows,
ifnull(data_length, '0') as data_length,
ifnull(index_length, '0') as index_length,
ifnull(data_free, '0') as data_free,
ifnull(create_options, 'none') as create_options
from
information_schema.tables
where
table_schema = 'sys'

Expected result:

Example and fingerprint should not be different

***
Observed only with perfshema
Seems to be affecting only 3 MySQL specific queries:

 

Found the same issue also in PMM1. Same query with perfschema and slowlog - see attachments.

 

DOD:

 - all queries much theirs fingerprints.

 

Suggested fix:

  • Use method to create fingerprint (same as for slowlog) if query example does not much query fingerprint in performance schema

  • The "fix" will slow down our agent

  • There is no trusted bug fix!

  • Problem is on MySQL side

  • Problem exists with some system queries

How to test

None

How to document

None

Attachments

9

Activity

Show:

Sveta Smirnova 
August 13, 2021 at 10:32 PM

as mentioned by in https://jira.percona.com/browse/PMM-5965?focusedCommentId=259988&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-259988 this is know bug: https://bugs.mysql.com/bug.php?id=94925

It is not fixed.

I also do not think this is important: issue happens, because such queries as "SHOW FULL TABLES" are mapped to selects from internal views. So this would affect only queries to Performance, sys, and (possibly) Information schemas. Not to user schemas. PMM can just mention this in the documentation.

Denys Kondratenko 
May 31, 2021 at 11:30 AM

this issue looks like MySQL bug that might be fixed already, do you know abouot such issue ?

Zoriana Stefanyshyn 
May 17, 2021 at 7:46 AM

please assign to appropriate developer

Zoriana Stefanyshyn 
May 11, 2021 at 2:38 PM

Reproduced the issue on the latest PMM and PS MySQL 8.0.22-13 

QUERY_SAMPLE_TEXT differs from DIGEST_TEXT for some of mysql queries.

Roma Novikov 
August 17, 2020 at 8:31 PM

, I can't see the estimation so I don't know.

Will add the "Impact on the user" to the issue to be more clear