db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r389202 [1/2] - in /db/derby/code/trunk/java: engine/org/apache/derby/iapi/sql/execute/ engine/org/apache/derby/iapi/store/access/ engine/org/apache/derby/impl/jdbc/ engine/org/apache/derby/impl/sql/execute/ engine/org/apache/derby/impl/sto...
Date Mon, 27 Mar 2006 17:16:30 GMT
Author: kahatlen
Date: Mon Mar 27 09:16:22 2006
New Revision: 389202

URL: http://svn.apache.org/viewcvs?rev=389202&view=rev
Log:
DERBY-690: Add scrollable, updatable, insensitive result sets

Support for scrollable, updatable, insensitive result sets in the
embedded driver. Patch contributed by Fernanda Pizzorno, Andreas
Korneliussen and Dag H. Wanvik.

Removed:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/SURTest.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/SURTest.out
Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/execute/NoPutResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/ScanController.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CurrentOfResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexRowToBaseRowResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NoPutResultSetImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NormalizeResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ProjectRestrictResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TableScanResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TemporaryRowHolderResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UpdateResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/btree/BTreeScan.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/conglomerate/GenericScanController.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/heap/HeapRowLocation.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/sort/SortBufferRowSource.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/sort/SortScan.java
    db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_en.properties
    db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/odbc_metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/odbc_metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/updatableResultSet.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk14/updatableResultSet.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/odbc_metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/scrollCursors2.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/updatableResultSet.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClient.exclude
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURQueryMixTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/metadata_test.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultset.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/scrollCursors2.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/updatableResultSet.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/execute/NoPutResultSet.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/execute/NoPutResultSet.java?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/execute/NoPutResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/execute/NoPutResultSet.java Mon Mar 27 09:16:22 2006
@@ -170,4 +170,42 @@
 	 */
 	public boolean isForUpdate();
 
-}
+	/* 
+	 * New methods for supporting detectability of own changes for
+	 * for updates and deletes when using ResultSets of type 
+	 * TYPE_SCROLL_INSENSITIVE and concurrency CONCUR_UPDATABLE.
+	 */
+	
+	/**
+	 * Updates the resultSet's current row with it's new values after
+	 * an update has been issued either using positioned update or
+	 * JDBC's udpateRow method.
+	 *
+	 * @param row new values for the currentRow
+	 *
+	 * @exception StandardException thrown on failure.
+	 */
+	public void updateRow(ExecRow row) throws StandardException;
+	
+	/**
+	 * Marks the resultSet's currentRow as deleted after a delete has been 
+	 * issued by either by using positioned delete or JDBC's deleteRow
+	 * method.
+	 *
+	 * @exception StandardException thrown on failure.
+	 */
+	public void markRowAsDeleted() throws StandardException;
+
+	/**
+	 * Positions the cursor in the specified rowLocation. Used for
+	 * scrollable insensitive result sets in order to position the
+	 * cursor back to a row that has already be visited.
+	 * 
+	 * @param rLoc row location of the current cursor row
+	 *
+	 * @exception StandardException thrown on failure to
+	 *	get location from storage engine
+	 *
+	 */
+	void positionScanAtRowLocation(RowLocation rLoc) 
+		throws StandardException;}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/ScanController.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/ScanController.java?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/ScanController.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/ScanController.java Mon Mar 27 09:16:22 2006
@@ -205,6 +205,19 @@
 		throws StandardException;
 
     /**
+     The same as fetch, except that the qualifiers passed to the openScan()
+     will not be applied. destRow will contain the current row even if it
+     has been changed and no longer qualifies.
+
+     @param destRow The row into which the value of the current 
+     position in the scan is to be stored.
+
+     @exception StandardException Standard exception policy.
+     */
+    void fetchWithoutQualify(DataValueDescriptor[] destRow)
+		throws StandardException;
+
+    /**
     Fetch the (partial) row at the next position of the Scan.
 
     If there is a valid next position in the scan then
@@ -318,4 +331,5 @@
 
     boolean replace(DataValueDescriptor[] row, FormatableBitSet validColumns)
 		throws StandardException;
+
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java Mon Mar 27 09:16:22 2006
@@ -518,7 +518,7 @@
 			throw Util.noCurrentConnection();
 
 		return factory.newEmbedStatement(this, false,
-			setResultSetType(resultSetType), setResultSetConcurrency(resultSetType, resultSetConcurrency),
+			setResultSetType(resultSetType), resultSetConcurrency,
 			resultSetHoldability);
 	}
 
@@ -709,7 +709,7 @@
 			try {
 			    return factory.newEmbedPreparedStatement(this, sql, false,
 											   setResultSetType(resultSetType),
-											   setResultSetConcurrency(resultSetType, resultSetConcurrency),
+											   resultSetConcurrency,
 											   resultSetHoldability,
 											   autoGeneratedKeys,
 											   columnIndexes,
@@ -802,7 +802,7 @@
 			{
 			    return factory.newEmbedCallableStatement(this, sql,
 											   setResultSetType(resultSetType),
-											   setResultSetConcurrency(resultSetType, resultSetConcurrency),
+											   resultSetConcurrency,
 											   resultSetHoldability);
 			} 
 			finally 
@@ -1868,20 +1868,6 @@
 		}
 		return resultSetType;
 	}
-
-	private int setResultSetConcurrency(int resultSetType, int resultSetConcurrency) {
-
-		/* Add warning if updatable resultset is requested on cursor type other than forward only
-		 * and then downgrade the resultset to read only resultset.
-		 */
-		if (resultSetType != JDBC20Translation.TYPE_FORWARD_ONLY && resultSetConcurrency == JDBC20Translation.CONCUR_UPDATABLE)
-		{
-			addWarning(EmbedSQLWarning.newEmbedSQLWarning(SQLState.UPDATABLE_RESULTSET_FOR_FORWARD_ONLY));
-			resultSetConcurrency = JDBC20Translation.CONCUR_READ_ONLY;
-		}
-		return resultSetConcurrency;
-	}
-
 	
 
 	/** 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java Mon Mar 27 09:16:22 2006
@@ -2630,60 +2630,102 @@
      * @see Connection
      */
 	public boolean supportsResultSetConcurrency(int type, int concurrency) {
-		//FORWARD_ONLY + CONCUR_UPDATABLE combination is supported (at this point, delete and update functionality only)
-		if ((type == JDBC20Translation.TYPE_FORWARD_ONLY) &&
-				(concurrency == JDBC20Translation.CONCUR_UPDATABLE))
-			return true;
-
-		//requesting CONCUR_UPDATABLE on any resultset type other than TYPE_FORWARD_ONLY will return false
-		if ((type == JDBC20Translation.TYPE_SCROLL_SENSITIVE) ||
-				(concurrency == JDBC20Translation.CONCUR_UPDATABLE))
-			return false;
-		return true;
+ 		if (type == JDBC20Translation.TYPE_SCROLL_SENSITIVE) {
+ 			// (TYPE_SCROLL_SENSITIVE, *)
+  			return false;
+ 		} else {
+ 			// (FORWARD_ONLY, CONCUR_UPDATABLE)
+ 			// (FORWARD_ONLY, CONCUR_READ_ONLY)
+ 			// (TYPE_SCROLL_INSENSITIVE, CONCUR_UPDATABLE)
+ 			// (TYPE_SCROLL_INSENSITIVE, READ_ONLY)
+ 			return true;
+ 		}
 	}
 
     /**
      * JDBC 2.0
      *
-     * Determine whether a result set's own changes visible.
+     * Determine whether a result set's updates are visible.
      *
      * @param type result set type, i.e. ResultSet.TYPE_XXX
-     * @return true if changes are visible for the result set type
+     * @return true if updates are visible for the result set type
      */
     public boolean ownUpdatesAreVisible(int type)   {
-		  return false;
+ 		if (type == JDBC20Translation.TYPE_SCROLL_INSENSITIVE) {
+ 			return true;
+ 		} else {
+ 			return false;
+ 		}
 	}
-    public boolean ownDeletesAreVisible(int type)  {
-		  return false;
-	}
-    public boolean ownInsertsAreVisible(int type)   {
-		  return false;
-	}
-
+ 
     /**
      * JDBC 2.0
      *
-     * Determine whether changes made by others are visible.
+     * Determine whether a result set's deletes are visible.
      *
      * @param type result set type, i.e. ResultSet.TYPE_XXX
-     * @return true if changes are visible for the result set type
+     * @return true if deletes are visible for the result set type
      */
