db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r986750 - in /db/derby/code/trunk/java: build/org/apache/derbyBuild/ client/org/apache/derby/client/am/ testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/ testing/org/apache/derbyTesting/functionTests/tests/lang/
Date Wed, 18 Aug 2010 15:47:58 GMT
Author: myrnavl
Date: Wed Aug 18 15:47:57 2010
New Revision: 986750

URL: http://svn.apache.org/viewvc?rev=986750&view=rev
Log:
DERBY-4777; perform different in Client and Embed modes when update on an invalid cursor
  initial patch contributed by Yun Lee (yun dot lee dot bj at gmail dot com)

Modified:
    db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/holdCursorIJ.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CurrentOfTest.java

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java?rev=986750&r1=986749&r2=986750&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 Wed Aug 18 15:47:57
2010
@@ -120,6 +120,7 @@ public class splitmessages {
         clientMessageIds.add(SQLState.INVALID_COLUMN_ARRAY_LENGTH);
         clientMessageIds.add(SQLState.PROPERTY_INVALID_VALUE);
         clientMessageIds.add(SQLState.LANG_SUBSTR_START_ADDING_LEN_OUT_OF_RANGE);
+        clientMessageIds.add(SQLState.LANG_CURSOR_NOT_FOUND);
     }
 
 	public static void main(String[] args) throws Exception {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java?rev=986750&r1=986749&r2=986750&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java Wed Aug 18 15:47:57
2010
@@ -2020,7 +2020,7 @@ public class Statement implements java.s
                     newSection = agent_.sectionManager_.getPositionedUpdateSection(cursorName,
true); // true means get an execute immediate section
                     if (newSection == null) {
                         throw new SqlException(agent_.logWriter_, 
-                            new ClientMessageId(SQLState.CURSOR_INVALID_NAME),
+                            new ClientMessageId(SQLState.LANG_CURSOR_NOT_FOUND),
                             cursorName);
                     }
                     scrollableRS = agent_.sectionManager_.getPositionedUpdateResultSet(cursorName);

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/holdCursorIJ.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/holdCursorIJ.out?rev=986750&r1=986749&r2=986750&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/holdCursorIJ.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/holdCursorIJ.out
Wed Aug 18 15:47:57 2010
@@ -231,7 +231,7 @@ C11 |C12        
 2 |23         
 ij> close jdk4;
 ij> update t1 set c12=234 where current of jdk4;
-ERROR XJ202: Invalid cursor name 'JDK4'.
+ERROR 42X30: Cursor 'JDK4' not found. Verify that autocommit is OFF.
 ij> select * from t1;
 C11 |C12        
 -----
@@ -277,7 +277,7 @@ C11 |C12        
 -----
 ij> close jdk4;
 ij> delete from t1 where current of jdk4;
-ERROR XJ202: Invalid cursor name 'JDK4'.
+ERROR 42X30: Cursor 'JDK4' not found. Verify that autocommit is OFF.
 ij> select * from t1;
 C11 |C12        
 -----

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CurrentOfTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CurrentOfTest.java?rev=986750&r1=986749&r2=986750&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CurrentOfTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CurrentOfTest.java
Wed Aug 18 15:47:57 2010
@@ -202,10 +202,7 @@ public class CurrentOfTest extends BaseJ
 		
 		// TEST: no cursor with that name exists
 		delete2 = createStatement();
-		if (usingEmbedded())
-			assertStatementError("42X30", delete2,"delete from t where current of myCursor" );
-		else
-			assertStatementError("XJ202", delete2,"delete from t where current of myCursor" );
+		assertStatementError("42X30", delete2,"delete from t where current of myCursor" );
 		expectedRows = new Object[][]{{new String("456"),new String("hi yourself")},          
                            
 				   					  {new String("3"),new String("you are the one")}}; 
 		JDBC.assertFullResultSet(delete1.executeQuery(tableRows), expectedRows, true);



Mime
View raw message