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 kr...@apache.org on 2010/04/23 11:05:12 UTC

svn commit: r937198 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/PreparedStatementTest.java

Author: kristwaa
Date: Fri Apr 23 09:05:12 2010
New Revision: 937198

URL: http://svn.apache.org/viewvc?rev=937198&view=rev
Log:
DERBY-2017: Client driver can insert and commit partial data when a LOB stream throws IOException or does not match the specified length

Remove workaround for DERBY-2017 (the test accepted a row that shouldn't
have been committed).

Patch file: derby-2017-4a-remove_test_workaround.diff

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/PreparedStatementTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/PreparedStatementTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/PreparedStatementTest.java?rev=937198&r1=937197&r2=937198&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/PreparedStatementTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/PreparedStatementTest.java Fri Apr 23 09:05:12 2010
@@ -960,19 +960,6 @@ public class PreparedStatementTest exten
         }
         psFetchBlob.setInt(1, failedKey);
         rs = psFetchBlob.executeQuery();
-        // When using the Derby client driver, the data seems to be padded
-        // with 0s and inserted... Thus, the select returns a row.
-        if (!usingEmbedded()) {
-            assertTrue(rs.next());
-            InputStream is = rs.getBinaryStream(1);
-            int lastByte = -1;
-            int b = 99; // Just a value > 0.
-            while (b > -1) {
-                lastByte = b;
-                b = is.read();
-            }
-            assertEquals("Last padded byte is not 0", 0, lastByte);
-        }
         assertFalse(rs.next());
         rs.close();
         rollback();