Description:
System view sys.x$ps_schema_table_statistics_io will be invalid when statistics tables with special characters. This is because the view takes `FILE_NAME` of table performance_schema.file_summary_by_instance as table_name. However, for table whicn table name has special characters, file name and table name are inconsistent and have been converted. This will lead to sys.x$ps_schema_table_statistics_io invalid when statistics tables with special characters.
How to repeat:
1.prepare data:
mysql> create database testdb;
Query OK, 1 row affected (0.01 sec)
mysql> use testdb;
Database changed
mysql> create table `t`(id int not null);
Query OK, 0 rows affected (0.61 sec)
mysql> create table `t#`(id int not null);
Query OK, 0 rows affected (0.66 sec)
2.When the table name does not contain special characters:
mysql> select * from `sys`.`x$ps_schema_table_statistics_io` where table_name = 't'\G
*************************** 1. row ***************************
table_schema: testdb
table_name: t
count_read: 0
sum_number_of_bytes_read: 0
sum_timer_read: 0
count_write: 7
sum_number_of_bytes_write: 212992
sum_timer_write: 1088754668
count_misc: 6
sum_timer_misc: 1015060064
1 row in set (0.07 sec)
3.When the table name contain special characters:
mysql> select * from `sys`.`x$ps_schema_table_statistics_io` where table_name = 't#'\G
Empty set (0.07 sec)