Bug #18558 | Partition pruning results are incorrect for certain class of WHERE clauses | ||
---|---|---|---|
Submitted: | 27 Mar 2006 22:01 | Modified: | 7 Apr 2006 11:14 |
Reporter: | Sergey Petrunya | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Partitions | Severity: | S3 (Non-critical) |
Version: | 5.2-bk, 5.1.9 | OS: | |
Assigned to: | Sergey Petrunya | CPU Architecture: | Any |
[27 Mar 2006 22:01]
Sergey Petrunya
[31 Mar 2006 10:25]
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/4361
[3 Apr 2006 19:40]
Sergey Petrunya
The following doesn't currently work: create table t10 ( a int) partition by list (MOD(a, 10)) ( partition p0 values in (0), partition p1 values in (1), partition p2 values in (2), partition p3 values in (3), partition p4 values in (4), partition p5 values in (5), partition p6 values in (6), partition pn values in (NULL) ); insert into t10 values (NULL), (0),(1),(2),(3),(4),(5),(6); explain partitions select * from t10 where a is null or a < 2; It will be fixed within the scope of this bug (as it will be easier to do code-wise)
[4 Apr 2006 22:48]
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/4466
[6 Apr 2006 17:17]
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/4572
[6 Apr 2006 18:05]
Sergey Petrunya
The fix has been pushed into 5.1.9 tree. Notes for the changelog: The bug was that for certain kinds of partitioning/subpartitioning and WHERE clauses partition pruning didn't work properly: [sub]partitions that ought to be marked as used weren't. The error showed up as incorrect content in EXPLAIN PARTITIONS output, and missing rows in the query. (The precise definition of affected set of WHERE clauses is rather complicated and hence I don't provide it here)
[7 Apr 2006 11:14]
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 bugfix, yourself. More information about accessing the source trees is available at http://www.mysql.com/doc/en/Installing_source_tree.html Additional info: Documented bugfix in 5.1.9 changelog. Closed.