Description:
mysql> select * from performance_schema.file_instances where event_name like '%parse%';
+----------------------------+------------------------------+------------+
| FILE_NAME | EVENT_NAME | OPEN_COUNT |
+----------------------------+------------------------------+------------+
| /var/lib/mysql/test/ti.TRG | wait/io/file/sql/file_parser | 0 |
+----------------------------+------------------------------+------------+
1 row in set (0,00 sec)
mysql> create view v2 as select * from ti;
Query OK, 0 rows affected (0,04 sec)
mysql> select * from performance_schema.file_instances where event_name like '%parse%';
+-----------------------------+------------------------------+------------+
| FILE_NAME | EVENT_NAME | OPEN_COUNT |
+-----------------------------+------------------------------+------------+
| /var/lib/mysql/test/ti.TRG | wait/io/file/sql/file_parser | 0 |
| /var/lib/mysql/test/v2.frm~ | wait/io/file/sql/file_parser | 0 |
+-----------------------------+------------------------------+------------+
2 rows in set (0,00 sec)
How to repeat:
mysql> create view v2 as select * from ti;
Query OK, 0 rows affected (0,04 sec)
mysql> select * from performance_schema.file_instances where event_name like '%parse%';
+-----------------------------+------------------------------+------------+
| FILE_NAME | EVENT_NAME | OPEN_COUNT |
+-----------------------------+------------------------------+------------+
| /var/lib/mysql/test/ti.TRG | wait/io/file/sql/file_parser | 0 |
| /var/lib/mysql/test/v2.frm~ | wait/io/file/sql/file_parser | 0 |
+-----------------------------+------------------------------+------------+
2 rows in set (0,00 sec)
Now, what does that name with ~ at the end:
/var/lib/mysql/test/v2.frm~
means? I surely do not have file with this name in the database directory, just v2.frm just created for a new view.
Suggested fix:
Explain in details what kinds of files we may see in this table and what '~' at the end of the file name means.