You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by be...@apache.org on 2006/04/21 14:12:43 UTC
svn commit: r395866 [2/2] - in /db/derby/code/trunk/java:
build/org/apache/derbyBuild/ client/org/apache/derby/client/am/
client/org/apache/derby/client/net/ drda/org/apache/derby/impl/drda/
engine/org/apache/derby/impl/sql/catalog/ engine/org/apache/d...
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk16/updatableResultSet.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk16/updatableResultSet.out?rev=395866&r1=395865&r2=395866&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk16/updatableResultSet.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk16/updatableResultSet.out Fri Apr 21 05:12:36 2006
@@ -1,62 +1,47 @@
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 01J11: Insensitive updatable result sets are not supported by server; remapping to insensitive read-only cursor
-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
-othersDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
-deletesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
-JDBC 2.0 updatable resultset api will fail on this resultset because this is not an updatable resultset
-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 : 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.
-Negative Test2 - request for scroll sensitive updatable resultset will give a read only scroll insensitive resultset
+This test has been removed because scrollable insensitive updatable result sets have been implemented.
+Negative Test2 - request for scroll sensitive updatable resultset will give an updatable scroll insensitive resultset
WARNING 01J10: Scroll sensitive result sets are not supported by server; remapping to forward-only cursor
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
-JDBC 2.0 updatable resultset api will fail on this resultset because this is not an updatable resultset
-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 : 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.
+Make sure that we got CONCUR_UPDATABLE? true
+Rest of the test removed because scrollable insensitive updatable result sets have been implemented.
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.
-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 : XJ083
+Got expected exception 'deleteRow' not allowed because the ResultSet is not an updatable ResultSet.
Now attempting to send an updateRow on a read only resultset.
-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 : XJ083
+Got expected exception 'updateRow' not allowed because the ResultSet is not an updatable ResultSet.
Negative Test4 - request a read only resultset and send a sql with FOR UPDATE clause and attempt deleteRow/updateRow on it
Make sure that we got CONCUR_READ_ONLY? true
Now attempting to send a deleteRow on a read only resultset with FOR UPDATE clause in the SELECT sql.
-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 : XJ083
+Got expected exception 'deleteRow' not allowed because the ResultSet is not an updatable ResultSet.
Now attempting to send a updateRow on a read only resultset with FOR UPDATE clause in the SELECT sql.
-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 : XJ083
+Got expected exception 'updateRow' not allowed because the ResultSet is not an updatable ResultSet.
Negative Test5 - request resultset with no FOR UPDATE clause and CONCUR_READ_ONLY
Make sure that we got CONCUR_READ_ONLY? true
Now attempting to send a delete on a sql with no FOR UPDATE clause and CONCUR_READ_ONLY.
-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 : XJ083
+Got expected exception 'deleteRow' not allowed because the ResultSet is not an updatable ResultSet.
Now attempting to send a updateRow on a sql with no FOR UPDATE clause and CONCUR_READ_ONLY.
-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 : XJ083
+Got expected exception 'updateRow' not allowed because the ResultSet is not an updatable ResultSet.
Negative Test6 - request updatable resultset for sql with FOR READ ONLY clause
Make sure that we got CONCUR_READ_ONLY? true
Jira issue Derby-159 : Warnings raised by Derby are not getting passed to the Client in Network Server Mode
-Will see the warnings in embedded mode only
+WARNING 01J06: ResultSet not updatable. Query does not qualify to generate an updatable ResultSet.
Now attempting to send a delete on a sql with FOR READ ONLY clause.
-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 : XJ083
+Got expected exception 'deleteRow' not allowed because the ResultSet is not an updatable ResultSet.
Now attempting to send a updateRow on a sql with FOR READ ONLY clause.
-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 : XJ083
+Got expected exception 'updateRow' not allowed because the ResultSet is not an updatable ResultSet.
Negative Test7 - attempt to deleteRow & updateRow on updatable resultset when the resultset is not positioned on a row
Make sure that we got CONCUR_UPDATABLE? true
Now attempt a deleteRow without first doing next on the resultset.
@@ -520,71 +505,71 @@
SQL State : XJ121
Got expected exception Invalid operation at current cursor position.
Positive Test18 - Test cancelRowUpdates method as the first updatable ResultSet api on a read-only resultset
-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 : XJ083
+Got expected exception 'cancelRowUpdates' not allowed because the ResultSet is not an updatable ResultSet.
Positive Test19 - Test updateRow method as the first updatable ResultSet api on a read-only resultset
- 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.
+ Got expected exception : 'updateRow' not allowed because the ResultSet is not an updatable ResultSet.
Positive Test20 - Test updateXXX methods as the first updatable ResultSet api on a read-only resultset
Test updateShort on a readonly resultset
Using column position as first parameter to updateShort
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateShort' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateShort
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateShort' not allowed because the ResultSet is not an updatable ResultSet.
Test updateInt on a readonly resultset
Using column position as first parameter to updateInt
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateInt' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateInt
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateInt' not allowed because the ResultSet is not an updatable ResultSet.
Test updateLong on a readonly resultset
Using column position as first parameter to updateLong
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateLong' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateLong
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateLong' not allowed because the ResultSet is not an updatable ResultSet.
Test updateBigDecimal on a readonly resultset
Using column position as first parameter to updateBigDecimal
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateBigDecimal' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateBigDecimal
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateBigDecimal' not allowed because the ResultSet is not an updatable ResultSet.
Test updateFloat on a readonly resultset
Using column position as first parameter to updateFloat
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateFloat' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateFloat
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateFloat' not allowed because the ResultSet is not an updatable ResultSet.
Test updateDouble on a readonly resultset
Using column position as first parameter to updateDouble
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateDouble' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateDouble
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateDouble' not allowed because the ResultSet is not an updatable ResultSet.
Test updateString on a readonly resultset
Using column position as first parameter to updateString
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateString' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateString
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateString' not allowed because the ResultSet is not an updatable ResultSet.
Test updateAsciiStream on a readonly resultset
Using column position as first parameter to updateAsciiStream
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateAsciiStream' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateAsciiStream
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateAsciiStream' not allowed because the ResultSet is not an updatable ResultSet.
Test updateCharacterStream on a readonly resultset
Using column position as first parameter to updateCharacterStream
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateCharacterStream' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateCharacterStream
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateCharacterStream' not allowed because the ResultSet is not an updatable ResultSet.
Test updateByte on a readonly resultset
Using column position as first parameter to updateByte
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateByte' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateByte
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateByte' not allowed because the ResultSet is not an updatable ResultSet.
Test updateBytes on a readonly resultset
Using column position as first parameter to updateBytes
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateBytes' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateBytes
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateBytes' not allowed because the ResultSet is not an updatable ResultSet.
Test updateBinaryStream on a readonly resultset
Using column position as first parameter to updateBinaryStream
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateBinaryStream' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateBinaryStream
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateBinaryStream' not allowed because the ResultSet is not an updatable ResultSet.
Test updateClob on a readonly resultset
Using column position as first parameter to updateClob
Got expected exception : JDBC 3 method called - not yet supported
@@ -592,19 +577,19 @@
Got expected exception : JDBC 3 method called - not yet supported
Test updateDate on a readonly resultset
Using column position as first parameter to updateDate
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateDate' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateDate
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateDate' not allowed because the ResultSet is not an updatable ResultSet.
Test updateTime on a readonly resultset
Using column position as first parameter to updateTime
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateTime' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateTime
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateTime' not allowed because the ResultSet is not an updatable ResultSet.
Test updateTimestamp on a readonly resultset
Using column position as first parameter to updateTimestamp
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateTimestamp' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateTimestamp
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateTimestamp' not allowed because the ResultSet is not an updatable ResultSet.
Test updateBlob on a readonly resultset
Using column position as first parameter to updateBlob
Got expected exception : JDBC 3 method called - not yet supported
@@ -612,14 +597,14 @@
Got expected exception : JDBC 3 method called - not yet supported
Test updateBoolean on a readonly resultset
Using column position as first parameter to updateBoolean
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateBoolean' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateBoolean
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateBoolean' not allowed because the ResultSet is not an updatable ResultSet.
Test updateNull on a readonly resultset
Using column position as first parameter to updateNull
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateNull' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateNull
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateNull' not allowed because the ResultSet is not an updatable ResultSet.
Test updateArray on a readonly resultset
Using column position as first parameter to updateArray
Got expected exception : JDBC 3 method called - not yet supported
@@ -3212,16 +3197,16 @@
Negative test 47 - insertRow and read-only RS
Negative test 47.a - try moveToInsertRow on read-only RS
SQL State: XJ083
-Got expected exception: 'moveToInsertRow()' not allowed because the ResultSet is not an updatable ResultSet.
+Got expected exception: 'moveToInsertRow' not allowed because the ResultSet is not an updatable ResultSet.
Negative test 47.b - try updateXXX on read-only RS
SQL State: XJ083
-Got expected exception: 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+Got expected exception: 'updateInt' not allowed because the ResultSet is not an updatable ResultSet.
Negative test 47.c - try insertRow on read-only RS
-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: XJ083
+Got expected exception: 'insertRow' not allowed because the ResultSet is not an updatable ResultSet.
Negative test 47.d - try moveToCurrentRow on read-only RS
SQL State: XJ083
-Got expected exception: 'moveToCurrentRow()' not allowed because the ResultSet is not an updatable ResultSet.
+Got expected exception: 'moveToCurrentRow' not allowed because the ResultSet is not an updatable ResultSet.
Positive test 48 - Test all updateXXX methods on all the supported sql datatypes
Next datatype to test is SMALLINT
Testing updateShort on SQL type SMALLINT
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=395866&r1=395865&r2=395866&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 Fri Apr 21 05:12:36 2006
@@ -271,8 +271,8 @@
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
+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
@@ -283,8 +283,8 @@
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
+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
@@ -292,7 +292,7 @@
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/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=395866&r1=395865&r2=395866&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 Fri Apr 21 05:12:36 2006
@@ -301,8 +301,8 @@
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
+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
@@ -313,8 +313,8 @@
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
+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
@@ -322,7 +322,7 @@
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/DerbyNetClient/resultset.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/resultset.out?rev=395866&r1=395865&r2=395866&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/resultset.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/resultset.out Fri Apr 21 05:12:36 2006
@@ -16,8 +16,9 @@
getPrecision(1): 10
getScale(1): 0
getColumnTypeName(1): INTEGER
-isReadOnly(1): true
-isDefinitelyWritable(1): false
+isReadOnly(1): false
+isWritable(1): Expected isWritable value
+isDefinitelyWritable(1): true
isAutoIncrement(2): false
isCaseSensitive(2): false
isSearchable(2): true
@@ -34,8 +35,9 @@
getPrecision(2): 5
getScale(2): 0
getColumnTypeName(2): SMALLINT
-isReadOnly(2): true
-isDefinitelyWritable(2): false
+isReadOnly(2): false
+isWritable(2): Expected isWritable value
+isDefinitelyWritable(2): true
isAutoIncrement(3): false
isCaseSensitive(3): false
isSearchable(3): true
@@ -52,8 +54,9 @@
getPrecision(3): 7
getScale(3): 0
getColumnTypeName(3): REAL
-isReadOnly(3): true
-isDefinitelyWritable(3): false
+isReadOnly(3): false
+isWritable(3): Expected isWritable value
+isDefinitelyWritable(3): true
isAutoIncrement(4): false
isCaseSensitive(4): false
isSearchable(4): true
@@ -70,8 +73,9 @@
getPrecision(4): 15
getScale(4): 0
getColumnTypeName(4): DOUBLE
-isReadOnly(4): true
-isDefinitelyWritable(4): false
+isReadOnly(4): false
+isWritable(4): Expected isWritable value
+isDefinitelyWritable(4): true
isAutoIncrement(5): false
isCaseSensitive(5): false
isSearchable(5): true
@@ -88,8 +92,9 @@
getPrecision(5): 10
getScale(5): 0
getColumnTypeName(5): DATE
-isReadOnly(5): true
-isDefinitelyWritable(5): false
+isReadOnly(5): false
+isWritable(5): Expected isWritable value
+isDefinitelyWritable(5): true
isAutoIncrement(6): false
isCaseSensitive(6): false
isSearchable(6): true
@@ -106,8 +111,9 @@
getPrecision(6): 8
getScale(6): 0
getColumnTypeName(6): TIME
-isReadOnly(6): true
-isDefinitelyWritable(6): false
+isReadOnly(6): false
+isWritable(6): Expected isWritable value
+isDefinitelyWritable(6): true
isAutoIncrement(7): false
isCaseSensitive(7): false
isSearchable(7): true
@@ -124,8 +130,9 @@
getPrecision(7): 26
getScale(7): 6
getColumnTypeName(7): TIMESTAMP
-isReadOnly(7): true
-isDefinitelyWritable(7): false
+isReadOnly(7): false
+isWritable(7): Expected isWritable value
+isDefinitelyWritable(7): true
isAutoIncrement(8): false
isCaseSensitive(8): true
isSearchable(8): true
@@ -142,8 +149,9 @@
getPrecision(8): 10
getScale(8): 0
getColumnTypeName(8): CHAR
-isReadOnly(8): true
-isDefinitelyWritable(8): false
+isReadOnly(8): false
+isWritable(8): Expected isWritable value
+isDefinitelyWritable(8): true
isAutoIncrement(9): false
isCaseSensitive(9): true
isSearchable(9): true
@@ -160,8 +168,9 @@
getPrecision(9): 40
getScale(9): 0
getColumnTypeName(9): VARCHAR
-isReadOnly(9): true
-isDefinitelyWritable(9): false
+isReadOnly(9): false
+isWritable(9): Expected isWritable value
+isDefinitelyWritable(9): true
isAutoIncrement(10): false
isCaseSensitive(10): false
isSearchable(10): true
@@ -178,8 +187,9 @@
getPrecision(10): 10
getScale(10): 2
getColumnTypeName(10): DECIMAL
-isReadOnly(10): true
-isDefinitelyWritable(10): false
+isReadOnly(10): false
+isWritable(10): Expected isWritable value
+isDefinitelyWritable(10): true
isAutoIncrement(11): false
isCaseSensitive(11): false
isSearchable(11): true
@@ -196,8 +206,9 @@
getPrecision(11): 19
getScale(11): 0
getColumnTypeName(11): BIGINT
-isReadOnly(11): true
-isDefinitelyWritable(11): false
+isReadOnly(11): false
+isWritable(11): Expected isWritable value
+isDefinitelyWritable(11): true
isAutoIncrement(12): false
isCaseSensitive(12): false
isSearchable(12): true
@@ -214,8 +225,9 @@
getPrecision(12): 10
getScale(12): 0
getColumnTypeName(12): CHAR FOR BIT DATA
-isReadOnly(12): true
-isDefinitelyWritable(12): false
+isReadOnly(12): false
+isWritable(12): Expected isWritable value
+isDefinitelyWritable(12): true
isAutoIncrement(13): false
isCaseSensitive(13): false
isSearchable(13): true
@@ -232,8 +244,9 @@
getPrecision(13): 10
getScale(13): 0
getColumnTypeName(13): VARCHAR FOR BIT DATA
-isReadOnly(13): true
-isDefinitelyWritable(13): false
+isReadOnly(13): false
+isWritable(13): Expected isWritable value
+isDefinitelyWritable(13): true
isAutoIncrement(14): false
isCaseSensitive(14): false
isSearchable(14): true
@@ -250,8 +263,9 @@
getPrecision(14): 32700
getScale(14): 0
getColumnTypeName(14): LONG VARCHAR FOR BIT DATA
-isReadOnly(14): true
-isDefinitelyWritable(14): false
+isReadOnly(14): false
+isWritable(14): Expected isWritable value
+isDefinitelyWritable(14): true
isAutoIncrement(15): false
isCaseSensitive(15): true
isSearchable(15): true
@@ -268,8 +282,9 @@
getPrecision(15): 2147483647
getScale(15): 0
getColumnTypeName(15): CLOB
-isReadOnly(15): true
-isDefinitelyWritable(15): false
+isReadOnly(15): false
+isWritable(15): Expected isWritable value
+isDefinitelyWritable(15): true
isAutoIncrement(16): false
isCaseSensitive(16): false
isSearchable(16): true
@@ -286,8 +301,9 @@
getPrecision(16): 1073741824
getScale(16): 0
getColumnTypeName(16): BLOB
-isReadOnly(16): true
-isDefinitelyWritable(16): false
+isReadOnly(16): false
+isWritable(16): Expected isWritable value
+isDefinitelyWritable(16): true
getBigDecimal(1,1): 1
beetle 5328 - JCC returns incorrect scale for getBigDecimal(String,int)
getBigDecimal(i,1): 1
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/scrollCursors2.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/scrollCursors2.out?rev=395866&r1=395865&r2=395866&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/scrollCursors2.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/scrollCursors2.out Fri Apr 21 05:12:36 2006
@@ -12,12 +12,9 @@
This method should only be called on ResultSet objects that are scrollable (type TYPE_SCROLL_SENSITIVE or TYPE_SCROLL_INSENSITIVE).
warning = java.sql.SQLWarning: Scroll sensitive result sets are not supported by server; remapping to forward-only cursor
warning = java.sql.SQLWarning: Scroll sensitive result sets are not supported by server; remapping to forward-only cursor
-warning = java.sql.SQLWarning: Insensitive updatable result sets are not supported by server; remapping to insensitive read-only cursor
-warning = java.sql.SQLWarning: Insensitive updatable result sets are not supported by server; remapping to insensitive read-only cursor
Invalid parameter value '-1' for Statement.setMaxRows(int maxRows). Parameter value must be >= 0.
Invalid parameter value '-5' for ResultSet.setFetchSize(int rows).
warning = java.sql.SQLWarning: Scroll sensitive result sets are not supported by server; remapping to forward-only cursor
warning = java.sql.SQLWarning: Scroll sensitive result sets are not supported by server; remapping to forward-only cursor
-warningCount expected to be 2, not 1
-warning = java.sql.SQLWarning: Insensitive updatable result sets are not supported by server; remapping to insensitive read-only cursor
+PASS
Test scrollCursors2 finished
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=395866&r1=395865&r2=395866&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 Fri Apr 21 05:12:36 2006
@@ -1,62 +1,47 @@
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 01J11: Insensitive updatable result sets are not supported by server; remapping to insensitive read-only cursor
-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
-othersDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
-deletesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? false
-JDBC 2.0 updatable resultset api will fail on this resultset because this is not an updatable resultset
-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 : 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.
-Negative Test2 - request for scroll sensitive updatable resultset will give a read only scroll insensitive resultset
+This test has been removed because scrollable insensitive updatable result sets have been implemented.
+Negative Test2 - request for scroll sensitive updatable resultset will give an updatable scroll insensitive resultset
WARNING 01J10: Scroll sensitive result sets are not supported by server; remapping to forward-only cursor
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
-JDBC 2.0 updatable resultset api will fail on this resultset because this is not an updatable resultset
-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 : 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.
+Make sure that we got CONCUR_UPDATABLE? true
+Rest of the test removed because scrollable insensitive updatable result sets have been implemented.
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.
-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 : XJ083
+Got expected exception 'deleteRow' not allowed because the ResultSet is not an updatable ResultSet.
Now attempting to send an updateRow on a read only resultset.
-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 : XJ083
+Got expected exception 'updateRow' not allowed because the ResultSet is not an updatable ResultSet.
Negative Test4 - request a read only resultset and send a sql with FOR UPDATE clause and attempt deleteRow/updateRow on it
Make sure that we got CONCUR_READ_ONLY? true
Now attempting to send a deleteRow on a read only resultset with FOR UPDATE clause in the SELECT sql.
-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 : XJ083
+Got expected exception 'deleteRow' not allowed because the ResultSet is not an updatable ResultSet.
Now attempting to send a updateRow on a read only resultset with FOR UPDATE clause in the SELECT sql.
-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 : XJ083
+Got expected exception 'updateRow' not allowed because the ResultSet is not an updatable ResultSet.
Negative Test5 - request resultset with no FOR UPDATE clause and CONCUR_READ_ONLY
Make sure that we got CONCUR_READ_ONLY? true
Now attempting to send a delete on a sql with no FOR UPDATE clause and CONCUR_READ_ONLY.
-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 : XJ083
+Got expected exception 'deleteRow' not allowed because the ResultSet is not an updatable ResultSet.
Now attempting to send a updateRow on a sql with no FOR UPDATE clause and CONCUR_READ_ONLY.
-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 : XJ083
+Got expected exception 'updateRow' not allowed because the ResultSet is not an updatable ResultSet.
Negative Test6 - request updatable resultset for sql with FOR READ ONLY clause
Make sure that we got CONCUR_READ_ONLY? true
Jira issue Derby-159 : Warnings raised by Derby are not getting passed to the Client in Network Server Mode
-Will see the warnings in embedded mode only
+WARNING 01J06: ResultSet not updatable. Query does not qualify to generate an updatable ResultSet.
Now attempting to send a delete on a sql with FOR READ ONLY clause.
-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 : XJ083
+Got expected exception 'deleteRow' not allowed because the ResultSet is not an updatable ResultSet.
Now attempting to send a updateRow on a sql with FOR READ ONLY clause.
-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 : XJ083
+Got expected exception 'updateRow' not allowed because the ResultSet is not an updatable ResultSet.
Negative Test7 - attempt to deleteRow & updateRow on updatable resultset when the resultset is not positioned on a row
Make sure that we got CONCUR_UPDATABLE? true
Now attempt a deleteRow without first doing next on the resultset.
@@ -520,102 +505,102 @@
SQL State : XJ121
Got expected exception Invalid operation at current cursor position.
Positive Test18 - Test cancelRowUpdates method as the first updatable ResultSet api on a read-only resultset
-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 : XJ083
+Got expected exception 'cancelRowUpdates' not allowed because the ResultSet is not an updatable ResultSet.
Positive Test19 - Test updateRow method as the first updatable ResultSet api on a read-only resultset
- 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.
+ Got expected exception : 'updateRow' not allowed because the ResultSet is not an updatable ResultSet.
Positive Test20 - Test updateXXX methods as the first updatable ResultSet api on a read-only resultset
Test updateShort on a readonly resultset
Using column position as first parameter to updateShort
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateShort' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateShort
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateShort' not allowed because the ResultSet is not an updatable ResultSet.
Test updateInt on a readonly resultset
Using column position as first parameter to updateInt
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateInt' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateInt
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateInt' not allowed because the ResultSet is not an updatable ResultSet.
Test updateLong on a readonly resultset
Using column position as first parameter to updateLong
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateLong' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateLong
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateLong' not allowed because the ResultSet is not an updatable ResultSet.
Test updateBigDecimal on a readonly resultset
Using column position as first parameter to updateBigDecimal
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateBigDecimal' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateBigDecimal
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateBigDecimal' not allowed because the ResultSet is not an updatable ResultSet.
Test updateFloat on a readonly resultset
Using column position as first parameter to updateFloat
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateFloat' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateFloat
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateFloat' not allowed because the ResultSet is not an updatable ResultSet.
Test updateDouble on a readonly resultset
Using column position as first parameter to updateDouble
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateDouble' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateDouble
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateDouble' not allowed because the ResultSet is not an updatable ResultSet.
Test updateString on a readonly resultset
Using column position as first parameter to updateString
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateString' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateString
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateString' not allowed because the ResultSet is not an updatable ResultSet.
Test updateAsciiStream on a readonly resultset
Using column position as first parameter to updateAsciiStream
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateAsciiStream' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateAsciiStream
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateAsciiStream' not allowed because the ResultSet is not an updatable ResultSet.
Test updateCharacterStream on a readonly resultset
Using column position as first parameter to updateCharacterStream
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateCharacterStream' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateCharacterStream
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateCharacterStream' not allowed because the ResultSet is not an updatable ResultSet.
Test updateByte on a readonly resultset
Using column position as first parameter to updateByte
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateByte' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateByte
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateByte' not allowed because the ResultSet is not an updatable ResultSet.
Test updateBytes on a readonly resultset
Using column position as first parameter to updateBytes
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateBytes' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateBytes
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateBytes' not allowed because the ResultSet is not an updatable ResultSet.
Test updateBinaryStream on a readonly resultset
Using column position as first parameter to updateBinaryStream
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateBinaryStream' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateBinaryStream
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateBinaryStream' not allowed because the ResultSet is not an updatable ResultSet.
Test updateClob on a readonly resultset
Using column position as first parameter to updateClob
Using column name as first parameter to updateClob
Test updateDate on a readonly resultset
Using column position as first parameter to updateDate
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateDate' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateDate
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateDate' not allowed because the ResultSet is not an updatable ResultSet.
Test updateTime on a readonly resultset
Using column position as first parameter to updateTime
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateTime' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateTime
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateTime' not allowed because the ResultSet is not an updatable ResultSet.
Test updateTimestamp on a readonly resultset
Using column position as first parameter to updateTimestamp
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateTimestamp' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateTimestamp
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateTimestamp' not allowed because the ResultSet is not an updatable ResultSet.
Test updateBlob on a readonly resultset
Using column position as first parameter to updateBlob
Using column name as first parameter to updateBlob
Test updateBoolean on a readonly resultset
Using column position as first parameter to updateBoolean
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateBoolean' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateBoolean
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateBoolean' not allowed because the ResultSet is not an updatable ResultSet.
Test updateNull on a readonly resultset
Using column position as first parameter to updateNull
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateNull' not allowed because the ResultSet is not an updatable ResultSet.
Using column name as first parameter to updateNull
- Got expected exception : 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+ Got expected exception : 'updateNull' not allowed because the ResultSet is not an updatable ResultSet.
Test updateArray on a readonly resultset
Using column position as first parameter to updateArray
Using column name as first parameter to updateArray
@@ -2944,16 +2929,16 @@
Negative test 47 - insertRow and read-only RS
Negative test 47.a - try moveToInsertRow on read-only RS
SQL State: XJ083
-Got expected exception: 'moveToInsertRow()' not allowed because the ResultSet is not an updatable ResultSet.
+Got expected exception: 'moveToInsertRow' not allowed because the ResultSet is not an updatable ResultSet.
Negative test 47.b - try updateXXX on read-only RS
SQL State: XJ083
-Got expected exception: 'updateXXX' not allowed because the ResultSet is not an updatable ResultSet.
+Got expected exception: 'updateInt' not allowed because the ResultSet is not an updatable ResultSet.
Negative test 47.c - try insertRow on read-only RS
-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: XJ083
+Got expected exception: 'insertRow' not allowed because the ResultSet is not an updatable ResultSet.
Negative test 47.d - try moveToCurrentRow on read-only RS
SQL State: XJ083
-Got expected exception: 'moveToCurrentRow()' not allowed because the ResultSet is not an updatable ResultSet.
+Got expected exception: 'moveToCurrentRow' not allowed because the ResultSet is not an updatable ResultSet.
Positive test 48 - Test all updateXXX methods on all the supported sql datatypes
Next datatype to test is SMALLINT
Testing updateShort on SQL type SMALLINT
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=395866&r1=395865&r2=395866&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 Fri Apr 21 05:12:36 2006
@@ -1,25 +1,13 @@
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
-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? false
-ownDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? true
-othersDeletesAreVisible(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
-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
+This test has been removed because scrollable insensitive updatable result sets have been implemented.
+Negative Test2 - request for scroll sensitive updatable resultset will give an updatable scroll insensitive resultset
WARNING 01J02: Scroll sensitive cursors 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? false
-JDBC 2.0 updatable resultset api will fail on this resultset because this 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.
+Make sure that we got CONCUR_UPDATABLE? true
+Rest of the test removed because scrollable insensitive updatable result sets have been implemented.
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.
@@ -47,7 +35,6 @@
Negative Test6 - request updatable resultset for sql with FOR READ ONLY clause
Make sure that we got CONCUR_READ_ONLY? true
Jira issue Derby-159 : Warnings raised by Derby are not getting passed to the Client in Network Server Mode
-Will see the warnings in embedded mode only
WARNING 01J06: ResultSet not updatable. Query does not qualify to generate an updatable ResultSet.
Now attempting to send a delete on a sql with FOR READ ONLY clause.
SQL State : XJ083
@@ -151,7 +138,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 'SQLCUR6' is not on a row.
+Got expected exception Cursor 'SQLCUR4' 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
@@ -302,7 +289,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 'SQLCUR19'.
+Got expected exception Column 'C2' is not in the FOR UPDATE list of cursor 'SQLCUR17'.
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
@@ -313,7 +300,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 'SQLCUR21'.
+Got expected exception Column 'COL2' is not in the FOR UPDATE list of cursor 'SQLCUR19'.
Table t1 has following rows
C1,C2
-- --
@@ -324,7 +311,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 'SQLCUR23' is not on a row.
+Got expected exception Cursor 'SQLCUR21' 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.
@@ -3065,7 +3052,7 @@
{2,bb }
{3,cc }
SQL State : 42X31
-Got expected exception Column 'C2' is not in the FOR UPDATE list of cursor 'SQLCUR41'.
+Got expected exception Column 'C2' is not in the FOR UPDATE list of cursor 'SQLCUR39'.
updateRow passed
Make sure the contents of table are unchanged
C1,C2
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/updatableResultSet.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/updatableResultSet.out?rev=395866&r1=395865&r2=395866&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/updatableResultSet.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/updatableResultSet.out Fri Apr 21 05:12:36 2006
@@ -1,25 +1,13 @@
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
-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? false
-ownDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? true
-othersDeletesAreVisible(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
-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
+This test has been removed because scrollable insensitive updatable result sets have been implemented.
+Negative Test2 - request for scroll sensitive updatable resultset will give an updatable scroll insensitive resultset
WARNING 01J02: Scroll sensitive cursors 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? false
-JDBC 2.0 updatable resultset api will fail on this resultset because this 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.
+Make sure that we got CONCUR_UPDATABLE? true
+Rest of the test removed because scrollable insensitive updatable result sets have been implemented.
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.
@@ -47,7 +35,6 @@
Negative Test6 - request updatable resultset for sql with FOR READ ONLY clause
Make sure that we got CONCUR_READ_ONLY? true
Jira issue Derby-159 : Warnings raised by Derby are not getting passed to the Client in Network Server Mode
-Will see the warnings in embedded mode only
WARNING 01J06: ResultSet not updatable. Query does not qualify to generate an updatable ResultSet.
Now attempting to send a delete on a sql with FOR READ ONLY clause.
SQL State : XJ083
@@ -151,7 +138,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 'SQLCUR6' is not on a row.
+Got expected exception Cursor 'SQLCUR4' 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
@@ -302,7 +289,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 'SQLCUR19'.
+Got expected exception Column 'C2' is not in the FOR UPDATE list of cursor 'SQLCUR17'.
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
@@ -313,7 +300,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 'SQLCUR21'.
+Got expected exception Column 'COL2' is not in the FOR UPDATE list of cursor 'SQLCUR19'.
Table t1 has following rows
C1,C2
-- --
@@ -324,7 +311,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 'SQLCUR23' is not on a row.
+Got expected exception Cursor 'SQLCUR21' 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.
@@ -2791,7 +2778,7 @@
{2,bb }
{3,cc }
SQL State : 42X31
-Got expected exception Column 'C2' is not in the FOR UPDATE list of cursor 'SQLCUR41'.
+Got expected exception Column 'C2' is not in the FOR UPDATE list of cursor 'SQLCUR39'.
updateRow passed
Make sure the contents of table are unchanged
C1,C2
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClient.exclude
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClient.exclude?rev=395866&r1=395865&r2=395866&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClient.exclude (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClient.exclude Fri Apr 21 05:12:36 2006
@@ -25,7 +25,6 @@
largedata/LobLimits.java
jdbc4/TestDbMetaData.java
jdbc4/TestJDBC40Exception.java
-jdbcapi/SURTest.junit
#Tests BrokeredConnection class which is presnt only on the embedded side
jdbc4/EmbeddedBrokeredConnectionWrapperTest.junit
#temporarily disable checkDataSourceTests with client
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/HoldabilityTest.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/HoldabilityTest.java?rev=395866&r1=395865&r2=395866&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/HoldabilityTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/HoldabilityTest.java Fri Apr 21 05:12:36 2006
@@ -258,8 +258,8 @@
ResultSet rs = s.executeQuery(selectStatement);
if (rs.getConcurrency()==ResultSet.CONCUR_READ_ONLY) {
- println("Test disabled");
- return;
+ assertTrue("ResultSet concurrency downgraded to CONCUR_READ_ONLY",
+ false);
}
con.commit(); // scan initialized
@@ -278,9 +278,9 @@
ResultSet.CONCUR_UPDATABLE);
ResultSet rs = s.executeQuery(selectStatement);
if (rs.getConcurrency()==ResultSet.CONCUR_READ_ONLY) {
- println("Test disabled");
- return;
- }
+ assertTrue("ResultSet concurrency downgraded to CONCUR_READ_ONLY",
+ false);
+ }
for (int i=0; i<this.recordCount/2; i++) {
rs.next();
verifyTuple(rs);
@@ -305,8 +305,8 @@
ResultSet rs = s.executeQuery(selectStatement);
if (rs.getConcurrency()==ResultSet.CONCUR_READ_ONLY) {
- println("Test disabled");
- return;
+ assertTrue("ResultSet concurrency downgraded to CONCUR_READ_ONLY",
+ false);
}
scrollForward(rs); // Scan is done
@@ -328,8 +328,8 @@
ResultSet rs = s.executeQuery(selectStatement);
if (rs.getConcurrency()==ResultSet.CONCUR_READ_ONLY) {
- println("Test disabled");
- return;
+ assertTrue("ResultSet concurrency downgraded to CONCUR_READ_ONLY",
+ false);
}
rs.next();
con.commit();
@@ -355,8 +355,8 @@
ResultSet rs = s.executeQuery(selectStatement);
if (rs.getConcurrency()==ResultSet.CONCUR_READ_ONLY) {
- println("Test disabled");
- return;
+ assertTrue("ResultSet concurrency downgraded to CONCUR_READ_ONLY",
+ false);
}
rs.next();
con.commit();
@@ -384,8 +384,8 @@
ResultSet rs = s.executeQuery(selectStatement);
if (rs.getConcurrency()==ResultSet.CONCUR_READ_ONLY) {
- println("Test disabled");
- return;
+ assertTrue("ResultSet concurrency downgraded to CONCUR_READ_ONLY",
+ false);
}
con.commit(); // commit
@@ -406,8 +406,8 @@
ResultSet.CONCUR_UPDATABLE);
ResultSet rs = s.executeQuery(selectStatement);
if (rs.getConcurrency()==ResultSet.CONCUR_READ_ONLY) {
- println("Test disabled");
- return;
+ assertTrue("ResultSet concurrency downgraded to CONCUR_READ_ONLY",
+ false);
}
rs.next(); // Scan is in progress.
@@ -429,8 +429,8 @@
ResultSet.CONCUR_UPDATABLE);
ResultSet rs = s.executeQuery(selectStatement);
if (rs.getConcurrency()==ResultSet.CONCUR_READ_ONLY) {
- println("Test disabled");
- return;
+ assertTrue("ResultSet concurrency downgraded to CONCUR_READ_ONLY",
+ false);
}
scrollForward(rs); // scan is done
@@ -547,10 +547,7 @@
rs.updateInt(2, -100);
rs.updateRow();
SQLWarning warn = rs.getWarnings();
- assertNotNull("Expected warning when updating deleted tuple", warn);
- assertEquals("Unexpected SQL State on warning",
- CURSOR_OPERATION_CONFLICT,
- warn.getSQLState());
+ assertWarning(warn, CURSOR_OPERATION_CONFLICT);
rs.clearWarnings();
// Update first tuple
@@ -558,10 +555,7 @@
rs.updateInt(2, -100);
updateTuple(rs);
warn = rs.getWarnings();
- assertNotNull("Expected warning when updating deleted tuple", warn);
- assertEquals("Unexpected SQL State on warning",
- CURSOR_OPERATION_CONFLICT,
- warn.getSQLState());
+ assertWarning(warn, CURSOR_OPERATION_CONFLICT);
con.commit();
// Verify data
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURBaseTest.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURBaseTest.java?rev=395866&r1=395865&r2=395866&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURBaseTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURBaseTest.java Fri Apr 21 05:12:36 2006
@@ -18,7 +18,6 @@
* language governing permissions and limitations under the License.
*/
package org.apache.derbyTesting.functionTests.tests.jdbcapi;
-import org.apache.derbyTesting.functionTests.util.TestUtil;
import org.apache.derbyTesting.functionTests.util.BaseJDBCTestCase;
import junit.framework.*;
import java.sql.*;
@@ -274,6 +273,22 @@
failedCorrect);
}
+ /**
+ * Assert that a warning was received
+ */
+ protected void assertWarning(SQLWarning warn, String sqlState)
+ throws SQLException
+ {
+ if (warn!=null || usingEmbedded()) {
+ assertEquals("Unexpected SQL state",
+ sqlState,
+ warn.getSQLState());
+ } else {
+ println("Expected warning with SQLState = '" + sqlState +
+ "', however warning not propagated to client driver");
+ }
+ }
+
protected Connection con = null; // Connection established in setUp()
final int recordCount;
@@ -288,4 +303,5 @@
final static String LOCK_TIMEOUT_EXPRESSION_SQL_STATE = "38000";
final static String INVALID_CURSOR_STATE_NO_CURRENT_ROW = "24000";
final static String CURSOR_OPERATION_CONFLICT = "01001";
+ final static String QUERY_NOT_QUALIFIED_FOR_UPDATABLE_RESULTSET = "01J06";
}
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURQueryMixTest.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURQueryMixTest.java?rev=395866&r1=395865&r2=395866&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURQueryMixTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURQueryMixTest.java Fri Apr 21 05:12:36 2006
@@ -133,7 +133,8 @@
deleteRandomSampleOfNRecords(rs, rows, deletedRows, 10);
testNavigation(rs, rows, updatedRows, deletedRows);
} else {
- println("Skipped testing updatability");
+ assertTrue("ResultSet concurrency downgraded to CONCUR_READ_ONLY",
+ false);
}
rs.close();
@@ -339,11 +340,15 @@
/**
- * Tests navigation in ResultSet. This test requires that the ResultSet
- * is not empty, and positioned before the first row. Also the
- * ResultSet needs to contain column a or column id as the first column from
- * the SURDataModel (for checksum test)
- * @return a Map with all rows in the resultset (concatnated as a string)
+ * Tests navigation in ResultSet.
+ * @param ResultSet rs ResultSet to test navigation of.
+ * Needs to be scrollable
+ * @param Map rows a sample of the rows which are in the ResultSet. Maps
+ * position to a concatenation of the string values
+ * @param Set updatedRows a integer set of which rows that have been
+ * updated. Used to test rowUpdated()
+ * @param Set deletedRows a integer set of which rows that have been
+ * deleted. Used to test rowDeleted()
*/
private void testNavigation(final ResultSet rs, final Map rows,
final Set updatedRows, final Set deletedRows)
@@ -359,7 +364,8 @@
"forward.", rows.get(new Integer(i)), rowString);
- if (checkRowUpdated && updatedRows.contains(new Integer(i))) {
+ if (checkRowUpdated && updatedRows.contains(new Integer(i)) &&
+ !deletedRows.contains(new Integer(i))) {
assertTrue("Expected rs.rowUpdated() to return true on " +
"updated row " + rowString, rs.rowUpdated());
}
@@ -379,7 +385,8 @@
" when navigating forward.",
rows.get(new Integer(i)),
rowString);
- if (checkRowUpdated && updatedRows.contains(new Integer(i))) {
+ if (checkRowUpdated && updatedRows.contains(new Integer(i)) &&
+ !deletedRows.contains(new Integer(i))) {
assertTrue("Expected rs.rowUpdated() to return true on " +
"updated row " + rowString, rs.rowUpdated());
}
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURTest.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURTest.java?rev=395866&r1=395865&r2=395866&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURTest.java Fri Apr 21 05:12:36 2006
@@ -56,7 +56,7 @@
assertEquals("Expected resultset to be read only",
ResultSet.CONCUR_READ_ONLY,
rs.getConcurrency());
- assertNotNull("Expected to get a warning", warn);
+ assertWarning(warn, QUERY_NOT_QUALIFIED_FOR_UPDATABLE_RESULTSET);
scrollForward(rs);
rs.close();
}
@@ -80,7 +80,7 @@
assertEquals("Expected resultset to be read only",
ResultSet.CONCUR_READ_ONLY,
rs.getConcurrency());
- assertNotNull("Expected to get a warning", warn);
+ assertWarning(warn, QUERY_NOT_QUALIFIED_FOR_UPDATABLE_RESULTSET);
scrollForward(rs);
rs.close();
}
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/scrollCursors2.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/scrollCursors2.java?rev=395866&r1=395865&r2=395866&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/scrollCursors2.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/scrollCursors2.java Fri Apr 21 05:12:36 2006
@@ -592,7 +592,8 @@
s_s_u = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
- // We should have gotten 2 warnings and a read only scroll insensitive cursor
+ // We should have gotten 1 warning and a updatable scroll
+ // insensitive cursor.
warning = conn.getWarnings();
while (warning != null)
{
@@ -609,11 +610,10 @@
System.out.println("cursor type = " + rs.getType() +
", not " + ResultSet.TYPE_SCROLL_INSENSITIVE);
}
- if ((rs.getConcurrency() != ResultSet.CONCUR_READ_ONLY) &&
- isDerbyNetClient)
+ if (rs.getConcurrency() != ResultSet.CONCUR_UPDATABLE)
{
System.out.println("concurrency = " + rs.getConcurrency() +
- ", not " + ResultSet.CONCUR_READ_ONLY);
+ ", not " + ResultSet.CONCUR_UPDATABLE);
}
rs.close();
@@ -635,11 +635,9 @@
{
boolean passed = true;
PreparedStatement ps_i_r = null;
- PreparedStatement ps_i_u = null;
ResultSet rs;
SQLWarning warning;
Statement s_i_r = null; // insensitive, read only
- Statement s_i_u = null; // insensitive, updatable
s_i_r = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
@@ -838,21 +836,6 @@
rs.close();
- // Scroll insensitive and updatable
- s_i_u = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
- ResultSet.CONCUR_UPDATABLE);
-
- // We should have gotten 1 warning
- // and a read only scroll insensitive cursor
- warning = conn.getWarnings();
- while (warning != null)
- {
- System.out.println("warning = " + warning);
- warning = warning.getNextWarning();
- }
- conn.clearWarnings();
- s_i_u.close();
-
ps_i_r = conn.prepareStatement(
"select * from t",
ResultSet.TYPE_SCROLL_INSENSITIVE,
@@ -875,22 +858,6 @@
rs.close();
ps_i_r.close();
- ps_i_u = conn.prepareStatement(
- "select * from t",
- ResultSet.TYPE_SCROLL_INSENSITIVE,
- ResultSet.CONCUR_UPDATABLE);
-
- // We should have gotten 1 warning
- // and a read only scroll insensitive cursor
- warning = conn.getWarnings();
- while (warning != null)
- {
- System.out.println("warning = " + warning);
- warning = warning.getNextWarning();
- }
- conn.clearWarnings();
- ps_i_u.close();
-
// Check setMaxRows()/getMaxRows()
if (s_i_r.getMaxRows() != 0)
{
@@ -1183,7 +1150,6 @@
CallableStatement cs_s_r = null; // sensitive, read only
CallableStatement cs_s_u = null; // sensitive, updatable
CallableStatement cs_i_r = null; // insensitive, read only
- CallableStatement cs_i_u = null; // insensitive, updatable
CallableStatement cs_f_r = null; // forward only, read only
cs_s_r = conn.prepareCall(
@@ -1222,13 +1188,8 @@
warning = warning.getNextWarning();
warningCount++;
}
- if (warningCount != 2 && isDerbyNetClient)
- {
- System.out.println("warningCount expected to be 2, not " + warningCount);
- passed = false;
- }
- // Embedded implements SCROLL_INSENSITIVE and UPDATABLE
- if (warningCount != 1 && !isDerbyNetClient)
+ // SCROLL_INSENSITIVE and UPDATABLE implemented
+ if (warningCount != 1)
{
System.out.println("warningCount expected to be 1, not " + warningCount);
passed = false;
@@ -1258,34 +1219,6 @@
}
conn.clearWarnings();
cs_i_r.close();
-
- cs_i_u = conn.prepareCall(
- "values cast (? as Integer)",
- ResultSet.TYPE_SCROLL_INSENSITIVE,
- ResultSet.CONCUR_UPDATABLE);
-
- // We should have gotten 1 warnings
- warningCount = 0;
- warning = conn.getWarnings();
- while (warning != null)
- {
- System.out.println("warning = " + warning);
- warning = warning.getNextWarning();
- warningCount++;
- }
- if (warningCount != 1 && isDerbyNetClient)
- {
- System.out.println("warningCount expected to be 1, not " + warningCount);
- passed = false;
- }
- // Embedded implements SCROLL_INSENSITIVE and UPDATABLE
- if (warningCount != 0 && !isDerbyNetClient)
- {
- System.out.println("warningCount expected to be 0, not " + warningCount);
- passed = false;
- }
- conn.clearWarnings();
- cs_i_u.close();
cs_f_r = conn.prepareCall(
"values cast (? as Integer)",
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/updatableResultSet.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/updatableResultSet.java?rev=395866&r1=395865&r2=395866&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/updatableResultSet.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/updatableResultSet.java Fri Apr 21 05:12:36 2006
@@ -261,68 +261,24 @@
setup(true);
System.out.println("Negative Testl - request for scroll insensitive updatable resultset will give a read only scroll insensitive resultset");
- conn.clearWarnings();
- stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
- JDBCDisplayUtil.ShowWarnings(System.out, conn);
- System.out.println("requested TYPE_SCROLL_INSENSITIVE, CONCUR_UPDATABLE but that is not supported");
- System.out.println("Make sure that we got TYPE_SCROLL_INSENSITIVE? " + (stmt.getResultSetType() == ResultSet.TYPE_SCROLL_INSENSITIVE));
- System.out.println("Make sure that we got CONCUR_READ_ONLY? " + (stmt.getResultSetConcurrency() == ResultSet.CONCUR_READ_ONLY));
- dbmt = conn.getMetaData();
- System.out.println("ownDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? " + dbmt.ownDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE));
- System.out.println("othersDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? " + dbmt.othersDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE));
- System.out.println("deletesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE)? " + dbmt.deletesAreDetected(ResultSet.TYPE_SCROLL_INSENSITIVE));
- System.out.println("JDBC 2.0 updatable resultset api will fail on this resultset because this is not an updatable resultset");
- rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE");
- rs.next();
- try {
- rs.deleteRow();
- System.out.println("FAIL!!! deleteRow should have failed because Derby does not yet support scroll insensitive updatable resultsets");
- }
- catch (SQLException e) {
- System.out.println("SQL State : " + e.getSQLState());
- System.out.println("Got expected exception " + e.getMessage());
- }
- try {
- rs.updateRow();
- System.out.println("FAIL!!! updateRow should have failed because Derby does not yet support scroll insensitive updatable resultsets");
- }
- catch (SQLException e) {
- System.out.println("SQL State : " + e.getSQLState());
- System.out.println("Got expected exception " + e.getMessage());
- }
- rs.next();
- //have to close the resultset because by default, resultsets are held open over commit
- rs.close();
+ System.out.println("This test has been removed because scrollable " +
+ "insensitive updatable result sets have been " +
+ "implemented.");
- System.out.println("Negative Test2 - request for scroll sensitive updatable resultset will give a read only scroll insensitive resultset");
+ System.out.println("Negative Test2 - request for scroll sensitive " +
+ "updatable resultset will give an updatable " +
+ "scroll insensitive resultset");
stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
JDBCDisplayUtil.ShowWarnings(System.out, conn);
System.out.println("requested TYPE_SCROLL_SENSITIVE, CONCUR_UPDATABLE but that is not supported");
System.out.println("Jira issue Derby-154 : When client connects to Network Server using JCC, it incorrectly shows support for scroll sensitive updatable resultsets");
System.out.println("Make sure that we got TYPE_SCROLL_INSENSITIVE? " + (stmt.getResultSetType() == ResultSet.TYPE_SCROLL_INSENSITIVE));
- System.out.println("Make sure that we got CONCUR_READ_ONLY? " + (stmt.getResultSetConcurrency() == ResultSet.CONCUR_READ_ONLY));
- System.out.println("JDBC 2.0 updatable resultset api will fail on this resultset because this is not an updatable resultset");
- rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE");
- rs.next();
- try {
- rs.deleteRow();
- System.out.println("FAIL!!! deleteRow should have failed because Derby does not yet support scroll sensitive updatable resultsets");
- }
- catch (SQLException e) {
- System.out.println("SQL State : " + e.getSQLState());
- System.out.println("Got expected exception " + e.getMessage());
- }
- try {
- rs.updateRow();
- System.out.println("FAIL!!! updateRow should have failed because Derby does not yet support scroll sensitive updatable resultsets");
- }
- catch (SQLException e) {
- System.out.println("SQL State : " + e.getSQLState());
- System.out.println("Got expected exception " + e.getMessage());
- }
- rs.next();
- //have to close the resultset because by default, resultsets are held open over commit
- rs.close();
+ System.out.println("Make sure that we got CONCUR_UPDATABLE? " +
+ (stmt.getResultSetConcurrency() ==
+ ResultSet.CONCUR_UPDATABLE));
+ System.out.println("Rest of the test removed because scrollable " +
+ "insensitive updatable result sets have been " +
+ "implemented.");
System.out.println("Negative Test3 - request a read only resultset and attempt deleteRow and updateRow on it");
stmt = conn.createStatement();//the default is a read only forward only resultset
@@ -407,7 +363,6 @@
rs = stmt.executeQuery("select * from t1 FOR READ ONLY");
System.out.println("Make sure that we got CONCUR_READ_ONLY? " + (rs.getConcurrency() == ResultSet.CONCUR_READ_ONLY));
System.out.println("Jira issue Derby-159 : Warnings raised by Derby are not getting passed to the Client in Network Server Mode");
- System.out.println("Will see the warnings in embedded mode only");
JDBCDisplayUtil.ShowWarnings(System.out, rs);
rs.next();
System.out.println("Now attempting to send a delete on a sql with FOR READ ONLY clause.");