Bug #35876 NDBAPI : Old Api scan with no bounds incorrectly handled

Submitted: 7 Apr 2008 11:46 Modified: 9 Jul 2008 9:03
Reporter: Frazer Clement Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: NDB API Severity:S3 (Non-critical)
Version:5.1-telco-6.3+ OS:Any
Assigned to: Frazer Clement CPU Architecture:Any

[7 Apr 2008 11:46] Frazer Clement
Description:
When creating an 'old' Api index scan, if no bounds are specified, some work is still done internally creating a bound.
This could have various unwanted side-effects and should be fixed.

How to repeat:
1) Create old Api scan using NdbTransaction::getNdbIndexScanOperation(), NdbIndexScanOperation::readTuples(), NdbIndexScanOperation::getValue() etc, but no calls to NdbIndexScanOperation::setBound()

2a) Call NdbTransaction.execute() and observe flow of control.

or

2b) Call NdbTransaction.execute() and after the scan is finalised, check the value of m_num_bounds.  It should be zero, it will be 1.

Suggested fix:
Pass a NULL IndexBound* to NdbScanOperation::scanIndexImpl() when no bound has been set by an old Api scan

and / or

setBound() should handle the case where no bounds are set within an IndexBound object specifically.
[25 Apr 2008 15:13] 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/46032

ChangeSet@1.2588, 2008-04-25 16:12:47+01:00, frazer@forth.ndb.mysql.com +2 -0
  Bug # 35876 NDBAPI : Old Api scan with no bounds incorrectly handled
  
  Changes :
   - An IndexBound which has neither an upper or lower bound is rejected with new error code
   - For old Api scans, when no bounds are set, we do not pass a bound into the scan.
[28 Apr 2008 16:23] Bugs System
Pushed into 5.1.23-ndb-6.4.0
[28 Apr 2008 16:25] Bugs System
Pushed into 5.1.24-ndb-6.3.13
[28 Apr 2008 16:29] Bugs System
Pushed into 5.1.24-ndb-6.2.14
[9 Jul 2008 9:03] Jon Stephens
Documented bugfix in the 5.1.23-6.2.14 and 5.1.24-ndb-6.3.13 changelogs as follows:

        Scans having no bounds set were handled incorrectly.

Closed.
[12 Dec 2008 23:28] Bugs System
Pushed into 6.0.6-alpha  (revid:sp1r-frazer@forth.ndb.mysql.com-20080425151247-11044) (version source revid:jonas@mysql.com-20080808094047-4e1yiarqa2t3opg3) (pib:5)

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.057 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.