Presence of a subquery in the ON expression of a join 
should not block merging the view that contains this join.
Before this patch the such views were converted into 
into temporary table views.
This commit is contained in:
igor@rurik.mysql.com 2006-09-25 06:15:14 -07:00
commit a661bdda19
5 changed files with 44 additions and 2 deletions

View file

@ -1710,7 +1710,8 @@ bool st_lex::can_be_merged()
unit= unit->next_unit())
{
if (unit->first_select()->parent_lex == this &&
(unit->item == 0 || unit->item->place() != IN_WHERE))
(unit->item == 0 ||
(unit->item->place() != IN_WHERE && unit->item->place() != IN_ON)))
{
selects_allow_merge= 0;
break;