Bug #54552 ndbinfo missing although activated after online upgrade
Submitted: 16 Jun 2010 14:35 Modified: 3 Aug 2010 11:37
Reporter: Mario Beck Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster Manager: CLI Severity:S3 (Non-critical)
Version:1.0 OS:Solaris (SPARC/64)
Assigned to: Dyre Tjeldvoll CPU Architecture:Any
Tags: mysql-upgrade, ndbinfo, online upgrade

[16 Jun 2010 14:35] Mario Beck
Description:
Although running version 7.1.3 there is no database ndbinfo.
I suspect this is due to the fact, that I came from 7.0.13 via online upgrade.

How to repeat:
I installed Cluster 7.0.13 with Cluster Manager 1.0.
Then I did an online upgrade to 7.1.3.
After that see the following session tee:

mysql> select version();
+------------------------------+
| version()                    |
+------------------------------+
| 5.1.44-ndb-7.1.3-cluster-gpl |
+------------------------------+
1 row in set (0.00 sec)

mysql> show plugins;
+------------+----------+----------------+---------+---------+
| Name       | Status   | Type           | Library | License |
+------------+----------+----------------+---------+---------+
| binlog     | ACTIVE   | STORAGE ENGINE | NULL    | GPL     |
... <cut some lines>
| ndbcluster | ACTIVE   | STORAGE ENGINE | NULL    | GPL     |
| ndbinfo    | ACTIVE   | STORAGE ENGINE | NULL    | GPL     |
+------------+----------+----------------+---------+---------+
12 rows in set (0.00 sec)

mysql> show engines;
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine     | Support | Comment                                                        | Transactions | XA   | Savepoints |
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
| ndbcluster | YES     | Clustered, fault-tolerant tables                               | YES          | NO   | NO         |
| MRG_MYISAM | YES     | Collection of identical MyISAM tables                          | NO           | NO   | NO         |
| ndbinfo    | YES     | MySQL Cluster system information storage engine                | NO           | NO   | NO         |
... <cut some lines>
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
10 rows in set (0.00 sec)

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mariosdata         |
| mysql              |
| tmp                |
+--------------------+
4 rows in set (0.00 sec)
[16 Jun 2010 15:32] Magnus BlÄudd
The missing thing is that the ndbinfo database, tables and views in mysqld datadir has not been created. Run mysql_upgrade once for each mysqld.

If that does not work, there is a ndbinfo.sql file which can be run to create the objects.
[16 Jun 2010 18:07] Sveta Smirnova
Thank you for the report.

Please do what Magnus suggested: run mysql_upgrade for each mysqld and inform us if problem still exists.
[16 Jun 2010 18:15] Mario Beck
Running mysql_upgrade was the missing key. Thanks.
So I moved the bug to category Cluster Manager CLI.
If I upgrade the cluster with
upgrade cluster --package=7.1.3 the binaries are exchanged but necessary upgrade scripts are not called automatically. 
Either the mysql_upgrade script must be called for every sql node during the rolling restart
or at least the documentation must reflect, that the user has to run these scripts on his own.
I prefer starting the script automatically during the upgrade as this is part of the upgrade procedure.
[16 Jun 2010 19:07] Sveta Smirnova
Thank you for the feedback.

Set to "Verified", although this is more likely documentation problem as http://dev.mysql.com/doc/mysql-cluster-manager/1.0/en/mcm-upgrade-cluster.html does not mention necessity to run mysql_upgrade.
[17 Jun 2010 4:18] Jon Stephens
I *seem* to recall being told (but am not 100% certain) that the intention was for MCM to handle upgrades silently without any need for user intervention.

If this impression is in error, please change category to Docs and assign to me.

Corrected Lead.