org.apache.derbyTesting.functionTests.tests.jdbcapi
Class BlobClob4BlobTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.derbyTesting.junit.BaseTestCase
              extended by org.apache.derbyTesting.junit.BaseJDBCTestCase
                  extended by org.apache.derbyTesting.functionTests.tests.jdbcapi.BlobClob4BlobTest
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
Compat_BlobClob4BlobTest

public class BlobClob4BlobTest
extends BaseJDBCTestCase

Test of JDBC blob and clob


Field Summary
private static java.lang.String BLOB_ACCESSED_AFTER_COMMIT
           
private static java.lang.String BLOB_BAD_POSITION
           
private static java.lang.String BLOB_NONPOSITIVE_LENGTH
           
private static java.lang.String BLOB_NULL_PATTERN_OR_SEARCH_STR
           
private static java.lang.String BLOB_POSITION_TOO_LARGE
           
private static java.lang.String INVALID_LOB
           
private static java.lang.String INVALID_LOCATOR
           
private static java.lang.String LANG_DATA_TYPE_GET_MISMATCH
           
private static java.lang.String LOCK_TIMEOUT
           
private static java.lang.String NO_CURRENT_CONNECTION
           
 
Fields inherited from class org.apache.derbyTesting.junit.BaseTestCase
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
 
Constructor Summary
BlobClob4BlobTest(java.lang.String name)
          Creates a new instance of BlobClob4BlobTest
 
Method Summary
private static int addPatternPrefix(java.lang.StringBuffer sb, char[] pattern, int pl, int fakeCount, int pos)
           
private static void checkClob8(java.sql.Statement s, java.sql.Clob pstr)
           
private static void checkClob8(java.sql.Statement s, java.lang.String pstr)
           
private  void checkContentsBeforeAndAfterUpdatingBlob(java.sql.ResultSet rs)
           
private  void checkContentsBeforeAndAfterUpdatingClob(java.sql.ResultSet rs)
           
private  void checkException(java.lang.String SQLState, java.sql.SQLException se)
           
private  boolean compareReaders(java.io.Reader origValue, java.io.Reader newValue)
           
private  long getStreamCheckSum(java.io.InputStream in)
          Get the CRC32 checksum of a stream, reading its contents entirely and closing it.
private  void insertDefaultData()
           
private  void insertLoopingAlphabetStreamData(java.sql.PreparedStatement ps, CharAlphabet alphabet, int lobLength)
           
private  void insertLoopingAlphabetStreamData(java.sql.PreparedStatement ps, int lobLength)
           
private  void insertUnicodeData(java.lang.String[] unicodeString)
           
private  void runPositionClobTest()
           
private  void runPositionStringTest()
           
 void setUp()
          Set up the conection to the database.
static junit.framework.Test suite()
           
private static java.lang.String T8insert(java.sql.PreparedStatement ps, int id, char[] base, int bl, char[] pattern, int pl, int pos, boolean addPattern)
           