-    //Since Derby materializes a forward only ResultSet incrementally, it is possible to see changes
-    //made by others and hence following 3 metadata calls will return true for forward only ResultSets.
-    //Scroll insensitive ResultSet by their definition do not see changes made by others.
-    //Derby does not yet implement scroll sensitive resultsets.
+    public boolean ownDeletesAreVisible(int type)   {
+ 		if (type == JDBC20Translation.TYPE_SCROLL_INSENSITIVE) {
+ 			return true;
+ 		} else {
+ 			return false;
+ 		}
+	}
+ 
+     /**
+      * JDBC 2.0
+      *
+      * Determine whether a result set's inserts are visible.
+      *
+      * @param type result set type, i.e. ResultSet.TYPE_XXX
+      * @return true if inserts are visible for the result set type
+      */
+     public boolean ownInsertsAreVisible(int type)  {
+ 		return false;
+  	}
+
+      // Since Derby materializes a forward only ResultSet incrementally, it is 
+      // possible to see changes made by others and hence following 3 metadata 
+      // calls will return true for forward only ResultSets.
+
+      /**
+       * JDBC 2.0
+       *
+       * Determine whether updates made by others are visible.
+       *
+       * @param type result set type, i.e. ResultSet.TYPE_XXX
+       * @return true if updates are visible for the result set type
+       */
     public boolean othersUpdatesAreVisible(int type) {
 		if (type == JDBC20Translation.TYPE_FORWARD_ONLY)
 			return true;
 		return false;
 	}
 
+    /**
+     * JDBC 2.0
+     *
+     * Determine whether deletes made by others are visible.
+     *
+     * @param type result set type, i.e. ResultSet.TYPE_XXX
+     * @return true if deletes are visible for the result set type
+     */
     public boolean othersDeletesAreVisible(int type)  {
 		if (type == JDBC20Translation.TYPE_FORWARD_ONLY)
 			return true;
 		return false;
 	}
 
+    /**
+     * JDBC 2.0
+     *
+     * Determine whether inserts made by others are visible.
+     *
+     * @param type result set type, i.e. ResultSet.TYPE_XXX
+     * @return true if inserts are visible for the result set type
+     */
     public boolean othersInsertsAreVisible(int type)  {
 		if (type == JDBC20Translation.TYPE_FORWARD_ONLY)
 			return true;
@@ -2697,12 +2739,17 @@
      * calling ResultSet.rowUpdated().
      *
      * @param type result set type, i.e. ResultSet.TYPE_XXX
-     * @return true if changes are detected by the resultset type
+     * @return true if updates are detected by the resultset type
      */
-    //updatable resultsets are supported for forward only resultset types only. And for forward only
-    //resultsets, we move to before the next row after a update and that is why updatesAreDetected returns false
     public boolean updatesAreDetected(int type) {
-		  return false;
+		if (type == JDBC20Translation.TYPE_SCROLL_INSENSITIVE) {
+			return true;
+		} else {
+			// For forward only resultsets, we move to before the next
+			// row after a update and that is why updatesAreDetected
+			// returns false.
+			return false;
+		}
 	}
 
     /**
@@ -2713,12 +2760,17 @@
      * returns false, then deleted rows are removed from the result set.
      *
      * @param type result set type, i.e. ResultSet.TYPE_XXX
-     * @return true if changes are detected by the resultset type
+     * @return true if deletes are detected by the resultset type
      */
-    //updatable resultsets are supported for forward only resultset types only. And for forward only
-    //resultsets, we move to before the next row after a delete and that is why deletesAreDetected returns false
     public boolean deletesAreDetected(int type) {
-		  return false;
+		if (type == JDBC20Translation.TYPE_SCROLL_INSENSITIVE) {
+			return true;
+		} else {
+			// For forward only resultsets, we move to before the next
+			// row after a delete and that is why deletesAreDetected
+			// returns false
+			return false;
+		}
 	}
 
     /**
@@ -2728,7 +2780,7 @@
      * by calling ResultSet.rowInserted().
      *
      * @param type result set type, i.e. ResultSet.TYPE_XXX
-     * @return true if changes are detected by the resultset type
+     * @return true if inserts are detected by the resultset type
      */
     public boolean insertsAreDetected(int type) {
 		  return false;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java Mon Mar 27 09:16:22 2006
@@ -28,14 +28,11 @@
 import org.apache.derby.iapi.sql.conn.StatementContext;
 
 import org.apache.derby.iapi.sql.ResultSet;
-import org.apache.derby.iapi.sql.Row;
 import org.apache.derby.iapi.sql.ParameterValueSet;
 import org.apache.derby.iapi.sql.execute.ExecCursorTableReference;
 import org.apache.derby.iapi.sql.execute.ExecRow;
 import org.apache.derby.iapi.sql.execute.NoPutResultSet;
-
-import org.apache.derby.iapi.sql.dictionary.TableDescriptor;
-import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor;
+import org.apache.derby.impl.sql.execute.ScrollInsensitiveResultSet;
 
 import org.apache.derby.iapi.sql.Activation;
 import org.apache.derby.iapi.sql.execute.CursorActivation;
@@ -2090,7 +2087,17 @@
 	 */
 	public boolean rowUpdated() throws SQLException {
 		checkIfClosed("rowUpdated");
-		return false;
+        boolean rvalue = false;
+
+		try {
+			if (isForUpdate() && 
+					getType() == java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE) {
+				rvalue = ((ScrollInsensitiveResultSet)theResults).isUpdated();
+			}
+		} catch (Throwable t) {
+				handleException(t);
+		}
+		return rvalue;
 	}
 
 	/**
@@ -2125,8 +2132,18 @@
 	 * @see EmbedDatabaseMetaData#deletesAreDetected
 	 */
 	public boolean rowDeleted() throws SQLException {
-		checkIfClosed("rowDeleted");
-		return false;
+		checkIfClosed("rowUpdated");
+        boolean rvalue = false;
+
+		try {
+			if (isForUpdate() && 
+					getType() == java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE) {
+				rvalue = ((ScrollInsensitiveResultSet)theResults).isDeleted();
+			}
+		} catch (Throwable t) {
+			handleException(t);
+		}
+		return rvalue;
 	}
 
 	//do following few checks before accepting updateXXX resultset api
@@ -3446,11 +3463,17 @@
             }
             // Don't set any timeout when updating rows (use 0)
             org.apache.derby.iapi.sql.ResultSet rs = ps.execute(act, false, true, true, 0L); //execute the update where current of sql
+            SQLWarning w = act.getWarnings();
+            if (w != null) {
+                addWarning(w);
+            }
             rs.close();
             rs.finish();
             //For forward only resultsets, after a update, the ResultSet will be positioned right before the next row.
-            rowData = null;
-            currentRow = null;
+            if (getType() == TYPE_FORWARD_ONLY) {
+                rowData = null;
+                currentRow = null;
+            }
             lcc.popStatementContext(statementContext, null);
         } catch (StandardException t) {
             throw closeOnTransactionError(t);
@@ -3492,11 +3515,20 @@
                 // Context used for preparing, don't set any timeout (use 0)
                 StatementContext statementContext = lcc.pushStatementContext(isAtomic, false, deleteWhereCurrentOfSQL.toString(), null, false, 0L);
                 org.apache.derby.iapi.sql.PreparedStatement ps = lcc.prepareInternalStatement(deleteWhereCurrentOfSQL.toString());
+                // Get activation, so that we can get the warning from it
+                Activation act = ps.getActivation(lcc, false);
                 // Don't set any timeout when deleting rows (use 0)
-                org.apache.derby.iapi.sql.ResultSet rs = ps.execute(lcc, true, 0L); //execute delete where current of sql
+                //execute delete where current of sql
+                org.apache.derby.iapi.sql.ResultSet rs = 
+                        ps.execute(act, false, true, true, 0L);
+                SQLWarning w = act.getWarnings();
+                if (w != null) {
+                    addWarning(w);
+                }
                 rs.close();
                 rs.finish();
-                //For forward only resultsets, after a delete, the ResultSet will be positioned right before the next row.
+                //After a delete, the ResultSet will be positioned right before 
+                //the next row.
                 rowData = null;
                 currentRow = null;
                 lcc.popStatementContext(statementContext, null);
@@ -4299,5 +4331,18 @@
             return isClosed;
         }
     }
+     
+     /**
+      * Adds a warning to the end of the warning chain.
+      *
+      * @param w The warning to add to the warning chain.
+      */
+     private void addWarning(SQLWarning w) {
+         if (topWarning == null) {
+             topWarning = w;
+         } else {
+             topWarning.setNextWarning(w);
+         }
+     }
 }
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CurrentOfResultSet.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CurrentOfResultSet.java?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CurrentOfResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CurrentOfResultSet.java Mon Mar 27 09:16:22 2006
@@ -122,9 +122,18 @@
 				// get the row from the base table, which is the real result
 				// row for the CurrentOfResultSet
 				currentRow = target.getCurrentRow();
