Bug #19109 CREATE TABLE on NDB is not propagated to a SQL node if the node is down
Submitted: 14 Apr 2006 22:37 Modified: 18 Apr 2006 16:26
Reporter: Ivan Zoratti Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:5.1.7 OS:Linux (Linux RH EL 4)
Assigned to: CPU Architecture:Any

[14 Apr 2006 22:37] Ivan Zoratti
Description:
Considering a cluster like:
- 2 Data Nodes (D1, D2)
- 2 SQL Nodes (S1, S2)
- 1 Management Node (M1)

If I create a new table with ENGINE=NDB on S1 while S2 is down, when I restart S2, this node cannot get access to any table in the cluster.

The only way to update the data dictionary on S2 si to restart the cluster completely. This is not acceptable by a customer who requires 99.999% HA.

How to repeat:
1. All node in the cluster must be up and running
2. Create the table t1 on S1 with ENGINE=NDB. Table t1 will be available on S2 as well, as Cluster usually works.
3. Stop S2
4. Create the table t2 with ENGINE=NDB on S1
5. Start S2
6. Try to access to t1 or t2 from S2 - none of the tables are available
7. If you shutdown the cluster and S1 and S2, then restart everything, t1 and t2 are available on S1 and S2

Suggested fix:
[15 Apr 2006 1:24] Hartmut Holzgraefe
This sounds more as if the api node was not able to connect to the cluster at all,
have you checked with ndb_mgm that it was actually connected?
[17 Apr 2006 10:56] Jonathan Miller
Actually you do not need to restart the cluster to have the down MySQLD (S2) discover the new database.

So on the MySQLD (S1) that is up you create database MyStuff with tables t1, and t2.

Once you bring up S2 you need to do the following.
1) CREATE DATABASE MyStuff; on the S2 process
2) SHOW TABLES; boom! S2 now knows all about MyStuff database.

Thanks!
[17 Apr 2006 23:39] Jon Stephens
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.mysql.com/documentation/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Additional info:

This is already documented in http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster-limitations.html:

"...autodiscovery of tables is supported... ...after a database named db_name is created or imported using one MySQL server, you should issue a CREATE DATABASE db_name  statement on each additional MySQL server that accesses the same MySQL Cluster. ... Once this has been done for a given MySQL server, that server should be able to detect the database tables without error."