db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r628661 - in /db/derby/code/branches/10.3/java: engine/org/apache/derby/impl/sql/compile/ testing/org/apache/derbyTesting/functionTests/master/ testing/org/apache/derbyTesting/functionTests/tests/lang/
Date Mon, 18 Feb 2008 09:25:20 GMT
Author: dyre
Date: Mon Feb 18 01:25:07 2008
New Revision: 628661

URL: http://svn.apache.org/viewvc?rev=628661&view=rev
Log:
DERBY-3301: Incorrect result from query with nested EXIST

Prevent the optimizer from flattening subqueries that
need to be evaluated to get correct results.

Merged with svn merge -r 618585:618586 ../derby-repro

Simple merge with no conflicts; no additional changes were necessary.

Added:
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NestedWhereSubqueryTest.java
      - copied unchanged from r618586, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NestedWhereSubqueryTest.java
Modified:
    db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/compile/SelectNode.java
    db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/compile/SubqueryList.java
    db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/compile/SubqueryNode.java
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/subqueryFlattening.out
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java

Modified: db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/compile/SelectNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/compile/SelectNode.java?rev=628661&r1=628660&r2=628661&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/compile/SelectNode.java
(original)
+++ db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/compile/SelectNode.java
Mon Feb 18 01:25:07 2008
@@ -112,6 +112,8 @@
 
 	private boolean orderByAndDistinctMerged;
 
+	boolean originalWhereClauseHadSubqueries;
+	
 	/* Copy of fromList prior to generating join tree */
 	private FromList preJoinFL;
 
@@ -138,6 +140,16 @@
 		this.groupByList = (GroupByList) groupByList;
 		this.havingClause = (ValueNode)havingClause;
 		bindTargetListOnly = false;
+		
+		this.originalWhereClauseHadSubqueries = false;
+		if (this.whereClause != null){
+			CollectNodesVisitor cnv = 
+				new CollectNodesVisitor(SubqueryNode.class, SubqueryNode.class);
+			this.whereClause.accept(cnv);
+			if (!cnv.getList().isEmpty()){
+				this.originalWhereClauseHadSubqueries = true;
+			}
+		}
 	}
 
 	/**
@@ -456,7 +468,7 @@
 			whereClause = whereClause.bindExpression(fromListParam, 
 										whereSubquerys,
 										whereAggregates);
-
+			
 			/* RESOLVE - Temporarily disable aggregates in the HAVING clause.
 			** (We may remove them in the parser anyway.)
 			** RESOLVE - Disable aggregates in the WHERE clause.  Someday
@@ -868,6 +880,13 @@
 		 */
 		if (whereClause != null)
 		{
+			// DERBY-3301
+			// Mark subqueries that are part of the where clause as such so
+			// that we can avoid flattening later, particularly for nested 
+			// WHERE EXISTS subqueries.
+			if (whereSubquerys != null){
+				whereSubquerys.markWhereSubqueries();
+			}
 			whereClause.preprocess(numTables,
 								   fromList, whereSubquerys,
 								   wherePredicates);

Modified: db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/compile/SubqueryList.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/compile/SubqueryList.java?rev=628661&r1=628660&r2=628661&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/compile/SubqueryList.java
(original)
+++ db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/compile/SubqueryList.java
Mon Feb 18 01:25:07 2008
@@ -255,5 +255,20 @@
 	        subqueryNode.setHavingSubquery(true);
 	    }
 	}
+
+	/**
+	 * Mark all of the subqueries in this list as being part of a where clause
+	 * so we can avoid flattening later if needed.
+	 */
+	public void markWhereSubqueries() {
+		int size = size();
+		for (int index = 0; index < size; index++)
+		{
+			SubqueryNode    subqueryNode;
+
+			subqueryNode = (SubqueryNode) elementAt(index);
+			subqueryNode.setWhereSubquery(true);
+		}
+	}
 }
 

Modified: db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/compile/SubqueryNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/compile/SubqueryNode.java?rev=628661&r1=628660&r2=628661&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/compile/SubqueryNode.java
(original)
+++ db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/compile/SubqueryNode.java
Mon Feb 18 01:25:07 2008
@@ -44,6 +44,7 @@
 
 import java.lang.reflect.Modifier;
 
