Bug #35548 NDB broken multi_range_read implementation in 6.0
Submitted: 25 Mar 2008 12:01 Modified: 2 Jul 2008 18:36
Reporter: Kristian Nielsen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version:6.0 OS:Any
Assigned to: Tomas Ulin CPU Architecture:Any

[25 Mar 2008 12:01] Kristian Nielsen
Description:
In mysql-6.0, there is a new multi_range_read interface.

In this interface, the storage engine must return an opaque pointer to the upper
layer with each row returned. This pointer is associated with the range that gave
rise to the row.

In the NDB implementation, for unsorted scans, rows may be returned in random
order, ie. rows from different ranges may be intermixed. That is fine, but the
returned opaque pointer must still be the one from the correct range to which the
returned row belongs, and NDB fails in this respect.

How to repeat:
No testcase known, but the problem is apparent from the source.

Suggested fix:
Will commit patch
[25 Mar 2008 12:03] Kristian Nielsen
Bug not present prior to mysql-6.0, the bug is in new code introduced in 6.0.
[25 Mar 2008 12:14] 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/44380

ChangeSet@1.2551, 2008-03-25 13:12:28+01:00, knielsen@ymer.(none) +1 -0
  BUG#35548: NDB broken multi_range_read implementation in 6.0
  
  For MRR unordered scans, rows are returned in random order, and custom
  pointer returned to upper layer was not correctly associated with the
  range that each row originated from.
  
  Fixed by storing custom pointers at the start of the MRR buffer in a
  fixed-format array allowing random access to the correct pointer.
[25 Mar 2008 12: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/44383

ChangeSet@1.2551, 2008-03-25 13:50:18+01:00, knielsen@ymer.(none) +1 -0
  BUG#35548: NDB broken multi_range_read implementation in 6.0
  
  For MRR unordered scans, rows are returned in random order, and custom
  pointer returned to upper layer was not correctly associated with the
  range that each row originated from.
  
  Fixed by storing custom pointers at the start of the MRR buffer in a
  fixed-format array allowing random access to the correct pointer.
[25 Mar 2008 15:08] Kristian Nielsen
Pushed to mysql-6.0-ndb.
[31 May 2008 10:45] Jon Stephens
Tomas, can you (or somebody) have a look at this and tell what if anything I need to do about it? Thanks!
[2 Jul 2008 18:36] Jon Stephens
Closed per comment from Tomas above.
[12 Dec 2008 23:25] Bugs System
Pushed into 6.0.6-alpha  (revid:sp1r-knielsen@ymer.(none)-20080325125018-52263) (version source revid:sp1r-tomas@poseidon.ndb.mysql.com-20080516085603-30848) (pib:5)