db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpendle...@apache.org
Subject svn commit: r389836 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/prepStmt.java
Date Wed, 29 Mar 2006 17:06:32 GMT
Author: bpendleton
Date: Wed Mar 29 09:06:31 2006
New Revision: 389836

URL: http://svn.apache.org/viewcvs?rev=389836&view=rev
Log:
DERBY-1143: derbynet/prepStmt.java fails with JCC 2.6

Patch contributed by Deepa Remesh

This patch reduces the number of batch elements in the test
derbynet/prepStmt.java so that it can run successfully with jcc2.6.

I checked with the JCC folks who told me that JCC2.6 driver supports
less than 32K batch elements. When I ran the test, I found that
maximum number supported is 32765. As mentioned by Bryan, any number
greater than 9000 will provoke the bug. So this number will still
allow us to test DERBY-428.


Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/prepStmt.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/prepStmt.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/prepStmt.java?rev=389836&r1=389835&r2=389836&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/prepStmt.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/prepStmt.java
Wed Mar 29 09:06:31 2006
@@ -955,9 +955,10 @@
     // 65535 statements per batch (prior to DERBY-428, the server failed
     // at around 9000 statements). The different JDBC clients support slightly
     // lower limits: the Network Client supports 65534
-    // statements in a single batch, while the DB2JCC driver supports
-    // 65532 statements. This test just verifies that a batch
-    // of 65532 statements works, and that a batch of 100000 statements
+    // statements in a single batch, the DB2JCC driver v2.4 supports
+    // 65532 statements, the DB2JCC driver v2.6 supports 32765 statements. 
+    // This test just verifies that a batch of 32765 statements works, 
+    // and that a batch of 100000 statements
     // gets a BatchUpdateException from the Network Client.
     private static void jira428Test(Connection conn)
         throws Exception
@@ -969,7 +970,7 @@
         boolean savedAutoCommit = conn.getAutoCommit();
         conn.setAutoCommit(false);
         ps = conn.prepareStatement("insert into jira428 values (?)");
-        for (int i = 0; i < 65532; i++)
+        for (int i = 0; i < 32765; i++)
         {
             ps.setInt(1, i);
             ps.addBatch();



Mime
View raw message