-				if (SanityManager.DEBUG)
-					SanityManager.ASSERT(currentRow != null,
-									"No target row when there is a cursor row");
+
+				// if the source result set is a ScrollInsensitiveResultSet, and
+				// the current row has been deleted (while the cursor was 
+				// opened), the cursor result set (scroll insensitive) will 
+				// return the cached row, while the target result set will 
+				// return null (row has been deleted under owr feet).
+				if (rowLocation == null  || 
+						(cursorRow != null && currentRow == null)) {
+					activation.addWarning(StandardException.
+							newWarning(SQLState.CURSOR_OPERATION_CONFLICT));
+					return null;
+				}
 
 				/* beetle 3865: updateable cursor using index.  If underlying is a covering
 				 * index, target is a TableScanRS (instead of a IndexRow2BaseRowRS) for the
@@ -331,4 +340,18 @@
 		}
 	}
 
+	/**
+	 * @see NoPutResultSet#updateRow
+	 */
+	public void updateRow (ExecRow row) throws StandardException {
+		((NoPutResultSet)cursor).updateRow(row);
+	}
+	
+	/**
+	 * @see NoPutResultSet#markRowAsDeleted
+	 */
+	public void markRowAsDeleted() throws StandardException {
+		((NoPutResultSet)cursor).markRowAsDeleted();
+	}
+	
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteResultSet.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteResultSet.java?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteResultSet.java Mon Mar 27 09:16:22 2006
@@ -430,6 +430,7 @@
 				}
 
 				rc.deleteRow(row,baseRowLocation);
+				source.markRowAsDeleted();
 			}
 
             rowCount++;
@@ -548,6 +549,7 @@
 				}
 	
 				rc.deleteRow(deferredBaseRow, baseRowLocation);
+				source.markRowAsDeleted();
 			}
 		} finally
 		{

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexRowToBaseRowResultSet.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexRowToBaseRowResultSet.java?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexRowToBaseRowResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexRowToBaseRowResultSet.java Mon Mar 27 09:16:22 2006
@@ -105,6 +105,17 @@
 	protected boolean currentRowPrescanned;
 	private boolean sourceIsForUpdateIndexScan;
 
+	// for scrollable insensitive updatable result sets, the rowLocation of each
+	// row is stored in a hash table, and used to position the scan by calling 
+	// the method positionScanAtRowLocation. When this method is called, the 
+	// baseRowLocation will be set to the value of the cached rowLocation, and
+	// it will not be necessary to read the row from the B-tree in order to get
+	// the rowLocation of the current row.
+	// If positionFromRowLocation is true, then baseRowLocation can be used for
+	// fetching the currentRow, and it is not necessary to read the rowLocation
+	// from the B-tree, otherwise, the rowLocation must be read from the B-tree.
+	private boolean positionFromRowLocation;
+
     //
     // class interface
     //
@@ -212,6 +223,8 @@
 		}
 
 		constructorTime += getElapsedMillis(beginTime);
+		this.positionFromRowLocation = false;
+
     }
 
 	//
@@ -591,7 +604,21 @@
 	}
 
 	/**
-	 * Gets last row returned.
+	 * @see NoPutResultSet#positionScanAtRowLocation
+	 * 
+	 * Also remembers row location so that subsequent invocations of
+	 * getCurrentRow will not read the index row to look up the row
+	 * location base row, but reuse the saved row location.
+	 */
+	public void positionScanAtRowLocation(RowLocation rl) 
+		throws StandardException 
+	{
+		baseRowLocation = rl;
+		positionFromRowLocation = true;
+		source.positionScanAtRowLocation(rl);
+	}
+
+	/**	 * Gets last row returned.
 	 *
 	 * @see CursorResultSet
 	 *
@@ -618,6 +645,26 @@
 			return null;
 		}
 
+		// If positionFromRowLocation is true, we can use the baseRowLocation
+		// directly and do not need to read the rowLocation from the b-tree
+		// before fetching the row.
+		if (positionFromRowLocation) {
+			sourceRow = activation.getExecutionFactory().
+					getValueRow(indexCols.length);
+			sourceRow.setRowArray(rowArray);
+			// Fetch the columns coming from the heap
+			boolean row_exists = 
+				baseCC.fetch(
+					baseRowLocation, rowArray, (FormatableBitSet) null);
+			if (row_exists) {
+				setCurrentRow(sourceRow);
+			} else {
+				clearCurrentRow();
+				currentRow = null;
+			}
+			return currentRow;
+		}
+		
 		/* Call the child result set to get it's current row.
 		 * If no row exists, then return null, else requalify it
 		 * before returning.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NoPutResultSetImpl.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NoPutResultSetImpl.java?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NoPutResultSetImpl.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NoPutResultSetImpl.java Mon Mar 27 09:16:22 2006
@@ -349,6 +349,7 @@
 	public final void setCurrentRow(ExecRow row)
 	{
 		activation.setCurrentRow(row, resultSetNumber);
+		currentRow = row;
 	}
 
 	/**
@@ -536,4 +537,44 @@
 
 		return output;
 	}
+
+	/**
+	 * @see NoPutResultSet#updateRow
+	 *
+	 * This method is result sets used for scroll insensitive updatable 
+	 * result sets for other result set it is a no-op.
+	 */
+	public void updateRow(ExecRow row) throws StandardException {
+		// Only ResultSets of type Scroll Insensitive implement
+		// detectability, so for other result sets this method
+		// is a no-op
+	}
+
+	/**
+	 * @see NoPutResultSet#markRowAsDeleted
+	 *
+	 * This method is result sets used for scroll insensitive updatable 
+	 * result sets for other result set it is a no-op.
+	 */
+	public void markRowAsDeleted() throws StandardException {
+		// Only ResultSets of type Scroll Insensitive implement
+		// detectability, so for other result sets this method
+		// is a no-op
+	}
+
+	/**
+	 * @see NoPutResultSet#positionScanAtRowLocation
+	 *
+	 * This method is result sets used for scroll insensitive updatable 
+	 * result sets for other result set it is a no-op.
+	 */
+	public void positionScanAtRowLocation(RowLocation rl) 
+		throws StandardException 
+	{
+		// Only ResultSets of type Scroll Insensitive implement
+		// detectability, so for other result sets this method
+		// is a no-op
+	}
+
+
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NormalizeResultSet.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NormalizeResultSet.java?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NormalizeResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NormalizeResultSet.java Mon Mar 27 09:16:22 2006
@@ -371,4 +371,19 @@
 
 		return normalizedRow;
 	}
+
+	/**
+	 * @see NoPutResultSet#updateRow
+	 */
+	public void updateRow (ExecRow row) throws StandardException {
+		source.updateRow(row);
+	}
+
+	/**
+	 * @see NoPutResultSet#markRowAsDeleted
+	 */
+	public void markRowAsDeleted() throws StandardException {
+		source.markRowAsDeleted();
+	}
+
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ProjectRestrictResultSet.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ProjectRestrictResultSet.java?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ProjectRestrictResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ProjectRestrictResultSet.java Mon Mar 27 09:16:22 2006
@@ -519,6 +519,30 @@
 	}
 
 	/**
+	 * Do the projection against the sourceRow. If the source of the result set
+	 * is of type ProjectRestrictResultSet, the projection by that result set
+	 * will also be performed.
+	 *
+	 * @param sourceRow row to be projected
+	 *
+	 * @return The result of the projection
+	 *
+	 * @exception StandardException thrown on failure.
+	 */
+	public ExecRow doBaseRowProjection(ExecRow sourceRow)
+		throws StandardException
+	{
+		ExecRow result = null;
+		if (source instanceof ProjectRestrictResultSet) {
+			ProjectRestrictResultSet prs = (ProjectRestrictResultSet) source;
+			result = prs.doBaseRowProjection(sourceRow);
+		} else {
+			result = sourceRow.getClone();
+		}
+		return doProjection(result);
+	}
+	
+	/**
 	 * Is this ResultSet or it's source result set for update
 	 * 
 	 * @return Whether or not the result set is for update.
@@ -526,6 +550,20 @@
 	public boolean isForUpdate()
 	{
 		return source.isForUpdate();
+	}
+
+	/**
+	 * @see NoPutResultSet#updateRow
+	 */
+	public void updateRow (ExecRow row) throws StandardException {
+		source.updateRow(row);
+	}
+
+	/**
+	 * @see NoPutResultSet#markRowAsDeleted
+	 */
+	public void markRowAsDeleted() throws StandardException {
+		source.markRowAsDeleted();
 	}
 
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java Mon Mar 27 09:16:22 2006
@@ -46,12 +46,46 @@
 
 import org.apache.derby.iapi.store.access.BackingStoreHashtable;
 import org.apache.derby.iapi.services.io.FormatableBitSet;
