mariadb/mysql-test/suite/pbxt
unknown a6037394e3 Fix bug lp:817384
This bug is a special case of lp:813447.

Analysis:
Constant optimization finds that the condition t2.a = 1
can be used to access the primary key of table 't2'. As
a result both outer table t1,t2 are considered as constant
when we reach the execution phase. At the same time, during
constant optimization, the IN predicate is not evaluated
because it is expensive.

When execution of the outer query reaches do_select(),
control flow enter the branch:
if (join->table_count == join->const_tables)
{ ... }
This branch checks only the WHERE and HAVING clauses,
but doesn't check the ON clauses of the query. Since the
IN predicate was not evaluated during optimization, it is
not evaluated at all, thus execution doesn't detect that
the ON clause is FALSE.

Solution:
Similar to the patch for bug lp:813447, exclude system
tables from constant substitution based on unique key
lookups if there is an expensive ON condition on the
inner table.
2011-08-09 10:28:57 +03:00
..
r Fix bug lp:817384 2011-08-09 10:28:57 +03:00
t Fixed a crash with pbxt.subselect when 'derived_merge' is set off in 2011-07-22 21:39:55 -07:00
my.cnf generalization of mtr to support suite.pm extensions: 2010-08-17 11:14:46 +04:00