+import java.util.Iterator;
 import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;
 import org.apache.derby.impl.sql.compile.ActivationClassBuilder;
 import org.apache.derby.impl.sql.execute.OnceResultSet;
@@ -110,6 +111,9 @@
 	/* Whether or not this subquery began life as a distinct expression subquery */
 	boolean			distinctExpression;
 
+	/* Whether or not this subquery began life as a subquery in a where clause */
+	boolean			whereSubquery;
+	
 	/* Since we do not have separate subquery operator nodes, the
 	 * type of the subquery is stored in the subqueryType field.  Most subquery
 	 * types take a left operand (except for expression and exists).  We could
@@ -614,9 +618,14 @@
          *  o It is not a subquery in a having clause (DERBY-3257)
 		 *  o It is an expression subquery on the right side
 		 *	  of a BinaryComparisonOperatorNode.
+		 *  o Either a) it does not appear within a WHERE clause, or 
+		 *           b) it appears within a WHERE clause but does not itself 
+		 *              contain a WHERE clause with other subqueries in it. 
+		 *          (DERBY-3301)
 		 */
 		flattenable = (resultSet instanceof RowResultSetNode) &&
 					  underTopAndNode && !havingSubquery &&
+					  !isWhereExistsAnyInWithWhereSubquery() &&
 					  parentComparisonOperator instanceof BinaryComparisonOperatorNode;
 		if (flattenable)
 		{
@@ -677,11 +686,16 @@
 		 *
 		 *	OR,
 		 *  o The subquery is NOT EXISTS, NOT IN, ALL (beetle 5173).
+		 *  o Either a) it does not appear within a WHERE clause, or 
+		 *           b) it appears within a WHERE clause but does not itself 
+		 *              contain a WHERE clause with other subqueries in it. 
+		 *          (DERBY-3301)
 		 */
 		boolean flattenableNotExists = (isNOT_EXISTS() || canAllBeFlattened());
 
 		flattenable = (resultSet instanceof SelectNode) &&
 					  underTopAndNode && !havingSubquery &&
+					  !isWhereExistsAnyInWithWhereSubquery() &&
 					  (isIN() || isANY() || isEXISTS() || flattenableNotExists ||
                        parentComparisonOperator != null);
 
@@ -2310,4 +2324,67 @@
     public void setHavingSubquery(boolean havingSubquery) {
         this.havingSubquery = havingSubquery;
     }
+	
+
+	/**
+	 * Is this subquery part of a whereclause?
+	 *
+	 * @return true if it is part of a where clause, otherwise false
+	 */
+	public boolean isWhereSubquery() {
+		return whereSubquery;
+	}
+
+	/**
+	 * Mark this subquery as being part of a where clause.
+	 * @param whereSubquery
+	 */
+	public void setWhereSubquery(boolean whereSubquery) {
+		this.whereSubquery = whereSubquery;
+	}
+
+	/**
+	 * Check whether this is a WHERE EXISTS | ANY | IN subquery with a subquery
+	 * in its own WHERE clause. Used in flattening decision making.
+	 * 
+	 * DERBY-3301 reported wrong results from a nested WHERE EXISTS, but 
+	 * according to the derby optimizer docs this applies to a broader range of 
+	 * WHERE clauses in a WHERE EXISTS subquery. No WHERE EXISTS subquery with 
+	 * anohter subquery in it own WHERE clause can be flattened. 
+	 * 
+	 * @return true if this subquery is a WHERE EXISTS | ANY | IN subquery with 
+	 *              a subquery in its own WHERE clause
+	 */
+	public boolean isWhereExistsAnyInWithWhereSubquery() 
+			throws StandardException
+	{
+		if ( isWhereSubquery() && (isEXISTS() || isANY() || isIN()) ) {
+			if (resultSet instanceof SelectNode){
+				SelectNode sn = (SelectNode) resultSet;
+				/* 
+				 * Flattening happens in lower QueryTree nodes first and then 
+				 * removes nodes from the whereSubquerys list or whereClause. 
+				 * Hence we check the original WHERE clause for subqueries in 
+				 * SelectNode.init(), and simply check here.
+				 */ 
+				if (sn.originalWhereClauseHadSubqueries){
+					/*
+					 * This is a WHERE EXISTS | ANY |IN subquery with a subquery
+					 * in its own WHERE clause (or now in whereSubquerys).
+					 */ 
+					return true;
+				}	
+			}
+			/* 
+			 * This is a WHERE EXISTS | ANY | IN subquery, but does not contain 
+			 * a subquery in its WHERE subquerylist or clause
+			 */
+			return false;
+		} else {
+			/* 
+			 * This isn't a WHERE EXISTS | ANY | IN subquery 
+			 */
+			return false;
+		}
+	}
 }