+
+import org.apache.derby.iapi.types.SQLBoolean;
 import org.apache.derby.iapi.types.SQLInteger;
 
 /**
+ *
  * Provide insensitive scrolling functionality for the underlying
- * result set.  We build a hash table of rows as the user scrolls
- * forward, with the position as the key.
+ * result set.  We build a disk backed hash table of rows as the 
+ * user scrolls forward, with the position as the key.
+ *
+ * For read-only result sets the hash table will containg the
+ * following columns:
+ *<pre>
+ *  +-------------------------------+
+ *  | KEY                           |
+ *  +-------------------------------+
+ *  | Row                           |
+ *  +-------------------------------+
+ *</pre>
+ * where key is the position of the row in the result set and row is the data.
+ *
+ * And for updatable result sets it will contain:
+ * <pre>
+ *  +-------------------------------+
+ *  | KEY                           | [0]
+ *  +-------------------------------+
+ *  | RowLocation                   | [POS_ROWLOCATION]
+ *  +-------------------------------+
+ *  | Deleted                       | [POS_ROWDELETED]
+ *  +-------------------------------+
+ *  | Updated                       | [POS_ROWUPDATED]
+ *  +-------------------------------+
+ *  | Row                           | [extraColumns ... n]
+ *  +-------------------------------+
+ *</pre>
+ * where key is the position of the row in the result set, rowLocation is
+ * the row location of that row in the Heap, Deleted indicates whether the
+ * row has been deleted, Updated indicates whether the row has been updated,
+ * and row is the data.
+ *
  */
 
 public class ScrollInsensitiveResultSet extends NoPutResultSetImpl
@@ -88,6 +122,39 @@
 
     private boolean keepAfterCommit;
 
+	/* The hash table will contain a different number of extra columns depending
+	 * on whether the result set is updatable or not.
+	 * extraColumns will contain the number of extra columns on the hash table,
+	 * 1 for read-only result sets and LAST_EXTRA_COLUMN + 1 for updatable 
+	 * result sets.
+	 */
+	private int extraColumns;
+	
+	/* positionInHashTable is used for getting a row from the hash table. Prior
+	 * to getting the row, positionInHashTable will be set to the desired KEY.
+	 */
+	private SQLInteger positionInHashTable;
+
+	/* Reference to the target result set. Target is used for updatable result
+	 * sets in order to keep the target result set on the same row as the
+	 * ScrollInsensitiveResultSet.  
+	 */
+	private CursorResultSet target;
+
+	/* If the last row was fetched from the HashTable, updatable result sets
+	 * need to be positioned in the last fetched row before resuming the 
+	 * fetch from core.
+	 */
+	private boolean needsRepositioning;
+
+	/* Position of the different fields in the hash table row for updatable
+	 * result sets 
+	 */
+	private static final int POS_ROWLOCATION = 1;
+	private static final int POS_ROWDELETED = 2;
+	private static final int POS_ROWUPDATED = 3;
+	private static final int LAST_EXTRA_COLUMN = 3;
+
 	/**
 	 * Constructor for a ScrollInsensitiveResultSet
 	 *
@@ -121,6 +188,16 @@
 
         closeCleanup = c;
 		constructorTime += getElapsedMillis(beginTime);
+
+		positionInHashTable = new SQLInteger();
+		needsRepositioning = false;
+		if (isForUpdate()) {
+			target = ((CursorActivation)activation).getTargetResultSet();
+			extraColumns = LAST_EXTRA_COLUMN + 1;
+		} else {
+			target = null;
+			extraColumns = 1;
+		}
 	}
 
 
@@ -727,6 +804,11 @@
 			return null;
 		}
 
+
+		if (needsRepositioning) {
+			positionInLastFetchedRow();
+			needsRepositioning = false;
+		}
 		sourceRow = source.getNextRowCore();
 
 		if (sourceRow != null)
@@ -745,7 +827,13 @@
 
 			positionInSource++;
 			currentPosition = positionInSource;
-			addRowToHashTable(sourceRow);
+
+			RowLocation rowLoc = null;
+			if (source.isForUpdate()) {
+				rowLoc = ((CursorResultSet)source).getRowLocation();
+			}
+
+			addRowToHashTable(sourceRow, currentPosition, rowLoc, false);
 
 		}
 		// Remember whether or not we're past the end of the table
@@ -865,9 +953,13 @@
 	/* RESOLVE - this should return activation.getCurrentRow(resultSetNumber),
 	 * once there is such a method.  (currentRow is redundant)
 	 */
-	public ExecRow getCurrentRow() 
+	public ExecRow getCurrentRow() throws StandardException
 	{
-		return currentRow;
+		if (isForUpdate() && isDeleted()) {
+			return null;
+		} else {
+			return currentRow;
+		}
 	}
 
 	//
@@ -875,17 +967,33 @@
 	//
 
 	/**
-	 * Add a row to the backing hash table,
-	 * keyed on positionInSource.
+	 * Add a row to the backing hash table, keyed on position.
+	 * When a row gets updated when using scrollable insensitive updatable
+	 * result sets, the old entry for the row will be deleted from the hash 
+	 * table and this method will be called to add the new values for the row
+	 * to the hash table, with the parameter rowUpdated = true so as to mark 
+	 * the row as updated. The latter is done in order to implement 
+	 * detectability of own changes for result sets of this type.
 	 *
 	 * @param sourceRow	The row to add.
+	 * @param position The key
+	 * @param rowLoc The rowLocation of the row to add.
+	 * @param rowUpdated Indicates whether the row has been updated.
+	 *
 	 */
-	private void addRowToHashTable(ExecRow sourceRow)
+	private void addRowToHashTable(ExecRow sourceRow, int position,
+			RowLocation rowLoc, boolean rowUpdated)
 		throws StandardException
 	{
-		DataValueDescriptor[] hashRowArray = new DataValueDescriptor[sourceRowWidth + 1];
+		DataValueDescriptor[] hashRowArray = new 
+				DataValueDescriptor[sourceRowWidth + extraColumns];
 		// 1st element is the key
-		hashRowArray[0] = new SQLInteger(positionInSource);
+		hashRowArray[0] = new SQLInteger(position);
+		if (isForUpdate()) {
+			hashRowArray[POS_ROWLOCATION] = rowLoc.getClone();
+			hashRowArray[POS_ROWDELETED] = new SQLBoolean(false);
+			hashRowArray[POS_ROWUPDATED] = new SQLBoolean(rowUpdated);
+		}
 
 		/* Copy rest of elements from sourceRow.
 		 * NOTE: We need to clone the source row
@@ -894,7 +1002,8 @@
 		 */
 		DataValueDescriptor[] sourceRowArray = sourceRow.getRowArrayClone();
 
-		System.arraycopy(sourceRowArray, 0, hashRowArray, 1, sourceRowArray.length);
+		System.arraycopy(sourceRowArray, 0, hashRowArray, extraColumns, 
+				sourceRowArray.length);
 
 		ht.put(false, hashRowArray);
 
@@ -916,7 +1025,9 @@
 	{
 
 		// Get the row from the hash table
-		DataValueDescriptor[] hashRowArray = (DataValueDescriptor[]) ht.get(new SQLInteger(position));
+		positionInHashTable.setValue(position);
+		DataValueDescriptor[] hashRowArray = (DataValueDescriptor[]) 
+				ht.get(positionInHashTable);
 
 
 		if (SanityManager.DEBUG)
@@ -925,8 +1036,10 @@
 				"hashRowArray expected to be non-null");
 		}
 		// Copy out the Object[] without the position.
-		DataValueDescriptor[] resultRowArray = new DataValueDescriptor[hashRowArray.length - 1];
-		System.arraycopy(hashRowArray, 1, resultRowArray, 0, resultRowArray.length);
+		DataValueDescriptor[] resultRowArray = new 
+				DataValueDescriptor[hashRowArray.length - extraColumns];
+		System.arraycopy(hashRowArray, extraColumns, resultRowArray, 0, 
+				resultRowArray.length);
 
 		resultRow.setRowArray(resultRowArray);
 
@@ -941,7 +1054,107 @@
 			afterLast = false;
 		}
 
-		currentRow = resultRow;
+		if (isForUpdate()) {
+			RowLocation rowLoc = (RowLocation) hashRowArray[POS_ROWLOCATION];
+			// Keep source and target with the same currentRow
+			((NoPutResultSet)target).setCurrentRow(resultRow);
+			((NoPutResultSet)target).positionScanAtRowLocation(rowLoc);
+			needsRepositioning = true;
+		}
+		
+		setCurrentRow(resultRow);
+
 		return resultRow;
 	}
