Bug #42107 mysqld does not sync schema objects with ndbd
Submitted: 14 Jan 2009 11:44 Modified: 14 Jan 2009 13:36
Reporter: Gerhard Fürnkranz Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:mysql-5.1-telco-6.3 OS:Solaris (S10/sparc)
Assigned to: CPU Architecture:Any
Tags: 6.4, mysql-5.1-telco-6.3 - >6.3.20

[14 Jan 2009 11:44] Gerhard Fürnkranz
Description:
If all ndbd data nodes are started with --initial option, then oviously mysqld does not sync its copy of the schema object definitions with ndbd. As a consequence, for instance "create table" fails with error message "Table ... already exists", although of course no tables exist in the NDB database after starting all ndbd daemons with --initial option (it's obviously just mysqld who thinks that the previously known schema objects still exist, though they don't). This works neither when mysqld is running at the time when all ndb data nodes are stoped and started with --initial, nor does it work, when mysqld is started or restarted too after starting all ndb deamons with --initial option.

How to repeat:
- have ndb data nodes and mysqld up and running
- "CREATE TABLE xxx ... ENGINE=NDBCLUSTER"
- kill ndbd on all data nodes
- restart all ndbd with --initial option
  ==> database is empty
- "CREATE TABLE xxx ... ENGINE=NDBCLUSTER"
  ==> fails despite NDB database is empty now
[14 Jan 2009 12:29] Tomas Ulin
current workaround is to either restart the mysqld, or to issue show tables in the database

BR,

Tomas
[14 Jan 2009 13:37] Tomas Ulin
patch that fixes this

Attachment: bug42107.patch (text/x-diff), 991 bytes.

[30 Jan 2009 14:30] Andrew Hutchings
With 6.3.20 restarting mysqld does not work as a workaround, only issuing SHOW TABLES.