Modified: db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/subqueryFlattening.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/subqueryFlattening.out?rev=628661&r1=628660&r2=628661&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/subqueryFlattening.out
(original)
+++ db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/subqueryFlattening.out
Mon Feb 18 01:25:07 2008
@@ -1207,123 +1207,129 @@
 Begin Execution Timestamp : null
 End Execution Timestamp : null
 Statement Execution Plan Text: 
-Project-Restrict ResultSet (6):
-Number of opens = 1
-Rows seen = 1
-Rows filtered = 0
-restriction = false
-projection = true
-	constructor time (milliseconds) = 0
-	open time (milliseconds) = 0
-	next time (milliseconds) = 0
-	close time (milliseconds) = 0
-	restriction time (milliseconds) = 0
-	projection time (milliseconds) = 0
-Source result set:
-	Nested Loop Exists Join ResultSet:
-	Number of opens = 1
-	Rows seen from the left = 1
-	Rows seen from the right = 1
-	Rows filtered = 0
-	Rows returned = 1
+Attached subqueries:
+	Begin Subquery Number 0
+	Any ResultSet  (Attached to 2):
+	Number of opens = 2
+	Rows seen = 2
 		constructor time (milliseconds) = 0
 		open time (milliseconds) = 0
 		next time (milliseconds) = 0
 		close time (milliseconds) = 0
-	Left result set:
-		Nested Loop Join ResultSet:
-		Number of opens = 1
-		Rows seen from the left = 1
-		Rows seen from the right = 1
+	Source result set:
+		Project-Restrict ResultSet (6):
+		Number of opens = 2
+		Rows seen = 1
 		Rows filtered = 0
-		Rows returned = 1
+		restriction = false
+		projection = true
 			constructor time (milliseconds) = 0
 			open time (milliseconds) = 0
 			next time (milliseconds) = 0
 			close time (milliseconds) = 0
-		Left result set:
-			Index Scan ResultSet for IDX2 using index IDX2_1 at serializable isolation level using
share table locking chosen by the optimizer
-			Number of opens = 1
-			Rows seen = 1
-			Rows filtered = 0
-			Fetch Size = 16
-				constructor time (milliseconds) = 0
-				open time (milliseconds) = 0
-				next time (milliseconds) = 0
-				close time (milliseconds) = 0
-				next time in milliseconds/row = 0
-			scan information: 
-				Bit set of columns fetched={0, 1}
-				Number of columns fetched=2
-				Number of deleted rows visited=0
-				Number of pages visited=1
-				Number of rows qualified=1
-				Number of rows visited=2
-				Scan type=btree
-				Tree height=1
-				start position: 
-	None
-				stop position: 
-	None
-				qualifiers:
-Column[0][0] Id: 1
-Operator: =
-Ordered nulls: false
-Unknown return value: false
-Negate comparison result: false
-		Right result set:
-			Table Scan ResultSet for OUTER1 at serializable isolation level using share table locking
chosen by the optimizer
-			Number of opens = 1
-			Rows seen = 1
+			restriction time (milliseconds) = 0
+			projection time (milliseconds) = 0
+		Source result set:
+			Nested Loop Exists Join ResultSet:
+			Number of opens = 2
+			Rows seen from the left = 1
+			Rows seen from the right = 1
 			Rows filtered = 0
-			Fetch Size = 16
+			Rows returned = 1
 				constructor time (milliseconds) = 0
 				open time (milliseconds) = 0
 				next time (milliseconds) = 0
 				close time (milliseconds) = 0
