Bug #71294 Manual page for P_S.FILE_INSTANCES table does not explain '~' in FILE_NAME
Submitted: 4 Jan 2014 19:24 Modified: 6 Jan 2014 12:16
Reporter: Valeriy Kravchuk Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.6 OS:Any
Assigned to: CPU Architecture:Any
Tags: file_instances, missing manual, performance_schema

[4 Jan 2014 19:24] Valeriy Kravchuk
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.
[6 Jan 2014 12:16] Umesh Shastry
Hello Valeriy,

Thank you for the bug report.
Verified as described.

Thanks,
Umesh
[24 Jan 2014 16:26] Paul Dubois
Per Marc Alff, the Performance Schema is simply reporting what it gets from runtime. If runtime is reporting nonexistent filenames, that's a server issue.

Recategorizing this as a server bug.