Bug #79934 i_perfschema.table_leak random result failure
Submitted: 12 Jan 2016 10:48 Modified: 17 Feb 2016 8:19
Reporter: Magnus Blåudd Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Performance Schema Severity:S3 (Non-critical)
Version:5.7.11 OS:Any
Assigned to: CPU Architecture:Any

[12 Jan 2016 10:48] Magnus Blåudd
The test i_prefschema.table_leak fails randomly in 5.7, this can be seen in PB2.

The test verifies that a failed create table does not leave any traces in performance schema but apparently something else leaves something there.

Failure analysis of the test shows it as failed regularly in 5.7:

Not been able to reproduce locally. Could depend on test case ordering.

How to repeat:
i_perfschema.table_leak                  w2 [ fail ]
Test ended at 2016-01-12 00:26:08 CURRENT_TEST: i_perfschema.table_leak --- /export/home/pb2/test/sb_2-17578326-1452549033.07/mysql-advanced-5.7.12-solaris11-sparc-64bit/internal/mysql-test/suite/i_perfschema/r/table_leak.result Mon Jan 11 17:22:12 2016
+++ /tmp/mtr-18971/var-n_mix/2/log/table_leak.reject	Tue Jan 12 02:26:07 2016
@@ -12,6 +12,7 @@ from performance_schema.table_io_waits_summary_by_table where object_schema="test"; OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME
+TABLE	test	#sql_1
select OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME, INDEX_NAME from performance_schema.table_io_waits_summary_by_index_usage where object_schema="test";

Suggested fix:
Suspicion is that some previous test creates (or fails to create) a temp table which is then not unregistered from performance_schema. Checked the bug report which the test is for and it's testing one such use case, suspect there might be more.

Could also be some background processing in the msyqld who creates a temp table and thus the test should not SELECT tables with temporary names
[17 Feb 2016 8:19] Erlend Dahl
[29 Jan 2016 9:10] Paul Dubois (PDUBOIS)

Noted in 5.6.30, 5.7.12, 5.8.0 changelogs.

The Performance Schema assumed that tables named using a #sql prefix
were temporary and could be ignored. But it is possible to create
nontemporary tables using that prefix. The Performance Schema now
uses table attributes other than the name to identify temporary