Details
-
Bug
-
Status: Open
-
Medium
-
Resolution: Unresolved
-
2.27.0, 2.28.0
-
None
-
3
-
Yes
-
Yes
-
Yes
-
Observability
Description
User Story
As a user when I set non-default values for performance schema QAN gets crazy and show enormous values instead of correct ones.
How to Repeat.
- Increase value for performance_schema_events_statements_history_long_size and performance_schema_digests_size in performance schema system variables to 20000 https://dev.mysql.com/doc/refman/5.7/en/performance-schema-system-variables.html
-- create 20K tables for i in `seq 1 1 20000`; do mysql PMM_10044 -e "CREATE TABLE t_$i(t_${i}_1 int, t_${i}_2 int, t_${i}_3 int, t_${i}_4 int, t_${i}_5 int, t_${i}_6 int, t_${i}_7 int, t_${i}_8 int, t_${i}_9 int, t_${i}_10 int) engine=innodb; insert into t_$i values(rand()*20000, rand()*20000, rand()*20000, rand()*20000, rand()*20000, rand()*20000, rand()*20000, rand()*20000, rand()*20000, rand()*20000);"; done -- query them for i in `seq 1 1 20000`; do for j in `seq 1 1 10`; do mysql PMM_10044 -e "SELECT t_${i}_${j} from t_${i}" > /dev/null; done; done
This script creates 20K tables, inserts one row into each of them, then queries each table 10 times. As you notice each query runs only once. However, QAN reports random big numbers for random queries (see attached screenshots):
Suggested implementation
Set cache size according to the value from performance schema system variables.