Bug #4450 create/drop table not propagated
Submitted: 8 Jul 2004 2:08 Modified: 5 Oct 2004 11:07
Reporter: Devananda v Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:4.1.3 OS:Linux (Mandrake 9.2)
Assigned to: Magnus Blåudd CPU Architecture:Any

[8 Jul 2004 2:08] Devananda v
Description:
When I create or drop tables, the API node that didn't originate the query is unaware of the change until its mysqld process is restarted.

How to repeat:
I have a cluster with 1 MGM, 2 DB, 2 API nodes all on separate identical machines (mandrake 9.2, 1G ram).

I start the MGM node and the 2 DB nodes and verify via
NDB> all status
that both DB nodes are started successfully. Then I launch both API nodes (a1 and a2)  via
mysqld_safe --ndbcluster --user=mysql &
and launch the mysql client. At the prompt on a1, select database and create a simple table, then 'show tables' and it is there. However, when I then do a 'show tables' on a2, it is not there. Exit the mysql client and shutdown then startup mysqld on a2, launch mysql client, 'show tables', and it is there.

I've tested this also with 'drop table', and with running the create/drop query on a2 and checking on a1. Same result, I had to restart mysqld on which ever server did not originate the create / drop query.
[8 Jul 2004 2:09] Devananda v
(misspelled propagated)
[8 Jul 2004 7:14] Jonas Oreland
Is it not sufficient to do a "select * from T" and the table will (dis)appear on the second
mysql server?
[8 Jul 2004 8:58] Martin Skold
NDB Cluster stores meta-data in the database, in contrast to
the MySQL instance that stores it on the local file system.
When an unknown table is specifically referenced in a query
there is a discovery function that queries the cluster and copies
meta-data to the querying MySQL instance. 

SHOW TABLES currently does not ask the cluster, this is a known
shortcoming/fault, and it is planned to be fixed later.
Also the creation of new databases is currently also not propagated
between MySQL instances.
[5 Oct 2004 11:07] Magnus Blåudd
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 bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html