+
+	/**
+	 * Positions the cursor in the last fetched row. This is done before
+	 * navigating to a row that has not previously been fetched, so that
+	 * getNextRowCore() will re-start from where it stopped.
+	 */
+	private void positionInLastFetchedRow() throws StandardException {
+		if (positionInSource > 0) {
+			positionInHashTable.setValue(positionInSource);
+			DataValueDescriptor[] hashRowArray = (DataValueDescriptor[]) 
+					ht.get(positionInHashTable);
+			RowLocation rowLoc = (RowLocation) hashRowArray[POS_ROWLOCATION];
+			((NoPutResultSet)target).positionScanAtRowLocation(rowLoc);
+			currentPosition = positionInSource;
+		}
+	}
+
+	/**
+	 * @see NoPutResultSet#updateRow
+	 *
+	 * Sets the updated column of the hash table to true and updates the row
+	 * in the hash table with the new values for the row.
+	 */
+	public void updateRow(ExecRow row) throws StandardException {
+		ExecRow newRow = row.getClone();
+		if (source instanceof ProjectRestrictResultSet) {
+			newRow = ((ProjectRestrictResultSet)source).
+					doBaseRowProjection(newRow);
+		}
+		positionInHashTable.setValue(currentPosition);
+		DataValueDescriptor[] hashRowArray = (DataValueDescriptor[]) 
+				ht.get(positionInHashTable);
+		RowLocation rowLoc = (RowLocation) hashRowArray[POS_ROWLOCATION];
+		ht.remove(new SQLInteger(currentPosition));
+		addRowToHashTable(newRow, currentPosition, rowLoc, true);
+	}
+
+	/**
+	 * @see NoPutResultSet#markRowAsDeleted
+	 *
+	 * Sets the deleted column of the hash table to true in the current row.
+	 */
+	public void markRowAsDeleted() throws StandardException  {
+		positionInHashTable.setValue(currentPosition);
+		DataValueDescriptor[] hashRowArray = (DataValueDescriptor[]) 
+				ht.get(positionInHashTable);
+		RowLocation rowLoc = (RowLocation) hashRowArray[POS_ROWLOCATION];
+		ht.remove(new SQLInteger(currentPosition));
+		((SQLBoolean)hashRowArray[POS_ROWDELETED]).setValue(true);
+		// Set all columns to NULL, the row is now a placeholder
+		for (int i=extraColumns; i<hashRowArray.length; i++) {
+			hashRowArray[i].setToNull();
+		}
+
+		ht.put(false, hashRowArray);
+	}
+
+	/**
+	 * Returns TRUE if the row was been deleted within the transaction,
+	 * otherwise returns FALSE
+	 *
+	 * @return True if the row has been deleted, otherwise false
+	 *
+	 * @exception StandardException on error
+	 */
+	public boolean isDeleted() throws StandardException  {
+		positionInHashTable.setValue(currentPosition);
+		DataValueDescriptor[] hashRowArray = (DataValueDescriptor[]) 
+				ht.get(positionInHashTable);
+		return hashRowArray[POS_ROWDELETED].getBoolean();
+	}
+
+	/**
+	 * Returns TRUE if the row was been updated within the transaction,
+	 * otherwise returns FALSE
+	 *
+	 * @return True if the row has been deleted, otherwise false
+	 *
+	 * @exception StandardException on error
+	 */
+	public boolean isUpdated() throws StandardException {
+		positionInHashTable.setValue(currentPosition);
+		DataValueDescriptor[] hashRowArray = (DataValueDescriptor[]) 
+				ht.get(positionInHashTable);
+		return hashRowArray[POS_ROWUPDATED].getBoolean();			
+	}
+
+	public boolean isForUpdate() {
+		return source.isForUpdate();
+	}
+
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TableScanResultSet.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TableScanResultSet.java?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TableScanResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TableScanResultSet.java Mon Mar 27 09:16:22 2006
@@ -138,6 +138,21 @@
 	private ExecRow sparseRow;				//sparse row in heap column order
 	private FormatableBitSet sparseRowMap;			//which columns to read
 
+	// For Scrollable insensitive updatable result sets, only qualify a row the 
+	// first time it's been read, since an update can change a row so that it 
+	// no longer qualifies
+	private boolean qualify;
+
+	// currentRowIsValid is set to the result of positioning at a rowLocation.
+	// It will be true if the positioning was successful and false if the row 
+	// was deleted under our feet. Whenenver currentRowIsValid is false it means 
+	// that the row has been deleted.
+	private boolean currentRowIsValid;
+	
+	// Indicates whether the scan has been positioned back to a previously read
+	// row, or it is accessing a row for the first time.
+	private boolean scanRepositioned;
+
     //
     // class interface
     //
@@ -316,6 +331,11 @@
 		/* Only call row allocators once */
 		candidate = (ExecRow) resultRowAllocator.invoke(activation);
 		constructorTime += getElapsedMillis(beginTime);
+		
+		/* Always qualify the first time a row is being read */
+		qualify = true;
+		currentRowIsValid = false;
+		scanRepositioned = false;
     }
 
 	//
@@ -604,7 +624,7 @@
 	{
         checkCancellationFlag();
             
-		if (currentRow == null)
+		if (currentRow == null || scanRepositioned)
 		{
 			currentRow =
 				getCompactRow(candidate, accessedCols, (FormatableBitSet) null, isKeyed);
@@ -740,6 +760,9 @@
 	    }
 
 		setCurrentRow(result);
+		currentRowIsValid = true;
+		scanRepositioned = false;
+		qualify = true;
 
 		nextTime += getElapsedMillis(beginTime);
 	    return result;
@@ -851,8 +874,8 @@
 
 	/**
 	 * This result set has its row location from
-	 * the last fetch done. If the cursor is closed,
-	 * a null is returned.
+	 * the last fetch done. If the cursor is closed, 
+	 * or the row has been deleted a null is returned.
 	 *
 	 * @see CursorResultSet
 	 *
@@ -886,11 +909,15 @@
 		}
 		else
 		{
-			// we reuse the same rowlocation object across several calls.
-			if (rlTemplate == null)
-				rlTemplate = scanController.newRowLocationTemplate();
-			rl = rlTemplate;
-			scanController.fetchLocation(rl);
+			if (currentRowIsValid) {
+				// we reuse the same rowlocation object across several calls.
+				if (rlTemplate == null)
+					rlTemplate = scanController.newRowLocationTemplate();
+				rl = rlTemplate;
+				scanController.fetchLocation(rl);
+			} else {
+				rl = null;
+			}
 		}
 
 		return rl;
@@ -898,7 +925,9 @@
 
 	/**
 	 * This result set has its row from the last fetch done. 
-	 * If the cursor is closed, a null is returned.
+	 * If the cursor is closed, the row has been deleted, or
+	 * no longer qualifies (for forward only result sets) a 
+	 * null is returned.
 	 *
 	 * @see CursorResultSet
 	 *
@@ -927,9 +956,10 @@
 		try
 		{
 			if ((currentRow == null)                        ||
+			(!currentRowIsValid)                            ||
 			(!scanControllerOpened)                         ||
-			(scanController.isCurrentPositionDeleted())     ||
-			(!scanController.doesCurrentPositionQualify()))
+			(qualify && scanController.isCurrentPositionDeleted())     ||
+			(qualify && (!scanController.doesCurrentPositionQualify())))
 			{
 				return null;
 			}
@@ -950,7 +980,7 @@
 
         try
         {
-            scanController.fetch(result.getRowArray());
+            scanController.fetchWithoutQualify(result.getRowArray());
         }
         catch (StandardException se)
         {
@@ -969,6 +999,24 @@
 
 		setCurrentRow(result);
 	    return currentRow;
+	}
+
+	/**
+	 * @see NoPutResultSet#positionScanAtRowLocation
+	 * 
+	 * Also sets qualify to false so that later calls to getCurrentRow
+	 * will not attempt to re-qualify the current row. 
+	 */
+	public void positionScanAtRowLocation(RowLocation rl) 
+		throws StandardException 
+	{
+		// Check if the scanController is a B-tree scan controller. Do not
+		// attempt to re-position a b-tree controller.
+		if (!isKeyed) {
+			currentRowIsValid = scanController.positionAtRowLocation(rl);
+		}
+		qualify = false;
+		scanRepositioned = true;
 	}
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TemporaryRowHolderResultSet.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TemporaryRowHolderResultSet.java?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TemporaryRowHolderResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TemporaryRowHolderResultSet.java Mon Mar 27 09:16:22 2006
@@ -1102,6 +1102,18 @@
 	public void rowLocation(RowLocation rl) throws StandardException
 	{ }
 
+	/**
+	 * @see NoPutResultSet#positionScanAtRowLocation
+	 *
+	 * This method is result sets used for scroll insensitive updatable 
+	 * result sets for other result set it is a no-op.
+	 */
+	public void positionScanAtRowLocation(RowLocation rl) 
+		throws StandardException 
+	{
+		// Only used for Scrollable insensitive result sets otherwise no-op
+	}
+
 	// Class implementation
 
 	/**
@@ -1130,6 +1142,30 @@
 	}
 	public java.sql.SQLWarning getWarnings() {
 		return null;
+	}
+
+	/**
+	 * @see NoPutResultSet#updateRow
+	 *
+	 * This method is result sets used for scroll insensitive updatable 
+	 * result sets for other result set it is a no-op.
+	 */
+	public void updateRow(ExecRow row) throws StandardException {
+		// Only ResultSets of type Scroll Insensitive implement
+		// detectability, so for other result sets this method
+		// is a no-op
+	}
+ 
+	/**
+	 * @see NoPutResultSet#markRowAsDeleted
+	 *
+	 * This method is result sets used for scroll insensitive updatable 
+	 * result sets for other result set it is a no-op.
+	 */
+	public void markRowAsDeleted() throws StandardException {
+		// Only ResultSets of type Scroll Insensitive implement
+		// detectability, so for other result sets this method
+		// is a no-op
 	}
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UpdateResultSet.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UpdateResultSet.java?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UpdateResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UpdateResultSet.java Mon Mar 27 09:16:22 2006
@@ -575,6 +575,7 @@
 				}
 
 				rowChanger.updateRow(row,newBaseRow,baseRowLocation);
