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.