You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by ab...@apache.org on 2008/02/07 20:34:42 UTC
svn commit: r619591 - in
/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests:
master/subqueryFlattening.out tests/lang/subqueryFlattening.sql
Author: abrown
Date: Thu Feb 7 11:34:39 2008
New Revision: 619591
URL: http://svn.apache.org/viewvc?rev=619591&view=rev
Log:
DERBY-3301: Follow-up patch to fix comments in subqueryFlattening.sql so
that they match/explain the printed query plans, which changed slightly
as a result of DERBY-3301.
Contributed by Thomas Nielsen.
Modified:
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/subqueryFlattening.out
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/subqueryFlattening.sql
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/subqueryFlattening.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/subqueryFlattening.out?rev=619591&r1=619590&r2=619591&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/subqueryFlattening.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/subqueryFlattening.out Thu Feb 7 11:34:39 2008
@@ -1176,7 +1176,8 @@
qualifiers:
None
ij> -- multilevel subqueries
--- flatten all
+-- only flatten bottom of where exists, any, or in with
+-- exists, any, or in in its own where clause. DERBY-3301.
select * from outer1 o where exists
(select * from idx2 i where exists
(select * from idx1 ii
@@ -1191,7 +1192,8 @@
null
Statement Text:
-- multilevel subqueries
--- flatten all
+-- only flatten bottom of where exists, any, or in with
+-- exists, any, or in in its own where clause. DERBY-3301.
select * from outer1 o where exists
(select * from idx2 i where exists
(select * from idx1 ii
@@ -1490,8 +1492,9 @@
null stop position:
null qualifiers:
None
-ij> -- flatten innermost into exists join, then flatten middle
--- into outer
+ij> -- flatten innermost into exists join, but dont flatten middle into outer as it
+-- is a where exists, any, or in with exists, any, or in in its own where clause.
+-- DERBY-3301.
select * from outer1 o where exists
(select * from idx2 i
where o.c1 = i.c1 and i.c2 = 1 and exists
@@ -1505,8 +1508,9 @@
Statement Name:
null
Statement Text:
- -- flatten innermost into exists join, then flatten middle
--- into outer
+ -- flatten innermost into exists join, but dont flatten middle into outer as it
+-- is a where exists, any, or in with exists, any, or in in its own where clause.
+-- DERBY-3301.
select * from outer1 o where exists
(select * from idx2 i
where o.c1 = i.c1 and i.c2 = 1 and exists
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/subqueryFlattening.sql
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/subqueryFlattening.sql?rev=619591&r1=619590&r2=619591&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/subqueryFlattening.sql (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/subqueryFlattening.sql Thu Feb 7 11:34:39 2008
@@ -103,7 +103,8 @@
values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();
-- multilevel subqueries
--- flatten all
+-- only flatten bottom of where exists, any, or in with
+-- exists, any, or in in its own where clause. DERBY-3301.
select * from outer1 o where exists
(select * from idx2 i where exists
(select * from idx1 ii
@@ -115,8 +116,9 @@
(select * from idx1 ii
where o.c1 = i.c1 and i.c2 = ii.c1));
values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();
--- flatten innermost into exists join, then flatten middle
--- into outer
+-- flatten innermost into exists join, but dont flatten middle into outer as it
+-- is a where exists, any, or in with exists, any, or in in its own where clause.
+-- DERBY-3301.
select * from outer1 o where exists
(select * from idx2 i
where o.c1 = i.c1 and i.c2 = 1 and exists