Bug #54685 Memleak in datanodes during ALTER_TABLE if ndbapi/mysqld disconnect during ALTER
Submitted: 22 Jun 2010 6:38 Modified: 10 Jul 2010 8:49
Reporter: Jonas Oreland Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:mysql-5.1-telco-6.2 OS:Any
Assigned to: Jonas Oreland CPU Architecture:Any

[22 Jun 2010 6:38] Jonas Oreland
Description:
When an alter table is finished,
datanodes will broadcast new table-definition to all attached
ndbapi/mysqld (this is btw legacy-code)

If all ndbapi/mysqld are disconnected when this happens,
the memory for the new table definition is not released.

This can happen if e.g mysql initiate alter,
and is killed just after it sent "commit-alter" to datanodes.

Found by code inspection when working on wl#2342

How to repeat:
.

Suggested fix:
releaseSections()
[22 Jun 2010 7:26] Bugs System
Pushed into 5.1.47-ndb-6.3.35 (revid:jonas@mysql.com-20100622064158-imj2ud187zitn2h2) (version source revid:jonas@mysql.com-20100622064158-imj2ud187zitn2h2) (merge vers: 5.1.47-ndb-6.3.35) (pib:16)
[22 Jun 2010 7:26] Bugs System
Pushed into 5.1.47-ndb-7.0.16 (revid:jonas@mysql.com-20100622072336-vhkruyzh4n2k8bw5) (version source revid:jonas@mysql.com-20100622064334-pbzji713sd2or2pe) (merge vers: 5.1.47-ndb-7.0.16) (pib:16)
[22 Jun 2010 7:28] Jonas Oreland
pushed to 6.2.19, 6.3.35, 7.0.16 and 7.1.5
[23 Jun 2010 13:37] 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/111904

3112 Jonas Oreland	2010-06-22
      ndb - bug#54685 - release memory if no API connected in Qmgr::execAPI_BROADCAST_REP
[10 Jul 2010 8:49] Jon Stephens
DOcumented bugfix in the NDB-6.3.35, 7.0.16, and 7.1.5 changelogs, as follows:

      The disconnection of all API nodes (including SQL nodes) during an 
      ALTER TABLE operation caused a memory leak.

Closed.