protected  void tearDown()
          Tear down this fixture, sub-classes should call super.tearDown().
 void testBlobAfterClose()
          make sure blob is still around after we go to the next row, after we close the result set, and after we close the statement
 void testBlobAfterClosingConnection()
          test accessing blob after closing the connection
 void testBlobAfterCommit()
          test accessing blob after commit
 void testBlobContents(java.sql.ResultSet rs)
          Test the contents of the testBlob table or ResultSet with identical shape.
 void testBlobFinalizer()
          test blob finalizer closes the container (should only release table and row locks that are read_committed) NOTE: this test does not produce output since it needs to call the garbage collector whose behaviour is unreliable.
 void testBlobInsert()
          From LobTest.java, test various inserts on a BLOB column
 void testClobAfterClose()
          make sure clob is still around after we go to the next row, after we close the result set, and after we close the statement
 void testClobAfterClosingConnection()
          test accessing clob after closing the connection
 void testClobAfterCommit()
          test accessing clob after commit
 void testClobAfterCommitWithSecondClob()
          Make sure we get an error attempting to access the lob after commit.
 void testClobFinalizer()
          test clob finalizer closes the container (should only release table and row locks that are read_committed) NOTE: this test does not produce output since it needs to call the garbage collector whose behaviour is unreliable.
 void testGetAsciiStream()
          basic test of getAsciiStream also tests length
 void testGetBinaryStream()
          basic test of getBinaryStream also tests length
 void testGetBlobBeforeAndAfterUpdate()
          Test fix for derby-1382.
 void testGetBlobBeforeAndAfterUpdateStream()
          Test fix for derby-1421.
 void testGetBlobFromIntColumn()
          make sure cannot get a blob from an int column
 void testGetBytes()
          test getBytes
 void testGetCharacterStream()
          basic test of getCharacterStream also tests length
 void testGetCharacterStreamWithUnicode()
          test of getCharacterStream on a table containing unicode characters
 void testGetClobBeforeAndAfterUpdate()
          Test fix for derby-1382.
 void testGetClobBeforeAndAfterUpdateStream()
          Test fix for derby-1421.
 void testGetClobFromIntColumn()
          make sure cannot get a clob from an int column
 void testGetSubString()
          test Clob.getSubString() method
 void testGetSubStringWithUnicode()
          test getSubString with unicode
 void testIsolationLevelChangeAfterRead()
          Test that it is possible to change the isolation level after reading a BLOB (DERBY-3427).
 void testLockingBlob()
          test locking
 void testLockingClob()
          test locking
 void testLockingWithLongRowBlob()
          test locking with a long row + long column
 void testLockingWithLongRowClob()
          test locking with a long row + long column
 void testNegativeTestDerby265Blob()
          Test fix for derby-265.
 void testNegativeTestDerby265Clob()
          Test fix for derby-265.
 void testPositionAgressive()
          Test Clob.position()
 void testPositionBlob()
          Test Blob.position() with blob argument
 void testPositionBlobDeterministic()
          Tests the Blob.position using a deterministic sequence of actions and arguments.
 void testPositionBytes()
          test position with a byte[] argument
 void testPositionClob()
          test position with a Clob argument
 void testPositionClobWithUnicode()
          test position with a Clob argument containing unicode characters
 void testPositionString()
          test position with a String argument
 void testPositionStringWithUnicode()
          test position with a String argument and unicode data.
 void testRaisingOfExceptionsBlob()
          test raising of exceptions
 void testRaisingOfExceptionsClob()
          test raising of exceptions
 void testRetrieveMoreThan32KLobs()
          DERBY-3243 Fix ArrayIndexOutOfBounds Exception if we retrieve more than 32K lobs
 void testSelfDestructiveClob()
          test behaviour of system with self destructive user update a long column underneath a clob
 void testSelfDestructiveClob2()
          test behaviour of system with self destructive user drop table and see what happens to the clob expect an IOException when moving to a new page of the long column
 void testSetBlob()
          test setBlob
 void testSetBlobOnIntColumn()
          make sure setBlob doesn't work for an int column
 void testSetCharacterStream()
          Tests PreparedStatement.setCharacterStream
 void testSetClob()
          test setClob
 void testSetClobToIntColumn()
          make sure setClob doesn't work on an int column
 void testSmallClobFields()
          make sure clobs work for small CLOB fields also test length method
 void testTriggersWithClobColumn()
          Test triggers on CLOB columns.
 void testTriggerWithBlobColumn()
          Test triggers on BLOB columns.
 void testUnconsumedParameter()
          DERBY-3085.
 void testVarbinary()
          tests small blob abd length method
private  void updateBlobWithUpdateBinaryStream(java.sql.ResultSet rs)
           
private  void updateClobWithUpdateCharacterStream(java.sql.ResultSet rs)
           
private  void verifyInterval(java.sql.Blob blob, long pos, int length, int testNum, int blobLength)
          Verifies the value returned by the method Blob.getBytes()
private  void verifyInterval(java.sql.Clob clob, long pos, int length, int testNum, int clobLength)
          Verifies the value returned by the method Clob.getSubstring()
 
Methods inherited from class org.apache.derbyTesting.junit.BaseJDBCTestCase
assertCallError, assertCheckTable, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertGetIntError, assertNextError, assertPreparedStatementError, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertTableRowCount, assertUpdateCount, assertUpdateCount, checkAllConsistency, checkEstimatedRowCount, commit, createStatement, createStatement, createStatement, dropTable, dropTable, getConnection, getDatabaseProperty, getLastSQLException, initializeConnection, openConnection, openDefaultConnection, openDefaultConnection, openUserConnection, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, rollback, runScript, runScript, runSQLCommands, setAutoCommit, usingDB2Client, usingDerbyNetClient, usingEmbedded
 