-				next time in milliseconds/row = 0
-			scan information: 
-				Bit set of columns fetched=All
-				Number of columns fetched=3
-				Number of pages visited=1
-				Number of rows qualified=1
-				Number of rows visited=2
-				Scan type=heap
-				start position: 
-null				stop position: 
-null				qualifiers:
-Column[0][0] Id: 0
-Operator: =
-Ordered nulls: false
-Unknown return value: false
-Negate comparison result: false
-	Right result set:
-		Index Scan ResultSet for IDX1 using index IDX1_1 at serializable isolation level using
share row locking chosen by the optimizer
-		Number of opens = 1
-		Rows seen = 1
-		Rows filtered = 0
-		Fetch Size = 1
-			constructor time (milliseconds) = 0
-			open time (milliseconds) = 0
-			next time (milliseconds) = 0
-			close time (milliseconds) = 0
-			next time in milliseconds/row = 0
-		scan information: 
-			Bit set of columns fetched={0}
-			Number of columns fetched=1
-			Number of deleted rows visited=0
-			Number of pages visited=1
-			Number of rows qualified=1
-			Number of rows visited=1
-			Scan type=btree
-			Tree height=1
-			start position: 
+			Left result set:
+				Index Scan ResultSet for IDX2 using index IDX2_1 at serializable isolation level using
share row locking chosen by the optimizer
+				Number of opens = 2
+				Rows seen = 1
+				Rows filtered = 0
+				Fetch Size = 1
+					constructor time (milliseconds) = 0
+					open time (milliseconds) = 0
+					next time (milliseconds) = 0
+					close time (milliseconds) = 0
+					next time in milliseconds/row = 0
+				scan information: 
+					Bit set of columns fetched={0, 1}
+					Number of columns fetched=2
+					Number of deleted rows visited=0
+					Number of pages visited=2
+					Number of rows qualified=1
+					Number of rows visited=1
+					Scan type=btree
+					Tree height=1
+					start position: 
+	>= on first 2 column(s).
+	Ordered null semantics on the following columns: 
+					stop position: 
+	> on first 2 column(s).
+	Ordered null semantics on the following columns: 
+					qualifiers:
+None
+			Right result set:
+				Index Scan ResultSet for IDX1 using index IDX1_1 at serializable isolation level using
share row locking chosen by the optimizer
+				Number of opens = 1
+				Rows seen = 1
+				Rows filtered = 0
+				Fetch Size = 1
+					constructor time (milliseconds) = 0
+					open time (milliseconds) = 0
+					next time (milliseconds) = 0
+					close time (milliseconds) = 0
+					next time in milliseconds/row = 0
+				scan information: 
+					Bit set of columns fetched={0}
+					Number of columns fetched=1
+					Number of deleted rows visited=0
+					Number of pages visited=1
+					Number of rows qualified=1
+					Number of rows visited=1
+					Scan type=btree
+					Tree height=1
+					start position: 
 	>= on first 1 column(s).
 	Ordered null semantics on the following columns: 
-			stop position: 
+					stop position: 
 	> on first 1 column(s).
 	Ordered null semantics on the following columns: 
-			qualifiers:
+					qualifiers:
+None
+	End Subquery Number 0
+Project-Restrict ResultSet (2):
+Number of opens = 1
+Rows seen = 2
+Rows filtered = 1
+restriction = true
+projection = false
+	constructor time (milliseconds) = 0
+	open time (milliseconds) = 0
+	next time (milliseconds) = 0
+	close time (milliseconds) = 0
+	restriction time (milliseconds) = 0
+	projection time (milliseconds) = 0
+Source result set:
+	Table Scan ResultSet for OUTER1 at serializable isolation level using share table locking
chosen by the optimizer
+	Number of opens = 1
+	Rows seen = 2
+	Rows filtered = 0
+	Fetch Size = 16
+		constructor time (milliseconds) = 0
+		open time (milliseconds) = 0
+		next time (milliseconds) = 0
+		close time (milliseconds) = 0
+		next time in milliseconds/row = 0
+	scan information: 
+		Bit set of columns fetched=All
+		Number of columns fetched=3
+		Number of pages visited=1
+		Number of rows qualified=2
+		Number of rows visited=2
+		Scan type=heap
+		start position: 
+null		stop position: 
+null		qualifiers:
 None
 ij> -- only flatten bottom
 select * from outer1 o where exists
