db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r796834 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java
Date Wed, 22 Jul 2009 19:06:18 GMT
Author: kahatlen
Date: Wed Jul 22 19:06:17 2009
New Revision: 796834

URL: http://svn.apache.org/viewvc?rev=796834&view=rev
Log:
DERBY-4313: JDBC.dropUsingDMD() may skip dropping objects

Only remove DDL statements from the list of statements to execute if
they were successful.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java?rev=796834&r1=796833&r2=796834&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java Wed Jul 22 19:06:17
2009
@@ -392,17 +392,14 @@
 		for (int i = 0; i < results.length; i++)
 		{
 			int result = results[i];
-			if (result == -3 /* Statement.EXECUTE_FAILED*/)
+			if (result == Statement.EXECUTE_FAILED)
 				hadError = true;
-			else if (result == -2/*Statement.SUCCESS_NO_INFO*/)
-				didDrop = true;
-			else if (result >= 0)
+			else if (result == Statement.SUCCESS_NO_INFO || result >= 0) {
 				didDrop = true;
+				ddl.set(i, null);
+			}
 			else
 				Assert.fail("Negative executeBatch status");
-            
-            if (didDrop)
-                ddl.set(i, null);
 		}
         s.clearBatch();
         if (didDrop) {



Mime
View raw message