db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davi...@apache.org
Subject svn commit: r405205 - in /db/derby/code/trunk/java: build/org/apache/derbyBuild/ client/org/apache/derby/client/am/ engine/org/apache/derby/loc/ shared/org/apache/derby/shared/common/reference/ testing/org/apache/derbyTesting/functionTests/master/Derby...
Date Mon, 08 May 2006 22:38:59 GMT
Author: davidvc
Date: Mon May  8 15:38:56 2006
New Revision: 405205

URL: http://svn.apache.org/viewcvs?rev=405205&view=rev
Log:
DERBY-1266 - Attempted deleteRow or updateRow while on insert row gives wrong error message.
 Passes derbynetclientmats and jdbc40 test suite.


Modified:
    db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.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/DerbyNetClient/jdk14/updatableResultSet.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/updatableResultSet.out

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java?rev=405205&r1=405204&r2=405205&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java Mon May  8 15:38:56
2006
@@ -83,7 +83,7 @@
         clientMessageIds.add(SQLState.NUMBER_OF_ROWS_TOO_LARGE_FOR_INT);
         clientMessageIds.add(SQLState.NOGETCONN_ON_CLOSED_POOLED_CONNECTION);
         clientMessageIds.add(SQLState.LOB_METHOD_ON_CLOSED_CONNECTION);
-	clientMessageIds.add(SQLState.QUERY_NOT_QUALIFIED_FOR_UPDATABLE_RESULTSET);
+        clientMessageIds.add(SQLState.QUERY_NOT_QUALIFIED_FOR_UPDATABLE_RESULTSET);
         clientMessageIds.add(SQLState.LANG_INVALID_CALL_TO_EXECUTE_UPDATE);
         clientMessageIds.add(SQLState.LANG_CANT_INVALIDATE_OPEN_RESULT_SET);
         clientMessageIds.add(SQLState.YEAR_EXCEEDS_MAXIMUM);
@@ -104,6 +104,7 @@
         clientMessageIds.add(SQLState.SECMECH_NOT_SUPPORTED);
         clientMessageIds.add(SQLState.DRDA_COMMAND_NOT_IMPLEMENTED);
         clientMessageIds.add(SQLState.JDBC_DRIVER_REGISTER);
+        clientMessageIds.add(SQLState.NO_CURRENT_ROW);
     }
 
 	public static void main(String[] args) throws Exception {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java?rev=405205&r1=405204&r2=405205&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java Mon May  8 15:38:56
2006
@@ -3483,7 +3483,7 @@
         
         if (isOnInsertRow_) {
             throw new SqlException(agent_.logWriter_, 
-                new ClientMessageId(SQLState.CURSOR_NOT_POSITIONED_ON_INSERT_ROW));
+                new ClientMessageId(SQLState.NO_CURRENT_ROW));
         }
 
         //if not on a valid row, then do not accept updateXXX calls
@@ -3609,7 +3609,7 @@
 
         if (isOnInsertRow_) {
             throw new SqlException(agent_.logWriter_, 
-                new ClientMessageId(SQLState.CURSOR_NOT_POSITIONED_ON_INSERT_ROW));
+                new ClientMessageId(SQLState.NO_CURRENT_ROW));
         }
 
         if (preparedStatementForDelete_ == null) {
@@ -3655,7 +3655,7 @@
 	checkForUpdatableResultSet("refreshRow");
         if (isBeforeFirstX() || isAfterLastX() || isOnInsertRow_) {
             throw new SqlException(agent_.logWriter_,
-                new ClientMessageId(SQLState.CURSOR_CANNOT_INVOKE_ON_INSROW_OR_INVALIDROW_OR_READONLY));
+                new ClientMessageId(SQLState.NO_CURRENT_ROW));
         }
 	
         // this method does nothing if ResultSet is TYPE_SCROLL_INSENSITIVE

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=405205&r1=405204&r2=405205&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 May  8
15:38:56 2006
@@ -1193,7 +1193,6 @@
 XJ116.S=No more than {0} commands may be added to a single batch.
 XJ117.S=Batching of queries not allowed by J2EE compliance.
 XJ118.S=Query batch requested on a non-query statement.
