summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorigor@rurik.mysql.com <>2006-09-25 06:15:14 -0700
committerigor@rurik.mysql.com <>2006-09-25 06:15:14 -0700
commita661bdda19264341c7d8cbf155e199e2e4bac383 (patch)
treea604b5862bc87ba54f293e173f21d90404fd5093 /sql/sql_lex.cc
parent2e2c5a20c0329ddf432435db25255a8fc047dbd2 (diff)
downloadmariadb-git-a661bdda19264341c7d8cbf155e199e2e4bac383.tar.gz
Fixed bug #21646.
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.
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index d0087b14d6a..788276ac654 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -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;