Bug #57396 | Got error 4259 'Invalid set of range scan bounds' from NDBCLUSTER | ||
---|---|---|---|
Submitted: | 12 Oct 2010 8:27 | Modified: | 17 Oct 2010 8:13 |
Reporter: | Ole John Aske | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Cluster: Cluster (NDB) storage engine | Severity: | S3 (Non-critical) |
Version: | 5.1.47-ndb-7.1.9 | OS: | Any |
Assigned to: | Pekka Nousiainen | CPU Architecture: | Any |
[12 Oct 2010 8:27]
Ole John Aske
[13 Oct 2010 17:38]
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/120715 3295 Pekka Nousiainen 2010-10-13 bug#57396 a01_patch.diff MRR empty range sets wrong index attr id
[13 Oct 2010 18:36]
Bugs System
Pushed into mysql-5.1-telco-7.0 5.1.47-ndb-7.0.20 (revid:pekka@mysql.com-20101013181004-1s1fhfeirf6f41h5) (version source revid:pekka@mysql.com-20101013181004-1s1fhfeirf6f41h5) (merge vers: 5.1.47-ndb-7.0.20) (pib:21)
[13 Oct 2010 18:40]
Bugs System
Pushed into mysql-5.1-telco-6.3 5.1.47-ndb-6.3.39 (revid:pekka@mysql.com-20101013173652-pb0atp15tst1qd4q) (version source revid:pekka@mysql.com-20101013173652-pb0atp15tst1qd4q) (merge vers: 5.1.47-ndb-6.3.39) (pib:21)
[14 Oct 2010 9:21]
Pekka Nousiainen
This is what happened: - optimizer creates index scan with no bounds - scan goes via MRR (as always nowadays?) - Ndb needs to piggy-back range no on the bound - so a bound "NULL LE attr0" (always true) is added - but insert_open_bound() sets wrong attr id
[15 Oct 2010 11:53]
Jonas Oreland
pushed to 6.3.39, 7.0.20 and 7.1.9
[17 Oct 2010 8:13]
Jon Stephens
Documented as follows in the NDB-6.3.39, 7.0.20, and 7.1.9 changelogs: Specifying a WHERE clause of the form range1 OR range2 when selecting from an NDB table having a primary key on multiple columns could result in error 4259 Invalid set of range scan bounds if range2 started exactly where range1 ended and the primary key definition declared the columns in a different order relative to the order in the table's column list. *Example*: Suppose t is an NDB table defined by the following CREATE TABLE statement: CREATE TABLE t (a, b, PRIMARY KEY (b, a)) ENGINE NDB; This issue could then be triggered by a query such as this one: SELECT * FROM t WHERE b < 8 OR b >= 8; Closed.