Comment 1 for bug 834514

Revision history for this message
Oleksandr "Sanja" Byelkin (sanja-byelkin) wrote : Re: Assertion Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' with aggregates

Type of the subquery is not important, emptiness of t3 also is not important.

A bit simplified query:
SELECT COUNT(DISTINCT t2.b), CONCAT(t1.c)
FROM t1, t2
WHERE (t2.c = t1.c)
AND (
        t1.b = 4
        OR t1.a = 137
        AND (SELECT a FROM t3 )
)
GROUP BY 2;
drop tables t1,t2,t3;