Bug #39536 NDBAPI : NdbInterpretedCode add_val() does not work for values > 65535
Submitted: 19 Sep 2008 16:08 Modified: 8 Oct 2008 15:21
Reporter: Frazer Clement
Status: Closed
Category:Server: NDBAPI Severity:S3 (Non-critical)
Version:5.1-telco-6.2 OS:Any
Assigned to: Frazer Clement Target Version:

[19 Sep 2008 16:08] Frazer Clement
Description:
The NdbInterpretedCode add_val() and sub_val() Apis offer to add/subtract an integer
value to/from a numeric column as part of an interpreted update.
If the value to be added is > 65535, the program does not work correctly, it has no
effect.

How to repeat:
Write NdbRecord code with attached interpreted program.

Use add_val() or sub_val() with value > 65535 in program.

Verify that the value was updated in a subsequent read.

Suggested fix:
Correct scoping brackets in immediate-load-width checking code in NdbInterpretedCode.
[29 Sep 2008 13:29] Frazer Clement
Fix required

Attachment: bug39536.patch (text/x-patch), 2.21 KiB.

[29 Sep 2008 20:27] 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/54686
[29 Sep 2008 20:28] 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/54687
[29 Sep 2008 20:32] 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/54689
[29 Sep 2008 21:49] 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/54695
[29 Sep 2008 21:49] 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/54696
[29 Sep 2008 21:52] 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/54697
[5 Oct 2008 19:41] Jon Stephens
Documented bugfix in the 5.1.28-ndb-6.3.18 changelog as follows:

        Passing a value greater than 65535 to NdbInterpretedCode::add_val()
        and NdbInterpretedCode::sub_val() caused these methods to have no
        effect.

Left status unchanged pending merge to NDB-6.2 tree.
[8 Oct 2008 15:03] Jon Stephens
Fix also appears in ndb-6.2.16; now documented in the 6.2.16 changelog.
[13 Dec 2008 0:28] Bugs System
Pushed into 6.0.7-alpha  (revid:frazer@mysql.com-20080929182636-850l3mlsuzmnrkid) (version
source revid:tomas.ulin@sun.com-20081015121427-mqe9vyomt1jroewp) (pib:5)