-XJ120.S=This method cannot be invoked while the cursor is on the insert row, if the cursor
is not on a valid row, or if this ResultSet object has a concurrency of CONCUR_READ_ONLY.
 XJ121.S=Invalid operation at current cursor position.
 XJ122.S=No updateXXX methods were called on this row.
 XJ123.S=This method must be called to update values in the current row or the insert row.

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=405205&r1=405204&r2=405205&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 May  8 15:38:56 2006
@@ -1488,7 +1488,6 @@
     String TOO_MANY_COMMANDS_FOR_BATCH = "XJ116.S";
     String CANNOT_BATCH_QUERIES = "XJ117.S";
     String QUERY_BATCH_ON_NON_QUERY_STATEMENT = "XJ118.S";
-    String CURSOR_CANNOT_INVOKE_ON_INSROW_OR_INVALIDROW_OR_READONLY = "XJ120.S";
     String CURSOR_INVALID_OPERATION_AT_CURRENT_POSITION = "XJ121.S";
     String CURSOR_NO_UPDATE_CALLS_ON_CURRENT_ROW = "XJ122.S";
     String CURSOR_NOT_ON_CURRENT_OR_INSERT_ROW = "XJ123.S";

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/updatableResultSet.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/updatableResultSet.out?rev=405205&r1=405204&r2=405205&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/updatableResultSet.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/updatableResultSet.out
Mon May  8 15:38:56 2006
@@ -3167,11 +3167,11 @@
 Got expected exception: Column 'C41'  cannot accept a NULL value.
 Negative Test 39 - run updateRow and deleterow when positioned at insertRow
 Negative Test 39.a - run updateRow on insertRow
-SQL State: XJ086
-Got expected exception: This method cannot be invoked while the cursor is not on the insert
row or if the concurrency of this ResultSet object is CONCUR_READ_ONLY.
+SQL State: 24000
+Got expected exception: Invalid cursor state - no current row.
 Negative Test 39.a - run deleteRow on insertRow
-SQL State: XJ086
-Got expected exception: This method cannot be invoked while the cursor is not on the insert
row or if the concurrency of this ResultSet object is CONCUR_READ_ONLY.
+SQL State: 24000
+Got expected exception: Invalid cursor state - no current row.
 Negative test 40 - Try to insert row from currentRow
 SQL State: XJ086
 Got expected exception: This method cannot be invoked while the cursor is not on the insert
row or if the concurrency of this ResultSet object is CONCUR_READ_ONLY.

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/updatableResultSet.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/updatableResultSet.out?rev=405205&r1=405204&r2=405205&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/updatableResultSet.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/updatableResultSet.out
Mon May  8 15:38:56 2006
@@ -2899,11 +2899,11 @@
 Got expected exception: Column 'C41'  cannot accept a NULL value.
 Negative Test 39 - run updateRow and deleterow when positioned at insertRow
 Negative Test 39.a - run updateRow on insertRow
-SQL State: XJ086
-Got expected exception: This method cannot be invoked while the cursor is not on the insert
row or if the concurrency of this ResultSet object is CONCUR_READ_ONLY.
+SQL State: 24000
+Got expected exception: Invalid cursor state - no current row.
 Negative Test 39.a - run deleteRow on insertRow
-SQL State: XJ086
-Got expected exception: This method cannot be invoked while the cursor is not on the insert
row or if the concurrency of this ResultSet object is CONCUR_READ_ONLY.
+SQL State: 24000
+Got expected exception: Invalid cursor state - no current row.
 Negative test 40 - Try to insert row from currentRow
 SQL State: XJ086
 Got expected exception: This method cannot be invoked while the cursor is not on the insert
row or if the concurrency of this ResultSet object is CONCUR_READ_ONLY.



Mime
View raw message