[MDEV-2552] LP:870046 - Wrong result with index_condition_pushdown + GROUP BY/ORDER BY Created: 2011-10-07 Updated: 2015-02-02 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Philip Stoev (Inactive) | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
This query: SELECT a, MIN(d) when executed with ICP, returns rows that do not match the second, nonindexed part, of the WHERE predicate: -----
-----
----- explain: ---
---
--- bzr version-info minimal switch: index_condition_pushdown=ON test case: DROP TABLE t1; SET SESSION optimizer_switch='index_condition_pushdown=on'; |
| Comments |
| Comment by Philip Stoev (Inactive) [ 2011-10-08 ] |
|
Re: Wrong result with index_condition_pushdown + GROUP BY DROP TABLE IF EXISTS lineitem; DROP TABLE IF EXISTS orders; DROP TABLE IF EXISTS customer; DROP TABLE IF EXISTS supplier; SET SESSION optimizer_switch='index_condition_pushdown=ON'; Note that the EXPLAIN of the query does not include any reference to ICP, and yet the query returns a wrong result. Every use of any optimization, ICP included, must be reflected in EXPLAIN. Otherwise, it is very difficult to test. |
| Comment by Philip Stoev (Inactive) [ 2011-10-10 ] |
|
Re: Wrong result with index_condition_pushdown + GROUP BY/ORDER BY CREATE TABLE lineitem ( l_orderkey int NOT NULL , l_linenumber int NOT NULL , PRIMARY KEY (l_orderkey,l_linenumber)) ; CREATE TABLE orders ( o_orderkey int NOT NULL , o_custkey int, KEY (o_custkey), PRIMARY KEY (o_orderkey)) ; CREATE TABLE customer ( c_custkey int NOT NULL , c_nationkey int, c_acctbal double, KEY (c_nationkey), PRIMARY KEY (c_custkey)) ; CREATE TABLE nation ( n_nationkey int NOT NULL , PRIMARY KEY (n_nationkey)) ; CREATE TABLE supplier ( s_nationkey int, KEY (s_nationkey)) ; SET SESSION optimizer_switch='index_condition_pushdown=ON'; |
| Comment by Rasmus Johansson (Inactive) [ 2011-12-13 ] |
|
Launchpad bug id: 870046 |