Methods inherited from class org.apache.derbyTesting.junit.BaseTestCase
alarm, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertSecurityManager, assertThrowableEquals, execJavaCmd, fail, getFailureFolder, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeSystemProperty, runBare, setSystemProperty, traceit
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BLOB_BAD_POSITION

private static final java.lang.String BLOB_BAD_POSITION
See Also:
Constant Field Values

BLOB_NONPOSITIVE_LENGTH

private static final java.lang.String BLOB_NONPOSITIVE_LENGTH
See Also:
Constant Field Values

BLOB_POSITION_TOO_LARGE

private static final java.lang.String BLOB_POSITION_TOO_LARGE
See Also:
Constant Field Values

LANG_DATA_TYPE_GET_MISMATCH

private static final java.lang.String LANG_DATA_TYPE_GET_MISMATCH
See Also:
Constant Field Values

BLOB_NULL_PATTERN_OR_SEARCH_STR

private static final java.lang.String BLOB_NULL_PATTERN_OR_SEARCH_STR
See Also:
Constant Field Values

LOCK_TIMEOUT

private static final java.lang.String LOCK_TIMEOUT
See Also:
Constant Field Values

BLOB_ACCESSED_AFTER_COMMIT

private static final java.lang.String BLOB_ACCESSED_AFTER_COMMIT
See Also:
Constant Field Values

NO_CURRENT_CONNECTION

private static final java.lang.String NO_CURRENT_CONNECTION
See Also:
Constant Field Values

INVALID_LOB

private static final java.lang.String INVALID_LOB
See Also:
Constant Field Values

INVALID_LOCATOR

private static final java.lang.String INVALID_LOCATOR
See Also:
Constant Field Values
Constructor Detail

BlobClob4BlobTest

public BlobClob4BlobTest(java.lang.String name)
Creates a new instance of BlobClob4BlobTest

Method Detail

setUp

public void setUp()
           throws java.lang.Exception
Set up the conection to the database.

Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Description copied from class: BaseJDBCTestCase
Tear down this fixture, sub-classes should call super.tearDown(). This cleanups & closes the connection if it is open and any statement objects returned through the utility methods.

Overrides:
tearDown in class BaseJDBCTestCase
Throws:
java.lang.Exception

testUnconsumedParameter

public void testUnconsumedParameter()
                             throws java.sql.SQLException
DERBY-3085. Test update where streamed parameter is not consumed by the server. Network Server needs to clean-up after execution.

Throws:
java.sql.SQLException

testIsolationLevelChangeAfterRead

public void testIsolationLevelChangeAfterRead()
                                       throws java.sql.SQLException
Test that it is possible to change the isolation level after reading a BLOB (DERBY-3427).

Throws:
java.sql.SQLException

testSetCharacterStream

public void testSetCharacterStream()
                            throws java.lang.Exception
Tests PreparedStatement.setCharacterStream

Throws:
java.lang.Exception

testGetAsciiStream

public void testGetAsciiStream()
                        throws java.lang.Exception
basic test of getAsciiStream also tests length

Throws:
java.lang.Exception

testGetCharacterStream

public void testGetCharacterStream()
                            throws java.lang.Exception
basic test of getCharacterStream also tests length

Throws:
java.lang.Exception

testGetCharacterStreamWithUnicode

public void testGetCharacterStreamWithUnicode()
                                       throws java.lang.Exception
test of getCharacterStream on a table containing unicode characters

Throws:
java.lang.Exception

testTriggersWithClobColumn

public void testTriggersWithClobColumn()
                                throws java.lang.Exception
Test triggers on CLOB columns.

Throws:
java.lang.Exception

testGetSubString

public void testGetSubString()
                      throws java.lang.Exception
test Clob.getSubString() method

Throws:
java.lang.Exception

testGetSubStringWithUnicode

public void testGetSubStringWithUnicode()
                                 throws java.lang.Exception
test getSubString with unicode

Throws:
java.lang.Exception

testPositionString

public void testPositionString()
                        throws java.lang.Exception
test position with a String argument

Throws:
java.lang.Exception

testPositionStringWithUnicode

public void testPositionStringWithUnicode()
                                   throws java.lang.Exception
test position with a String argument and unicode data.

Throws:
java.lang.Exception

runPositionStringTest

private void runPositionStringTest()
                            throws java.lang.Exception