+				source.updateRow(newBaseRow);
 
 				//beetle 3865, update cursor use index.
 				if (notifyCursor)
@@ -901,6 +902,7 @@
 					rowChanger.updateRow(deferredBaseRow,
 										newBaseRow,
 										baseRowLocation);
+					source.updateRow(newBaseRow);
 				}
 			} finally
 			{

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/btree/BTreeScan.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/btree/BTreeScan.java?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/btree/BTreeScan.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/btree/BTreeScan.java Mon Mar 27 09:16:22 2006
@@ -1505,12 +1505,15 @@
 
 
     /**
-    Fetch the row at the current position of the Scan.
-	@see ScanController#fetch
-
-	@exception  StandardException  Standard exception policy.
-    **/
-	public void fetch(DataValueDescriptor[] row)
+     * Fetch the row at the current position of the Scan.
+     * 
+     * @param row The row into which the value of the current 
+     * position in the scan is to be stored.
+     * @param qualify indicates whether the qualifiers should be applied.
+     * 
+     * @exception  StandardException  Standard exception policy.
+     */
+	private void fetch(DataValueDescriptor[] row, boolean qualify)
 		throws StandardException
 	{
         if (scan_state != SCAN_INPROGRESS)
@@ -1551,7 +1554,8 @@
             scan_position.current_rh = 
                 scan_position.current_leaf.page.fetchFromSlot(
                 (RecordHandle) null, 
-                scan_position.current_slot, row, init_fetchDesc,
+                scan_position.current_slot, row, 
+                qualify ? init_fetchDesc : null,
                 true);
 
             // The possibility is that the row at the current position
@@ -1582,6 +1586,31 @@
 		return;
 	}
 
+    /**
+    Fetch the row at the current position of the Scan.
+	@see ScanController#fetch
+
+	@exception  StandardException  Standard exception policy.
+    **/
+	public void fetch(DataValueDescriptor[] row)
+        throws StandardException
+    {
+        fetch(row, true);
+    }
+
+    /**
+     * Fetch the row at the current position of the Scan without applying the 
+     * qualifiers.
+     * @see ScanController#fetchWithoutQualify
+     * 
+     * @exception  StandardException  Standard exception policy.
+     */
+	public void fetchWithoutQualify(DataValueDescriptor[] row)
+		throws StandardException
+    {
+        fetch(row, false);
+    }
+    
     /**
      * Return ScanInfo object which describes performance of scan.
      * <p>

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/conglomerate/GenericScanController.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/conglomerate/GenericScanController.java?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/conglomerate/GenericScanController.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/conglomerate/GenericScanController.java Mon Mar 27 09:16:22 2006
@@ -1422,11 +1422,41 @@
     }
 
     /**
-	@see ScanController#fetch
+    Fetch the row at the current position of the Scan without applying the 
+    qualifiers.
+	
+    @see ScanController#fetchWithoutQualify
+	**/
+	public void fetchWithoutQualify(DataValueDescriptor[] row)
+		throws StandardException
+	{
+		fetch(row, false);
+	}
+	
+	/**
+    Fetch the row at the current position of the Scan.
+
+    @see ScanController#fetch
 	**/
 	public void fetch(DataValueDescriptor[] row)
 		throws StandardException
 	{
+		fetch(row, true);
+	}
+
+	/**
+    Fetch the row at the current position of the Scan.
+
+    @param row The row into which the value of the current 
+     position in the scan is to be stored.
+
+    @param qualify Indicates whether the qualifiers should be applied.
+
+    @exception StandardException Standard exception policy.
+	**/
+	private void fetch(DataValueDescriptor[] row, boolean qualify)
+		throws StandardException
+	{
         if (scan_state != SCAN_INPROGRESS)
             throw StandardException.newException(
                     SQLState.AM_SCAN_NOT_POSITIONED);
@@ -1445,7 +1475,7 @@
                 scan_position.current_rh, 
                 scan_position.current_slot, 
                 row, 
-                init_fetchDesc, 
+                qualify ? init_fetchDesc : null, 
                 false);
 
         scan_position.unlatch();

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/heap/HeapRowLocation.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/heap/HeapRowLocation.java?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/heap/HeapRowLocation.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/heap/HeapRowLocation.java Mon Mar 27 09:16:22 2006
@@ -104,7 +104,7 @@
 	}
 
 	public DataValueDescriptor getNewNull() {
-		return null;
+		return new HeapRowLocation();
 	}
 
 	public Object getObject() {

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/sort/SortBufferRowSource.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/sort/SortBufferRowSource.java?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/sort/SortBufferRowSource.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/sort/SortBufferRowSource.java Mon Mar 27 09:16:22 2006
@@ -29,6 +29,7 @@
 import org.apache.derby.iapi.types.RowLocation;
 import org.apache.derby.iapi.store.access.conglomerate.ScanControllerRowSource;
 import org.apache.derby.iapi.store.access.conglomerate.TransactionManager;
+import org.apache.derby.iapi.store.access.ScanController;
 
 import org.apache.derby.iapi.types.DataValueDescriptor;
 
@@ -169,6 +170,27 @@
                 SQLState.SORT_IMPROPER_SCAN_METHOD);
 	}
 
