Comment 2 for bug 904345

Revision history for this message
Elena Stepanova (elenst) wrote :

EXPLAIN for the variant with the view (on 5.3):

EXPLAIN EXTENDED SELECT MAX(a) FROM v WHERE (1,2) IN ( SELECT 3,4 );
id select_type table type possible_keys key key_len ref rows filtered Extra
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

select max(`test`.`t1`.`a`) AS `MAX(a)` from `test`.`t1` where <in_optimizer>((1,2),<exists>(select 3,4 having (((1 = 3) or isnull(3)) and ((2 = 4) or isnull(4)) and <is_not_null_test>(3) and <is_not_null_test>(4))))