@@ -1516,121 +1522,127 @@
 Begin Execution Timestamp : null
 End Execution Timestamp : null
 Statement Execution Plan Text: 
-Project-Restrict ResultSet (6):
-Number of opens = 1
-Rows seen = 1
-Rows filtered = 0
-restriction = false
-projection = true
-	constructor time (milliseconds) = 0
-	open time (milliseconds) = 0
-	next time (milliseconds) = 0
-	close time (milliseconds) = 0
-	restriction time (milliseconds) = 0
-	projection time (milliseconds) = 0
-Source result set:
-	Nested Loop Exists Join ResultSet:
-	Number of opens = 1
-	Rows seen from the left = 1
-	Rows seen from the right = 1
-	Rows filtered = 0
-	Rows returned = 1
+Attached subqueries:
+	Begin Subquery Number 0
+	Any ResultSet  (Attached to 2):
+	Number of opens = 2
+	Rows seen = 2
 		constructor time (milliseconds) = 0
 		open time (milliseconds) = 0
 		next time (milliseconds) = 0
 		close time (milliseconds) = 0
-	Left result set:
-		Nested Loop Join ResultSet:
-		Number of opens = 1
-		Rows seen from the left = 1
-		Rows seen from the right = 1
+	Source result set:
+		Project-Restrict ResultSet (6):
+		Number of opens = 2
+		Rows seen = 1
 		Rows filtered = 0
-		Rows returned = 1
+		restriction = false
+		projection = true
 			constructor time (milliseconds) = 0
 			open time (milliseconds) = 0
 			next time (milliseconds) = 0
 			close time (milliseconds) = 0
-		Left result set:
-			Index Scan ResultSet for IDX2 using index IDX2_1 at serializable isolation level using
share table locking chosen by the optimizer
-			Number of opens = 1
-			Rows seen = 1
-			Rows filtered = 0
-			Fetch Size = 16
-				constructor time (milliseconds) = 0
-				open time (milliseconds) = 0
-				next time (milliseconds) = 0
-				close time (milliseconds) = 0
-				next time in milliseconds/row = 0
-			scan information: 
-				Bit set of columns fetched={0, 1}
-				Number of columns fetched=2
-				Number of deleted rows visited=0
-				Number of pages visited=1
-				Number of rows qualified=1
-				Number of rows visited=2
-				Scan type=btree
-				Tree height=1
-				start position: 
-	None
-				stop position: 
-	None
-				qualifiers:
-Column[0][0] Id: 1
-Operator: =
-Ordered nulls: false
-Unknown return value: false
-Negate comparison result: false
-		Right result set:
-			Table Scan ResultSet for OUTER1 at serializable isolation level using share table locking
chosen by the optimizer
-			Number of opens = 1
-			Rows seen = 1
+			restriction time (milliseconds) = 0
+			projection time (milliseconds) = 0
+		Source result set:
+			Nested Loop Exists Join ResultSet:
+			Number of opens = 2
+			Rows seen from the left = 1
+			Rows seen from the right = 1
 			Rows filtered = 0
-			Fetch Size = 16
+			Rows returned = 1
 				constructor time (milliseconds) = 0
 				open time (milliseconds) = 0
 				next time (milliseconds) = 0
 				close time (milliseconds) = 0
