Bug #74863 ndbinfo namespace free check failure
Submitted: 14 Nov 2014 10:40 Modified: 26 Nov 2014 12:49
Reporter: Magnus Blåudd Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:7.1.34 OS:Any
Assigned to: CPU Architecture:Any

[14 Nov 2014 10:40] Magnus Blåudd
Description:
The SQL script which creates and upgrades the ndbinfo database, tables and views are in scripts/mysql_system_tables.sql. The script
is run as part of mysql_install_db and mysql_upgrade.

The script detects different preconditions to deterine if the ndbinfo objects should be created or not. For example the mysqld must have been compiled with ndbinfo handler, the version must be >= 7.1 and also the "ndbinfo namespace" must be free.

The above mention "ndbinfo namespace" check is now failing. This causes the ndbinfo objects not to be upgrade properly. The "ndbinfo namespace" check is intended to avoid dropping any user data tables potentially created in the ndbinfo database.

The problem started when two MyISAM "lookup" tables named ndb$dblqh_tcconnect_state and ndb$dbtc_apiconnect_state was added to the ndbinfo database.

How to repeat:
Run mysql_upgrade on a mysqld with already existing ndbinfo database, the objects will not be upgraded. Intention is that everything should be recreate§d.

Suggested fix:
Remove the "ndbinfo namespace" check or rewrite it to be slighlyt more relaxed and not detect the two MyISAM lookup tables as "user tables".
[26 Nov 2014 12:49] Jon Stephens
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.

Fixed in the 5.7 tree. As this does not involve any current MySQL Cluster releases, there is nothing to be added to the changelog at this time.

Closed without further action.

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
[23 Dec 2014 13:01] Jon Stephens
Pushed to the 7.3 and 7.4 trees. Fix documented in the NDB 7.3.8 and 7.4.3 changelogs as follows:

    When running mysql_upgrade, the ndbinfo database and its tables
    were dropped as expected, but were not properly recreated.

Closed.
[12 Jan 2015 16:47] Jon Stephens
Updated changelog entry with info from developers; this now reads as follows:

        mysql_upgrade failed to drop and recreate the
        ndbinfo database and its tables as expected.
      
No other changes.