Bug #34930 NdbRecord object not valid between cluster connections
Submitted: 28 Feb 2008 15:26 Modified: 15 Jun 2008 17:56
Reporter: Frazer Clement
Status: Analyzing
Category:Server: NDBAPI Severity:S3 (Non-critical)
Version:mysql-5.1-telco-6.2 OS:Any
Assigned to: Gustaf Thorslund Target Version:
Triage: D4 (Minor)

[28 Feb 2008 15:26] Frazer Clement
Description:
An NdbRecord design goal is for an NdbRecord object to be reusable between threads and at
any time until the user is finished with it.
The current NdbRecord implementation embeds an NdbTableImpl*, which points to data which
is not independent of the ndb_cluster_connection it was created using.
This means that users must discard/rebuild their NdbRecord objects when deleting an
ndb_cluster_connection, which is not documented anywhere.

How to repeat:
Create cluster connection.
Connect to cluster.
Create table.
Obtain default NdbRecord from table object,
Use for PK access.

delete cluster connection.
Create cluster connection.
Connect to cluster.
Attempt to use NdbRecord from above for PK access.

Suggested fix:
NdbRecord should be changed to be truly independent of any ndb_cluster_connection, or
subtended object.