Bug #43590 NDBAPI : Default NdbRecords can overlap null bits and data
Submitted: 12 Mar 2009 11:59 Modified: 17 Mar 2009 19:57
Reporter: Frazer Clement Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: NDB API Severity:S3 (Non-critical)
Version:6.2 OS:Any
Assigned to: Frazer Clement CPU Architecture:Any

[12 Mar 2009 11:59] Frazer Clement
Description:
Default NdbRecord structures created by the Ndb Dictionary can have overlapping null bits and data fields.
This should be corrected so that it cannot happen

How to repeat:
Examine the default NdbRecord for Hugo tables T6 and T15.

Suggested fix:
Avoid overlap.
Add validation at createRecord() time to ensure no overlap.
[13 Mar 2009 0:16] 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/69085

2868 Frazer Clement	2009-03-13
      Bug#43590 NDBAPI : Default NdbRecords can overlap null bits and data
      
      Fix to default NdbRecord creation code to :
        - avoid issue with null bits and data overlapping.
        - avoid issue with Nullability of columns in indices.
      
      Fix includes new validation in NdbDictionary::createRecord() to check there's
      no overlap between the specified null bits and data fields.
      
      New validation in turn required NdbRecord definition changes to :
       - testBlobs
       - DbAsyncGenerator
      modified:
        storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
        storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp
        storage/ndb/src/ndbapi/ndberror.c
        storage/ndb/test/ndbapi/bench/mainAsyncGenerator.cpp
        storage/ndb/test/ndbapi/bench/ndb_async2.cpp
        storage/ndb/test/ndbapi/bench/testData.h
        storage/ndb/test/ndbapi/testBlobs.cpp
[16 Mar 2009 23:50] 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/69365

2878 Frazer Clement	2009-03-16
      Bug#43590 NDBAPI : Default NdbRecords can overlap null bits and data
      
      Fix to default NdbRecord creation code to :
        - avoid issue with null bits and data overlapping.
        - avoid issue with Nullability of columns in indices.
      
      Fix includes new validation in NdbDictionary::createRecord() to check there's
      no overlap between the specified null bits and data fields.
      
      New validation in turn required NdbRecord definition changes to :
       - testBlobs
       - DbAsyncGenerator
      modified:
        storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
        storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp
        storage/ndb/src/ndbapi/ndberror.c
        storage/ndb/test/ndbapi/bench/mainAsyncGenerator.cpp
        storage/ndb/test/ndbapi/bench/ndb_async2.cpp
        storage/ndb/test/ndbapi/bench/testData.h
        storage/ndb/test/ndbapi/testBlobs.cpp
[17 Mar 2009 0:25] Bugs System
Pushed into 5.1.32-ndb-7.0.4 (revid:frazer@mysql.com-20090317001816-11b81l29ma5much9) (version source revid:frazer@mysql.com-20090317001816-11b81l29ma5much9) (merge vers: 5.1.32-ndb-7.0.4) (pib:6)
[17 Mar 2009 0:25] Bugs System
Pushed into 5.1.32-ndb-6.3.24 (revid:frazer@mysql.com-20090317000251-ybje9nyed701v3ls) (version source revid:frazer@mysql.com-20090317000251-ybje9nyed701v3ls) (merge vers: 5.1.32-ndb-6.3.24) (pib:6)
[17 Mar 2009 0:26] Bugs System
Pushed into 5.1.32-ndb-6.2.18 (revid:frazer@mysql.com-20090316234957-ncfzg4241tss0rdn) (version source revid:frazer@mysql.com-20090316234957-ncfzg4241tss0rdn) (merge vers: 5.1.32-ndb-6.2.18) (pib:6)
[17 Mar 2009 15:45] 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/69448

2881 Frazer Clement	2009-03-17
      bug#43590 NDBAPI: Default NdbRecords can overlap null bits and data.  Fix issue with small packed bitfields, shown up on sol10-amd64
      modified:
        storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
[17 Mar 2009 15:50] Bugs System
Pushed into 5.1.32-ndb-7.0.4 (revid:frazer@mysql.com-20090317154837-nlcrqwndvx5yumyy) (version source revid:frazer@mysql.com-20090317154837-nlcrqwndvx5yumyy) (merge vers: 5.1.32-ndb-7.0.4) (pib:6)
[17 Mar 2009 15:50] Bugs System
Pushed into 5.1.32-ndb-6.2.18 (revid:frazer@mysql.com-20090317154505-vrhnhahq18vu348f) (version source revid:frazer@mysql.com-20090317154505-vrhnhahq18vu348f) (merge vers: 5.1.32-ndb-6.2.18) (pib:6)
[17 Mar 2009 15:51] Bugs System
Pushed into 5.1.32-ndb-6.3.24 (revid:frazer@mysql.com-20090317154608-dzr058qbq3c2e2e6) (version source revid:frazer@mysql.com-20090317154608-dzr058qbq3c2e2e6) (merge vers: 5.1.32-ndb-6.3.24) (pib:6)
[17 Mar 2009 19:57] Jon Stephens
Documented in the NDB-6.2.18, 6.3.24, and 7.0.4 changelogs as follows:

        The default NdbRecord structures created by NdbDictionary 
        could have overlapping null bits and data fields.