Throws:
java.lang.Exception

testPositionClob

public void testPositionClob()
                      throws java.lang.Exception
test position with a Clob argument

Throws:
java.lang.Exception

testPositionClobWithUnicode

public void testPositionClobWithUnicode()
                                 throws java.lang.Exception
test position with a Clob argument containing unicode characters

Throws:
java.lang.Exception

runPositionClobTest

private void runPositionClobTest()
                          throws java.lang.Exception
Throws:
java.lang.Exception

testSmallClobFields

public void testSmallClobFields()
                         throws java.lang.Exception
make sure clobs work for small CLOB fields also test length method

Throws:
java.lang.Exception

testGetClobFromIntColumn

public void testGetClobFromIntColumn()
                              throws java.lang.Exception
make sure cannot get a clob from an int column

Throws:
java.lang.Exception

testSetClobToIntColumn

public void testSetClobToIntColumn()
                            throws java.lang.Exception
make sure setClob doesn't work on an int column

Throws:
java.lang.Exception

testRaisingOfExceptionsClob

public void testRaisingOfExceptionsClob()
                                 throws java.lang.Exception
test raising of exceptions

Throws:
java.lang.Exception

testSetClob

public void testSetClob()
                 throws java.lang.Exception
test setClob

Throws:
java.lang.Exception

testPositionAgressive

public void testPositionAgressive()
                           throws java.lang.Exception
Test Clob.position()

Throws:
java.lang.Exception

T8insert

private static java.lang.String T8insert(java.sql.PreparedStatement ps,
                                         int id,
                                         char[] base,
                                         int bl,
                                         char[] pattern,
                                         int pl,
                                         int pos,
                                         boolean addPattern)
                                  throws java.sql.SQLException
Throws:
java.sql.SQLException

addPatternPrefix

private static int addPatternPrefix(java.lang.StringBuffer sb,
                                    char[] pattern,
                                    int pl,
                                    int fakeCount,
                                    int pos)

checkClob8

private static void checkClob8(java.sql.Statement s,
                               java.lang.String pstr)
                        throws java.sql.SQLException
Throws:
java.sql.SQLException

checkClob8

private static void checkClob8(java.sql.Statement s,
                               java.sql.Clob pstr)
                        throws java.sql.SQLException
Throws:
java.sql.SQLException

testClobAfterClose

public void testClobAfterClose()
                        throws java.lang.Exception
make sure clob is still around after we go to the next row, after we close the result set, and after we close the statement

Throws:
java.lang.Exception

testLockingClob

public void testLockingClob()
                     throws java.lang.Exception
test locking

Throws:
java.lang.Exception

testLockingWithLongRowClob

public void testLockingWithLongRowClob()
                                throws java.lang.Exception
test locking with a long row + long column

Throws:
java.lang.Exception

testClobAfterCommit

public void testClobAfterCommit()
                         throws java.lang.Exception
test accessing clob after commit

Throws:
java.lang.Exception

testClobAfterClosingConnection

public void testClobAfterClosingConnection()
                                    throws java.lang.Exception
test accessing clob after closing the connection

Throws:
java.lang.Exception

testClobAfterCommitWithSecondClob

public void testClobAfterCommitWithSecondClob()
                                       throws java.sql.SQLException
Make sure we get an error attempting to access the lob after commit.

Throws:
java.sql.SQLException

testGetClobBeforeAndAfterUpdate

public void testGetClobBeforeAndAfterUpdate()
                                     throws java.sql.SQLException
Test fix for derby-1382. Test that the getClob() returns the correct value for the clob before and after updating the clob when using result sets of type TYPE_SCROLL_INSENSITIVE.

Throws:
java.sql.SQLException

checkContentsBeforeAndAfterUpdatingClob

private void checkContentsBeforeAndAfterUpdatingClob(java.sql.ResultSet rs)
                                              throws java.sql.SQLException
Throws:
java.sql.SQLException

testGetClobBeforeAndAfterUpdateStream

public void testGetClobBeforeAndAfterUpdateStream()
                                           throws java.sql.SQLException
Test fix for derby-1421. Test that the getClob() returns the correct value for the blob before and after updating the Clob using the method updateCharacterStream().

Throws:
java.sql.SQLException

updateClobWithUpdateCharacterStream

private void updateClobWithUpdateCharacterStream(java.sql.ResultSet rs)
                                          throws java.sql.SQLException
