Bug #72644 AutoTest regression caused by new system tables added by index statistics
Submitted: 14 May 2014 9:13 Modified: 20 Jun 2014 15:25
Reporter: Ole John Aske Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:7.3.6 OS:Any
Assigned to: CPU Architecture:Any

[14 May 2014 9:13] Ole John Aske
Description:
Autotest \'testDict -n SchemaTrans\' fails due
to two new system tables which was added by the
\'new\' index statistics ~2 years ago.

These tables are incorrectly assumed to be 
user defined tables instead of system tables
as they doesn\'t seem to follow the normal
\'rules\' of how system tables should be annotated.

Paste from a mail describing the problem:

..........

The above test performs dictionary operations through
our API and validates that the dictionary content is
as expected after the operation has commited or aborted.
Any dictionary objects it didn\'t create itself are
intended to be ignored by by the test.

Currently this test terminates rather early as it
unexpectedly finds the \'sys.ndb_index_stat_sample_x1\'
which is registered as an \'OrderedIndex\' which is
interpreted as a non-ignorable table.
I assume this table was added by Pekka as part of the
new index statistics, and testDict was never updated to
reflect this change.

Some interesting findings / questions I need help
to resolve.

 - All dictionary objects of type \'SystemTable\' are ignored.
   I find at least the tables \'sys.NDB$EVENTS_0\',
   \'sys.SYSTAB_0\' having this type. However,
   \'sys.ndb_index_stat_sample_x1\' is an \'OrderedIndex\'
   which is assumed to be an user created table, and thus
   not ignored.

 - There are other \'ndb_index_stat_*\' dictionary objects
   but these are created in the \'mysql\' instead of \'sys\' directory.
   (mysql.ndb_index_stat_sample, mysql.ndb_index_stat_head)
   All these \'mysql\' dictionary objects are assumed to be
   owned by mysqld server, and thus ignored.

 - \'sys.ndb_index_stat_sample_x1\' is an index on the table
   \'mysql.ndb_index_stat_sample\' - I find it strange that
   the index is placed in another directory than the table.

Fixing any of the anomalies I have listed above would make
this problem go away.

I could also easily add a rule which ignores any tables
in the \'sys\' directory as a workaround. 

............

After this mail was written, it was discovered that 
the table \'NDB$INDEX_6_CUSTOM\' was also added by
the statistics, and caused similar problems.

How to repeat:
testDict -n SchemaTrans

Suggested fix:
Reconsider how these two tables are annotated:
They should follow the same rules as other system tables.
[14 May 2014 10:26] Ole John Aske
Posted by developer:
 
The issue described in this bug report is only reproducible 
if mysqld is started prior to running testDict.
[20 Jun 2014 15:25] Jon Stephens
Development/testing only. Closed without further action.

Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html