db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r937198 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/PreparedStatementTest.java
Date Fri, 23 Apr 2010 09:05:12 GMT
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();



Mime
View raw message