Throws:
java.sql.SQLException

testClobFinalizer

public void testClobFinalizer()
                       throws java.lang.Exception
test clob finalizer closes the container (should only release table and row locks that are read_committed) NOTE: this test does not produce output since it needs to call the garbage collector whose behaviour is unreliable. It is in the test run to exercise the code (most of the time).

Throws:
java.lang.Exception

testGetBinaryStream

public void testGetBinaryStream()
                         throws java.lang.Exception
basic test of getBinaryStream also tests length

Throws:
java.lang.Exception

testGetBytes

public void testGetBytes()
                  throws java.lang.Exception
test getBytes

Throws:
java.lang.Exception

testPositionBytes

public void testPositionBytes()
                       throws java.lang.Exception
test position with a byte[] argument

Throws:
java.lang.Exception

testPositionBlobDeterministic

public void testPositionBlobDeterministic()
                                   throws java.io.IOException,
                                          java.sql.SQLException
Tests the Blob.position using a deterministic sequence of actions and arguments.

Throws:
java.io.IOException
java.sql.SQLException

testPositionBlob

public void testPositionBlob()
                      throws java.lang.Exception
Test Blob.position() with blob argument

Throws:
java.lang.Exception

testTriggerWithBlobColumn

public void testTriggerWithBlobColumn()
                               throws java.lang.Exception
Test triggers on BLOB columns.

Throws:
java.lang.Exception

testVarbinary

public void testVarbinary()
                   throws java.lang.Exception
tests small blob abd length method

Throws:
java.lang.Exception

testGetBlobFromIntColumn

public void testGetBlobFromIntColumn()
                              throws java.lang.Exception
make sure cannot get a blob from an int column

Throws:
java.lang.Exception

testSetBlobOnIntColumn

public void testSetBlobOnIntColumn()
                            throws java.lang.Exception
make sure setBlob doesn't work for an int column

Throws:
java.lang.Exception

testRaisingOfExceptionsBlob

public void testRaisingOfExceptionsBlob()
                                 throws java.lang.Exception
test raising of exceptions

Throws:
java.lang.Exception

testSetBlob

public void testSetBlob()
                 throws java.lang.Exception
test setBlob

Throws:
java.lang.Exception

testBlobAfterClose

public void testBlobAfterClose()
                        throws java.lang.Exception
make sure blob is still around after we go to the next row, after we close the result set, and after we close the statement

Throws:
java.lang.Exception

testLockingBlob

public void testLockingBlob()
                     throws java.lang.Exception
test locking

Throws:
java.lang.Exception

testLockingWithLongRowBlob

public void testLockingWithLongRowBlob()
                                throws java.lang.Exception
test locking with a long row + long column

Throws:
java.lang.Exception

testBlobAfterCommit

public void testBlobAfterCommit()
                         throws java.lang.Exception
test accessing blob after commit

Throws:
java.lang.Exception

testBlobAfterClosingConnection

public void testBlobAfterClosingConnection()
                                    throws java.lang.Exception
test accessing blob after closing the connection

Throws:
java.lang.Exception

testBlobFinalizer

public void testBlobFinalizer()
                       throws java.lang.Exception
test blob finalizer closes the container (should only release table and row locks that are read_committed) NOTE: this test does not produce output since it needs to call the garbage collector whose behaviour is unreliable. It is in the test run to exercise the code (most of the time).

Throws:
java.lang.Exception

testGetBlobBeforeAndAfterUpdate

public void testGetBlobBeforeAndAfterUpdate()
                                     throws java.lang.Exception
Test fix for derby-1382. Test that the getBlob() returns the correct value for the blob before and after updating the blob when using result sets of type TYPE_SCROLL_INSENSITIVE.

Throws:
java.lang.Exception

checkContentsBeforeAndAfterUpdatingBlob

private void checkContentsBeforeAndAfterUpdatingBlob(java.sql.ResultSet rs)
                                              throws java.sql.SQLException,
                                                     java.io.UnsupportedEncodingException
Throws:
java.sql.SQLException
java.io.UnsupportedEncodingException

testGetBlobBeforeAndAfterUpdateStream

public void testGetBlobBeforeAndAfterUpdateStream()
                                           throws java.lang.Exception
Test fix for derby-1421. Test that the getBlob() returns the correct value for the blob before and after updating the blob using the method updateBinaryStream().