-				next time in milliseconds/row = 0
-			scan information: 
-				Bit set of columns fetched=All
-				Number of columns fetched=3
-				Number of pages visited=1
-				Number of rows qualified=1
-				Number of rows visited=2
-				Scan type=heap
-				start position: 
-null				stop position: 
-null				qualifiers:
-Column[0][0] Id: 0
-Operator: =
-Ordered nulls: false
-Unknown return value: false
-Negate comparison result: false
-	Right result set:
-		Index Scan ResultSet for IDX1 using index IDX1_1 at serializable isolation level using
share table locking chosen by the optimizer
-		Number of opens = 1
-		Rows seen = 1
-		Rows filtered = 0
-		Fetch Size = 1
-			constructor time (milliseconds) = 0
-			open time (milliseconds) = 0
-			next time (milliseconds) = 0
-			close time (milliseconds) = 0
-			next time in milliseconds/row = 0
-		scan information: 
-			Bit set of columns fetched={}
-			Number of columns fetched=0
-			Number of deleted rows visited=0
-			Number of pages visited=1
-			Number of rows qualified=1
-			Number of rows visited=1
-			Scan type=btree
-			Tree height=1
-			start position: 
+			Left result set:
+				Index Scan ResultSet for IDX2 using index IDX2_1 at serializable isolation level using
share row locking chosen by the optimizer
+				Number of opens = 2
+				Rows seen = 1
+				Rows filtered = 0
+				Fetch Size = 1
+					constructor time (milliseconds) = 0
+					open time (milliseconds) = 0
+					next time (milliseconds) = 0
+					close time (milliseconds) = 0
+					next time in milliseconds/row = 0
+				scan information: 
+					Bit set of columns fetched={0, 1}
+					Number of columns fetched=2
+					Number of deleted rows visited=0
+					Number of pages visited=2
+					Number of rows qualified=1
+					Number of rows visited=1
+					Scan type=btree
+					Tree height=1
+					start position: 
+	>= on first 2 column(s).
+	Ordered null semantics on the following columns: 
+					stop position: 
+	> on first 2 column(s).
+	Ordered null semantics on the following columns: 
+					qualifiers:
+None
+			Right result set:
+				Index Scan ResultSet for IDX1 using index IDX1_1 at serializable isolation level using
share table locking chosen by the optimizer
+				Number of opens = 1
+				Rows seen = 1
+				Rows filtered = 0
+				Fetch Size = 1
+					constructor time (milliseconds) = 0
+					open time (milliseconds) = 0
+					next time (milliseconds) = 0
+					close time (milliseconds) = 0
+					next time in milliseconds/row = 0
+				scan information: 
+					Bit set of columns fetched={}
+					Number of columns fetched=0
+					Number of deleted rows visited=0
+					Number of pages visited=1
+					Number of rows qualified=1
+					Number of rows visited=1
+					Scan type=btree
+					Tree height=1
+					start position: 
 	None
-			stop position: 
+					stop position: 
 	None
-			qualifiers:
+					qualifiers:
+None
+	End Subquery Number 0
+Project-Restrict ResultSet (2):
+Number of opens = 1
+Rows seen = 2
+Rows filtered = 1
+restriction = true
+projection = false
+	constructor time (milliseconds) = 0
+	open time (milliseconds) = 0
+	next time (milliseconds) = 0
+	close time (milliseconds) = 0
+	restriction time (milliseconds) = 0
+	projection time (milliseconds) = 0
+Source result set:
+	Table Scan ResultSet for OUTER1 at serializable isolation level using share table locking
chosen by the optimizer
+	Number of opens = 1
+	Rows seen = 2
+	Rows filtered = 0
+	Fetch Size = 16
+		constructor time (milliseconds) = 0
+		open time (milliseconds) = 0
+		next time (milliseconds) = 0
+		close time (milliseconds) = 0
+		next time in milliseconds/row = 0
+	scan information: 
+		Bit set of columns fetched=All
+		Number of columns fetched=3
+		Number of pages visited=1
+		Number of rows qualified=2
+		Number of rows visited=2
+		Scan type=heap
+		start position: 
+null		stop position: 
+null		qualifiers:
 None
 ij> -- flatten a subquery that has a subquery in its select list
 -- verify that subquery gets copied up to outer block

Modified: db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java?rev=628661&r1=628660&r2=628661&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java
(original)
+++ db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java
Mon Feb 18 01:25:07 2008
@@ -111,6 +111,7 @@
         suite.addTest(CaseExpressionTest.suite());
         suite.addTest(AggregateClassLoadingTest.suite());
         suite.addTest(SynonymTest.suite());
+        suite.addTest(NestedWhereSubqueryTest.suite());
 
         // Add the XML tests, which exist as a separate suite
         // so that users can "run all XML tests" easily.



Mime
View raw message