Bug #43891 NULL bit offset not taken into account
Submitted: 26 Mar 2009 17:16 Modified: 30 Mar 2009 17:17
Reporter: Max Mether 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

[26 Mar 2009 17:16] Max Mether
Description:
If the biggest offset of a RecordSpec for an NdbRecord object is for the null bits (and thus not a column) it will not be taken into account. 

I found this when using the NdbRecord to take over the scan. The null bits and the KeyInfo used the same space. 

How to repeat:
Create a struct with the null bits at the end. 

Create corresponding record specifications and NdbRecord Objects

Use this NdbRecord to take over scans, ie tableScan() with lockCurrentTuple().

Suggested fix:
[27 Mar 2009 16:25] Frazer Clement
Proposed patch, including testcase and some minor compile warning cleanup

Attachment: nullbit.patch (text/x-patch), 5.50 KiB.

[27 Mar 2009 16:30] Frazer Clement
Improved patch with invocation added to daily-basic

Attachment: nullbit.patch (text/x-patch), 5.91 KiB.

[30 Mar 2009 12:04] 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/70792

2892 Frazer Clement	2009-03-30
      Bug#43891 : Null bit offset not taken into account.  Fix, testcase and compile warning cleanup
      modified:
        storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
        storage/ndb/test/ndbapi/testNdbApi.cpp
        storage/ndb/test/run-test/daily-basic-tests.txt
[30 Mar 2009 12:13] Bugs System
Pushed into 5.1.32-ndb-6.3.24 (revid:frazer@mysql.com-20090330120627-l59cteirno23k0sy) (version source revid:frazer@mysql.com-20090330120627-l59cteirno23k0sy) (merge vers: 5.1.32-ndb-6.3.24) (pib:6)
[30 Mar 2009 12:18] Bugs System
Pushed into 5.1.32-ndb-6.2.18 (revid:frazer@mysql.com-20090330120352-cfhadybd2y62acym) (version source revid:frazer@mysql.com-20090330120352-cfhadybd2y62acym) (merge vers: 5.1.32-ndb-6.2.18) (pib:6)
[30 Mar 2009 13:14] Bugs System
Pushed into 5.1.32-ndb-7.0.5 (revid:jonas@mysql.com-20090330131117-3foa8cvm3cb5wcsz) (version source revid:jonas@mysql.com-20090330131117-3foa8cvm3cb5wcsz) (merge vers: 5.1.32-ndb-7.0.5) (pib:6)
[30 Mar 2009 16:52] Jon Stephens
Documented in the NDB-6.2.18, 6.3.24, and 7.0.5 changelogs as follows:

        If the largest offset of a RecordSpec used for an NdbRecord object is
        for the null bits (and thus not a column), this offset was not taken
        into account when calculating the size used for the RecordSpecification.
        This meant that the space for the null bits could be overwritten by key 
        or other information.
[30 Mar 2009 17:17] 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