Bug #32275 Mysqld leaves readonly mode for cluster tables too early
Submitted: 12 Nov 2007 11:42 Modified: 14 Dec 2007 20:51
Reporter: Magnus Blåudd Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:5.1 OS:Any
Assigned to: Magnus Blåudd CPU Architecture:Any

[12 Nov 2007 11:42] Magnus Blåudd
Description:
When mysqld starts the ndbcluster plugin some data structures can't be initialized until after connection to the cluster has occurred. During the period from when connection is available up until those datastructures has been setup, all cluster tables will be readonly. 

This feature works fine when the NDB binlog thread is running. When not running the table will not be opened as readonly even if the datastructures haven't yet been setup.

How to repeat:
.

Suggested fix:
Make cluster tables be initially readonly until all necessary datastructures have been setup.
[23 Nov 2007 12:23] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/38356

ChangeSet@1.2695, 2007-11-23 13:23:57+01:00, msvensson@pilot.mysql.com +3 -0
  Bug#32275 Mysqld leaves readonly mode for cluster tables too early
   - Open tables readonly while not properly initialized
   - Close cached tables when coming out of readonly mode
[4 Dec 2007 17:09] Magnus Blåudd
Pushed to mysql-5.1-telco-6.2
[14 Dec 2007 17:10] Bugs System
Pushed into 6.0.5-alpha
[14 Dec 2007 20:51] 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.

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

Documented bugfix in the 5.1.22-ndb-6.2.10 and 6.0.5 changelogs as follows:

        When a mysqld acting as a cluster SQL node
        starts the NDBCLUSTER storage engine, there
        is a delay during which some necessary data structures cannot be
        initialized until after it has connected to the cluster, and all
        MySQL Cluster tables should be opened as read-only. This worked
        correctly when the NDB binlog thread was
        running, but when it was not running, Cluster tables were not
        opened as read-only even when the data structures had not yet
        been set up.