+    /**
+     * Fetch the row at the current position of the Scan and does not apply the
+     * qualifiers.
+     *
+     * This method will always throw an exception. 
+     * (SQLState.SORT_IMPROPER_SCAN_METHOD)
+     *
+     * @see ScanController#fetchWithoutQualify
+     **/
+    public void fetchWithoutQualify(DataValueDescriptor[] result) 
+        throws StandardException
+    {
+        throw StandardException.newException(
+                SQLState.SORT_IMPROPER_SCAN_METHOD);
+    }
+
+    /**
+     * Fetch the row at the current position of the Scan.
+     *
+     * @see ScanController#fetch
+     **/
     public void fetch(DataValueDescriptor[] result) throws StandardException
 	{
         throw StandardException.newException(

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/sort/SortScan.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/sort/SortScan.java?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/sort/SortScan.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/sort/SortScan.java Mon Mar 27 09:16:22 2006
@@ -157,6 +157,23 @@
 	}
 
     /**
+    Fetch the row at the current position of the Scan and does not apply the
+    qualifiers.
+    
+    This method will always throw an exception.
+    (SQLState.SORT_IMPROPER_SCAN_METHOD)
+    
+    @see ScanController#fetchWithoutQualify
+    **/
+    public final void fetchWithoutQualify(DataValueDescriptor[] result)
+		throws StandardException
+	{
+        throw StandardException.newException(
+                SQLState.SORT_IMPROPER_SCAN_METHOD);
+
+    }
+    
+    /**
     Close the scan.	@see ScanController#close
     **/
     public void close()

Modified: db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_en.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_en.properties?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_en.properties (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/loc/messages_en.properties Mon Mar 27 09:16:22 2006
@@ -362,6 +362,7 @@
 01504=The new index is a duplicate of an existing index: {0}.
 01505=The value {0} may be truncated.
 01522=The newly defined synonym ''{0}'' resolved to the object ''{1}'' which is currently undefined.
+01001=An attempt to update or delete an already deleted row was made: No row was updated or deleted.
 01003=Null values were eliminated from the argument of a column function.
 0100E=XX Attempt to return too many result sets. 
 02000=No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.

Modified: db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java (original)
+++ db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java Mon Mar 27 09:16:22 2006
@@ -1513,6 +1513,7 @@
 	String LANG_TYPE_NOT_SERIALIZABLE = "01J04";
 	String UPGRADE_SPSRECOMPILEFAILED = "01J05";
     String QUERY_NOT_QUALIFIED_FOR_UPDATABLE_RESULTSET = "01J06";
+    String CURSOR_OPERATION_CONFLICT = "01001";
 
 
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out Mon Mar 27 09:16:22 2006
@@ -179,6 +179,29 @@
 othersUpdatesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
 othersDeletesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
 othersInsertsAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+Test the metadata calls related to visibility of *own* changes for different resultset types
+ownUpdatesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
+ownDeletesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
+ownInsertsAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
+Scroll insensitive ResultSet see updates and deletes, but not inserts
+ownUpdatesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+ownDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+ownInsertsAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+Derby does not yet implement scroll sensitive resultsets and hence following metadata calls return false
+ownUpdatesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+ownDeletesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+ownInsertsAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+Test the metadata calls related to detectability of visible changes for different resultset types
+Expect true for updates and deletes of TYPE_SCROLL_INSENSITIVE, all others should be false
+updatesAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
+deletesAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
+insertsAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
+updatesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+deletesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+insertsAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+updatesAreDetected(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+deletesAreDetected(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+insertsAreDetected(ResultSet.TYPE_SCROLL_SENSITIVE)? false
 getConnection(): same connection
 getProcedureColumns():
 PROCEDURE_CAT[VARCHAR],PROCEDURE_SCHEM[VARCHAR],PROCEDURE_NAME[VARCHAR],COLUMN_NAME[VARCHAR],COLUMN_TYPE[SMALLINT],DATA_TYPE[SMALLINT],TYPE_NAME[VARCHAR],PRECISION[INTEGER],LENGTH[INTEGER],SCALE[SMALLINT],RADIX[SMALLINT],NULLABLE[SMALLINT],REMARKS[VARCHAR],METHOD_ID[SMALLINT],PARAMETER_ID[SMALLINT]

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/odbc_metadata.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/odbc_metadata.out?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/odbc_metadata.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/odbc_metadata.out Mon Mar 27 09:16:22 2006
@@ -209,6 +209,29 @@
 othersUpdatesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
 othersDeletesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
 othersInsertsAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+Test the metadata calls related to visibility of *own* changes for different resultset types
+ownUpdatesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
+ownDeletesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
+ownInsertsAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
+Scroll insensitive ResultSet see updates and deletes, but not inserts
+ownUpdatesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+ownDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+ownInsertsAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+Derby does not yet implement scroll sensitive resultsets and hence following metadata calls return false
+ownUpdatesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+ownDeletesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+ownInsertsAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+Test the metadata calls related to detectability of visible changes for different resultset types
+Expect true for updates and deletes of TYPE_SCROLL_INSENSITIVE, all others should be false
+updatesAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
+deletesAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
+insertsAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
+updatesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+deletesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+insertsAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+updatesAreDetected(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+deletesAreDetected(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+insertsAreDetected(ResultSet.TYPE_SCROLL_SENSITIVE)? false
 getConnection(): same connection
 getProcedureColumns():
 PROCEDURE_CAT[VARCHAR],PROCEDURE_SCHEM[VARCHAR],PROCEDURE_NAME[VARCHAR],COLUMN_NAME[VARCHAR],COLUMN_TYPE[SMALLINT],DATA_TYPE[SMALLINT],TYPE_NAME[VARCHAR],COLUMN_SIZE[INTEGER],BUFFER_LENGTH[INTEGER],DECIMAL_DIGITS[SMALLINT],NUM_PREC_RADIX[SMALLINT],NULLABLE[SMALLINT],REMARKS[VARCHAR],COLUMN_DEF[VARCHAR],SQL_DATA_TYPE[SMALLINT],SQL_DATETIME_SUB[SMALLINT],CHAR_OCTET_LENGTH[INTEGER],ORDINAL_POSITION[INTEGER],IS_NULLABLE[VARCHAR],METHOD_ID[SMALLINT],PARAMETER_ID[SMALLINT]

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/metadata.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/metadata.out?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/metadata.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/metadata.out Mon Mar 27 09:16:22 2006
@@ -179,6 +179,29 @@
 othersUpdatesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
 othersDeletesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
 othersInsertsAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+Test the metadata calls related to visibility of *own* changes for different resultset types
+ownUpdatesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
+ownDeletesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
+ownInsertsAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
+Scroll insensitive ResultSet see updates and deletes, but not inserts
+ownUpdatesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+ownDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+ownInsertsAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+Derby does not yet implement scroll sensitive resultsets and hence following metadata calls return false
+ownUpdatesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+ownDeletesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+ownInsertsAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+Test the metadata calls related to detectability of visible changes for different resultset types
+Expect true for updates and deletes of TYPE_SCROLL_INSENSITIVE, all others should be false
+updatesAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
+deletesAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
+insertsAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
+updatesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+deletesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+insertsAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+updatesAreDetected(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+deletesAreDetected(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+insertsAreDetected(ResultSet.TYPE_SCROLL_SENSITIVE)? false
 SupportsResultSetConcurrency: TYPE_FORWARD_ONLY,CONCUR_READ_ONLY: true
 SupportsResultSetConcurrency: TYPE_FORWARD_ONLY,CONCUR_UPDATABLE: true
 SupportsResultSetConcurrency: TYPE_SCROLL_INSENSITIVE,CONCUR_READ_ONLY: true

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out Mon Mar 27 09:16:22 2006
@@ -179,6 +179,29 @@
 othersUpdatesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
 othersDeletesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
 othersInsertsAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+Test the metadata calls related to visibility of *own* changes for different resultset types
+ownUpdatesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
+ownDeletesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
+ownInsertsAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
+Scroll insensitive ResultSet see updates and deletes, but not inserts
+ownUpdatesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+ownDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+ownInsertsAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+Derby does not yet implement scroll sensitive resultsets and hence following metadata calls return false
+ownUpdatesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+ownDeletesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+ownInsertsAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+Test the metadata calls related to detectability of visible changes for different resultset types
+Expect true for updates and deletes of TYPE_SCROLL_INSENSITIVE, all others should be false
+updatesAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
+deletesAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
+insertsAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
+updatesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+deletesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+insertsAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+updatesAreDetected(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+deletesAreDetected(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+insertsAreDetected(ResultSet.TYPE_SCROLL_SENSITIVE)? false
 SupportsResultSetConcurrency: TYPE_FORWARD_ONLY,CONCUR_READ_ONLY: true
 SupportsResultSetConcurrency: TYPE_FORWARD_ONLY,CONCUR_UPDATABLE: true
 SupportsResultSetConcurrency: TYPE_SCROLL_INSENSITIVE,CONCUR_READ_ONLY: true

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/odbc_metadata.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/odbc_metadata.out?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/odbc_metadata.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/odbc_metadata.out Mon Mar 27 09:16:22 2006
@@ -209,6 +209,29 @@
 othersUpdatesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
 othersDeletesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
 othersInsertsAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+Test the metadata calls related to visibility of *own* changes for different resultset types
+ownUpdatesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
+ownDeletesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
+ownInsertsAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
+Scroll insensitive ResultSet see updates and deletes, but not inserts
+ownUpdatesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+ownDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+ownInsertsAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+Derby does not yet implement scroll sensitive resultsets and hence following metadata calls return false
+ownUpdatesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+ownDeletesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+ownInsertsAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+Test the metadata calls related to detectability of visible changes for different resultset types
+Expect true for updates and deletes of TYPE_SCROLL_INSENSITIVE, all others should be false
+updatesAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
+deletesAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
+insertsAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
+updatesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+deletesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+insertsAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+updatesAreDetected(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+deletesAreDetected(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+insertsAreDetected(ResultSet.TYPE_SCROLL_SENSITIVE)? false
 SupportsResultSetConcurrency: TYPE_FORWARD_ONLY,CONCUR_READ_ONLY: true
 SupportsResultSetConcurrency: TYPE_FORWARD_ONLY,CONCUR_UPDATABLE: true
 SupportsResultSetConcurrency: TYPE_SCROLL_INSENSITIVE,CONCUR_READ_ONLY: true

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/updatableResultSet.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/updatableResultSet.out?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/updatableResultSet.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/updatableResultSet.out Mon Mar 27 09:16:22 2006
@@ -4,9 +4,9 @@
 requested TYPE_SCROLL_INSENSITIVE, CONCUR_UPDATABLE but that is not supported
 Make sure that we got TYPE_SCROLL_INSENSITIVE? true
 Make sure that we got CONCUR_READ_ONLY? true
-ownDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+ownDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? true
 othersDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
-deletesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+deletesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? true
 JDBC 2.0 updatable resultset api will fail on this resultset because this is not an updatable resultset
 SQL State : XJ083
 Got expected exception 'deleteRow' not allowed because the ResultSet is not an updatable ResultSet. 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk14/updatableResultSet.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk14/updatableResultSet.out?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk14/updatableResultSet.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk14/updatableResultSet.out Mon Mar 27 09:16:22 2006
@@ -1,29 +1,25 @@
 Start testing delete and update using JDBC2.0 updateable resultset apis
 Negative Testl - request for scroll insensitive updatable resultset will give a read only scroll insensitive resultset
-WARNING 01J03: Scroll sensitive and scroll insensitive updatable ResultSets are not currently implemented.
 requested TYPE_SCROLL_INSENSITIVE, CONCUR_UPDATABLE but that is not supported
 Make sure that we got TYPE_SCROLL_INSENSITIVE? true
-Make sure that we got CONCUR_READ_ONLY? true
-ownDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+Make sure that we got CONCUR_READ_ONLY? false
+ownDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? true
 othersDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
-deletesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+deletesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? true
 JDBC 2.0 updatable resultset api will fail on this resultset because this is not an updatable resultset
-SQL State : XJ083
-Got expected exception 'deleteRow' not allowed because the ResultSet is not an updatable ResultSet. 
-SQL State : XJ083
-Got expected exception 'updateRow' not allowed because the ResultSet is not an updatable ResultSet. 
+FAIL!!! deleteRow should have failed because Derby does not yet support scroll insensitive updatable resultsets
+SQL State : 24000
+Got expected exception Invalid cursor state - no current row.
 Negative Test2 - request for scroll sensitive updatable resultset will give a read only scroll insensitive resultset
 WARNING 01J02: Scroll sensitive cursors are not currently implemented.
-WARNING 01J03: Scroll sensitive and scroll insensitive updatable ResultSets are not currently implemented.
 requested TYPE_SCROLL_SENSITIVE, CONCUR_UPDATABLE but that is not supported
 Jira issue Derby-154 : When client connects to Network Server using JCC, it incorrectly shows support for scroll sensitive updatable resultsets
 Make sure that we got TYPE_SCROLL_INSENSITIVE? true
-Make sure that we got CONCUR_READ_ONLY? true
+Make sure that we got CONCUR_READ_ONLY? false
 JDBC 2.0 updatable resultset api will fail on this resultset because this is not an updatable resultset
-SQL State : XJ083
-Got expected exception 'deleteRow' not allowed because the ResultSet is not an updatable ResultSet. 
-SQL State : XJ083
-Got expected exception 'updateRow' not allowed because the ResultSet is not an updatable ResultSet. 
+FAIL!!! deleteRow should have failed because Derby does not yet support scroll sensitive updatable resultsets
+SQL State : 24000
+Got expected exception Invalid cursor state - no current row.
 Negative Test3 - request a read only resultset and attempt deleteRow and updateRow on it
 Make sure that we got CONCUR_READ_ONLY? true
 Now attempting to send a deleteRow on a read only resultset.
@@ -155,7 +151,7 @@
 column 2 on this deleted row is aa                  
 doing positioned delete again w/o first positioning the ResultSet on the next row will fail
 SQL State : XCL08
-Got expected exception Cursor 'SQLCUR4' is not on a row.
+Got expected exception Cursor 'SQLCUR6' is not on a row.
 Position the ResultSet with next()
 Should be able to do positioned delete on the current row now
 Positive Test1d - updatable resultset to do positioned update
@@ -306,7 +302,7 @@
 	{3,cc                  }
 Positive Test9c - try to updateXXX on a readonly column. Should get error
 SQL State : 42X31
-Got expected exception Column 'C2' is not in the FOR UPDATE list of cursor 'SQLCUR17'.
+Got expected exception Column 'C2' is not in the FOR UPDATE list of cursor 'SQLCUR19'.
 attempt to get an updatable resultset using correlation name for an readonly column. It should work
 The sql is SELECT c1, c2 as col2 FROM t1 abcde FOR UPDATE of c1
 Table t1 after updateRow has following rows
@@ -317,7 +313,7 @@
 	{3,cc                  }
 Positive Test9d - try to updateXXX on a readonly column with correlation name. Should get error
 SQL State : 42X31
-Got expected exception Column 'COL2' is not in the FOR UPDATE list of cursor 'SQLCUR19'.
+Got expected exception Column 'COL2' is not in the FOR UPDATE list of cursor 'SQLCUR21'.
 Table t1 has following rows
 	 C1,C2
 	 -- --
@@ -328,7 +324,7 @@
 delete using first resultset
 attempt to send deleteRow on the same row through a different resultset should throw an exception
 SQL State : XCL08
-Got expected exception Cursor 'SQLCUR21' is not on a row.
+Got expected exception Cursor 'SQLCUR23' is not on a row.
 Move to next row in the 2nd resultset and then delete using the second resultset
 Positive Test11 - setting the fetch size to > 1 will be ignored by updatable resultset. Same as updatable cursors
 Notice the Fetch Size in run time statistics output.
@@ -3069,7 +3065,7 @@
 	{2,bb                  }
 	{3,cc                  }
 SQL State : 42X31
-Got expected exception Column 'C2' is not in the FOR UPDATE list of cursor 'SQLCUR39'.
+Got expected exception Column 'C2' is not in the FOR UPDATE list of cursor 'SQLCUR41'.
 updateRow passed
   Make sure the contents of table are unchanged
 	 C1,C2

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/metadata.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/metadata.out?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/metadata.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/metadata.out Mon Mar 27 09:16:22 2006
@@ -179,10 +179,33 @@
 othersUpdatesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
 othersDeletesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
 othersInsertsAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+Test the metadata calls related to visibility of *own* changes for different resultset types
+ownUpdatesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
+ownDeletesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
+ownInsertsAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
+Scroll insensitive ResultSet see updates and deletes, but not inserts
+ownUpdatesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? true
+ownDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? true
+ownInsertsAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+Derby does not yet implement scroll sensitive resultsets and hence following metadata calls return false
+ownUpdatesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+ownDeletesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+ownInsertsAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+Test the metadata calls related to detectability of visible changes for different resultset types
+Expect true for updates and deletes of TYPE_SCROLL_INSENSITIVE, all others should be false
+updatesAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
+deletesAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
+insertsAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
+updatesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? true
+deletesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? true
+insertsAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+updatesAreDetected(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+deletesAreDetected(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+insertsAreDetected(ResultSet.TYPE_SCROLL_SENSITIVE)? false
 SupportsResultSetConcurrency: TYPE_FORWARD_ONLY,CONCUR_READ_ONLY: true
 SupportsResultSetConcurrency: TYPE_FORWARD_ONLY,CONCUR_UPDATABLE: true
 SupportsResultSetConcurrency: TYPE_SCROLL_INSENSITIVE,CONCUR_READ_ONLY: true
-SupportsResultSetConcurrency: TYPE_SCROLL_INSENSITIVE,CONCUR_UPDATABLE: false
+SupportsResultSetConcurrency: TYPE_SCROLL_INSENSITIVE,CONCUR_UPDATABLE: true
 SupportsResultSetConcurrency: TYPE_SCROLL_SENSITIVE,CONCUR_READ_ONLY: false
 SupportsResultSetConcurrency: TYPE_SCROLL_SENSITIVE,CONCUR_UPDATABLE: false
 getConnection(): same connection

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/odbc_metadata.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/odbc_metadata.out?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/odbc_metadata.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/odbc_metadata.out Mon Mar 27 09:16:22 2006
@@ -209,10 +209,33 @@
 othersUpdatesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
 othersDeletesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
 othersInsertsAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+Test the metadata calls related to visibility of *own* changes for different resultset types
+ownUpdatesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
+ownDeletesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
+ownInsertsAreVisible(ResultSet.TYPE_FORWARD_ONLY)? false
+Scroll insensitive ResultSet see updates and deletes, but not inserts
+ownUpdatesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? true
+ownDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? true
+ownInsertsAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+Derby does not yet implement scroll sensitive resultsets and hence following metadata calls return false
+ownUpdatesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+ownDeletesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+ownInsertsAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+Test the metadata calls related to detectability of visible changes for different resultset types
+Expect true for updates and deletes of TYPE_SCROLL_INSENSITIVE, all others should be false
+updatesAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
+deletesAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
+insertsAreDetected(ResultSet.TYPE_FORWARD_ONLY)? false
+updatesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? true
+deletesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? true
+insertsAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
+updatesAreDetected(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+deletesAreDetected(ResultSet.TYPE_SCROLL_SENSITIVE)? false
+insertsAreDetected(ResultSet.TYPE_SCROLL_SENSITIVE)? false
 SupportsResultSetConcurrency: TYPE_FORWARD_ONLY,CONCUR_READ_ONLY: true
 SupportsResultSetConcurrency: TYPE_FORWARD_ONLY,CONCUR_UPDATABLE: true
 SupportsResultSetConcurrency: TYPE_SCROLL_INSENSITIVE,CONCUR_READ_ONLY: true
-SupportsResultSetConcurrency: TYPE_SCROLL_INSENSITIVE,CONCUR_UPDATABLE: false
+SupportsResultSetConcurrency: TYPE_SCROLL_INSENSITIVE,CONCUR_UPDATABLE: true
 SupportsResultSetConcurrency: TYPE_SCROLL_SENSITIVE,CONCUR_READ_ONLY: false
 SupportsResultSetConcurrency: TYPE_SCROLL_SENSITIVE,CONCUR_UPDATABLE: false
 getConnection(): same connection

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/scrollCursors2.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/scrollCursors2.out?rev=389202&r1=389201&r2=389202&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/scrollCursors2.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/scrollCursors2.out Mon Mar 27 09:16:22 2006
@@ -1,12 +1,7 @@
 Test scrollCurors2 starting
 warning = SQL Warning: Scroll sensitive cursors are not currently implemented.
 warning = SQL Warning: Scroll sensitive cursors are not currently implemented.
-warning = SQL Warning: Scroll sensitive and scroll insensitive updatable ResultSets are not currently implemented.
-warning = SQL Warning: Scroll sensitive and scroll insensitive updatable ResultSets are not currently implemented.
-warning = SQL Warning: Scroll sensitive and scroll insensitive updatable ResultSets are not currently implemented.
 warning = SQL Warning: Scroll sensitive cursors are not currently implemented.
 warning = SQL Warning: Scroll sensitive cursors are not currently implemented.
-warning = SQL Warning: Scroll sensitive and scroll insensitive updatable ResultSets are not currently implemented.
-warning = SQL Warning: Scroll sensitive and scroll insensitive updatable ResultSets are not currently implemented.
 PASS
 Test scrollCursors2 finished



Mime
View raw message