Wrong result with aggregate + two-column subselect
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
High
|
Igor Babaev |
Bug Description
This query:
SELECT MAX( f1 ) FROM t1 WHERE ( 5 , 9 ) IN ( SELECT 3 , 5 );
returns no rows even though it should return NULL (the where clause is false).
Repeatable in maria-5.
explain:
| 1 | PRIMARY | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | Select tables optimized away |
| 2 | DEPENDENT SUBQUERY | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | No tables used |
explain extended:
select max(`test`
test case:
CREATE TABLE t1 (f1 integer, key(f1)) engine=myisam;
insert into t1 values (1),(2);
SELECT MAX( f1 ) FROM t1 WHERE ( 5 , 9 ) IN ( SELECT 3 , 5 );
Changed in maria: | |
assignee: | nobody → Oleksandr "Sanja" Byelkin (sanja-byelkin) |
Changed in maria: | |
importance: | Undecided → High |
status: | New → In Progress |
status: | In Progress → Confirmed |
milestone: | none → 5.2 |
Changed in maria: | |
assignee: | Oleksandr "Sanja" Byelkin (sanja-byelkin) → Igor Babaev (igorb-seattle) |
status: | Confirmed → In Progress |
This bug is fixed by the patch for bug #904345.