Throws:
java.lang.Exception

updateBlobWithUpdateBinaryStream

private void updateBlobWithUpdateBinaryStream(java.sql.ResultSet rs)
                                       throws java.sql.SQLException,
                                              java.io.UnsupportedEncodingException
Throws:
java.sql.SQLException
java.io.UnsupportedEncodingException

testSelfDestructiveClob

public void testSelfDestructiveClob()
                             throws java.lang.Exception
test behaviour of system with self destructive user update a long column underneath a clob

Throws:
java.lang.Exception

testSelfDestructiveClob2

public void testSelfDestructiveClob2()
                              throws java.lang.Exception
test behaviour of system with self destructive user drop table and see what happens to the clob expect an IOException when moving to a new page of the long column

Throws:
java.lang.Exception

testNegativeTestDerby265Blob

public void testNegativeTestDerby265Blob()
                                  throws java.lang.Exception
Test fix for derby-265. Test that if getBlob is called after the transaction in which it was created is committed, a proper user error is thrown instead of an NPE. Basically per the spec, getBlob is valid only for the duration of the transaction it was created in

Throws:
java.lang.Exception
FileNotFoundException
java.io.IOException

testNegativeTestDerby265Clob

public void testNegativeTestDerby265Clob()
                                  throws java.lang.Exception
Test fix for derby-265. Test that if getClob is called after the transaction in which it was created is committed, a proper user error is thrown instead of an NPE. Basically per the spec, getClob is valid only for the duration of the transaction in it was created in

Throws:
java.lang.Exception

suite

public static junit.framework.Test suite()

insertDefaultData

private void insertDefaultData()
                        throws java.lang.Exception
Throws:
java.lang.Exception

insertUnicodeData

private void insertUnicodeData(java.lang.String[] unicodeString)
                        throws java.lang.Exception
Throws:
java.lang.Exception

insertLoopingAlphabetStreamData

private void insertLoopingAlphabetStreamData(java.sql.PreparedStatement ps,
                                             int lobLength)
                                      throws java.lang.Exception
Throws:
java.lang.Exception

insertLoopingAlphabetStreamData

private void insertLoopingAlphabetStreamData(java.sql.PreparedStatement ps,
                                             CharAlphabet alphabet,
                                             int lobLength)
                                      throws java.lang.Exception
Throws:
java.lang.Exception

compareReaders

private boolean compareReaders(java.io.Reader origValue,
                               java.io.Reader newValue)
                        throws java.lang.Exception
Throws:
java.lang.Exception

getStreamCheckSum

private long getStreamCheckSum(java.io.InputStream in)
                        throws java.lang.Exception
Get the CRC32 checksum of a stream, reading its contents entirely and closing it.

Throws:
java.lang.Exception

verifyInterval

private void verifyInterval(java.sql.Clob clob,
                            long pos,
                            int length,
                            int testNum,
                            int clobLength)
                     throws java.lang.Exception
Verifies the value returned by the method Clob.getSubstring()

Throws:
java.lang.Exception

verifyInterval

private void verifyInterval(java.sql.Blob blob,
                            long pos,
                            int length,
                            int testNum,
                            int blobLength)
                     throws java.lang.Exception
Verifies the value returned by the method Blob.getBytes()

Throws:
java.lang.Exception

testBlobContents

public void testBlobContents(java.sql.ResultSet rs)
                      throws java.lang.Exception
Test the contents of the testBlob table or ResultSet with identical shape.

Parameters:
rs -
Throws:
java.lang.Exception

testBlobInsert

public void testBlobInsert()
                    throws java.sql.SQLException
From LobTest.java, test various inserts on a BLOB column

Throws:
java.sql.SQLException

checkException

private void checkException(java.lang.String SQLState,
                            java.sql.SQLException se)
                     throws java.lang.Exception
Throws:
java.lang.Exception

testRetrieveMoreThan32KLobs

public void testRetrieveMoreThan32KLobs()
                                 throws java.sql.SQLException
DERBY-3243 Fix ArrayIndexOutOfBounds Exception if we retrieve more than 32K lobs

Throws:
java.sql.SQLException

Built on Wed 2009-11-25 18:43:31-0800, from revision 884373

Apache Derby V10.6 Internals - Copyright © 2004,2008 The Apache Software Foundation. All Rights Reserved.