public class Derby3650Test extends BaseJDBCTestCase
Modifier and Type | Field and Description |
---|---|
private static boolean |
runDerby3749tests
Fields of the class
|
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
Derby3650Test(java.lang.String name)
Constructors for This class:
|
Modifier and Type | Method and Description |
---|---|
protected static junit.framework.Test |
baseSuite(java.lang.String name) |
private static void |
initializeBlobTables(java.sql.Statement stmt) |
private static void |
initializeClobTables(java.sql.Statement stmt) |
private void |
runQueryBlob(java.lang.String query,
boolean freelob,
boolean commitAfterLobVerify)
Test select of multiple rows containing single blob column.
|
private void |
runQueryCasesBlob(java.lang.String query)
Test select of multiple rows containing single blob column.
|
private void |
runQueryCasesClob(java.lang.String query)
Test select of multiple rows containing single clob column.
|
private void |
runQueryClob(java.lang.String query,
boolean freelob,
boolean commitAfterLobVerify)
Test select of multiple rows containing single clob column.
|
void |
setUp() |
static junit.framework.Test |
suite() |
void |
test1ToManyHashJoinBlob() |
void |
test1ToManyHashJoinClob() |
void |
test1ToManyJoinBlob()
Test a nested loop join for blobs.
|
void |
test1ToManyJoinClob()
Test a nested loop join for clobs.
|
void |
test1ToManyleftOuterJoinBlob() |
void |
test1ToManyleftOuterJoinClob() |
void |
testBlobSelect()
Test straight select from a heap scan of multiple rows containing blobs.
|
void |
testClobSelect()
Test straight select from a heap scan of multiple rows containing clobs.
|
private void |
verifyBlob(java.io.InputStream is,
int length,
int id) |
private void |
verifyClob(java.io.Reader input,
int length,
java.io.Reader expected) |
assertCallError, assertCheckTable, assertCommitError, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertErrorCode, assertGetIntError, assertNextError, assertPreparedStatementError, assertResults, assertResults, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertStatementErrorUnordered, assertTableRowCount, assertUpdateCount, assertUpdateCount, assertWarning, chattyPrepare, chattyPrepareCall, checkAllConsistency, checkEstimatedRowCount, closeStatement, commit, createStatement, createStatement, createStatement, dropTable, dropTable, dropView, dropView, dumpRs, dumpRs, emptyStatementCache, executeQuery, expectCompilationError, expectCompilationError, expectExecutionError, getClientTransactionID, getConnection, getDatabaseProperty, getLastSQLException, goodStatement, goodUpdate, initializeConnection, openConnection, openDefaultConnection, openDefaultConnection, openDefaultConnection, openUserConnection, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, rollback, runBare, runBareOverridable, runScript, runScript, runSQLCommands, setAutoCommit, tearDown, usingDB2Client, usingDerbyNetClient, usingEmbedded
alarm, assertDirectoryDeleted, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertLaunchedJUnitTestMethod, assertLaunchedJUnitTestMethod, assertSameNullness, assertSecurityManager, assertThrowableEquals, currentDirectory, execJavaCmd, execJavaCmd, execJavaCmd, fail, getClassVersionMajor, getEmmaJar, getFailureFolder, getFilesWith, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, hasInterruptibleIO, isCVM, isIBMJVM, isJ9Platform, isJava5, isJava7, isPhoneME, isPlatform, isSunJVM, isWindowsPlatform, newAssertionFailedError, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeFiles, removeSystemProperty, runsWithEmma, runsWithJaCoCo, setSystemErr, setSystemOut, setSystemProperty, sleep, sleepAtLeastOneTick, traceit, vmAtLeast
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runTest, setName, toString
private static final boolean runDerby3749tests
public Derby3650Test(java.lang.String name)
public void setUp() throws java.sql.SQLException
setUp
in class junit.framework.TestCase
java.sql.SQLException
private void runQueryCasesClob(java.lang.String query) throws java.sql.SQLException, java.io.IOException
Expects input query to return 3 column's per row, which should be: (id, length of clob, clob) Will verify clob using verifyClob().
Runs the query 4 times testing the following combinations: free clob on each row = true, commit xact after each row = true free clob on each row = true, commit xact after each row = false free clob on each row = false, commit xact after each row = true free clob on each row = false, commit xact after each row = false
query
- query to run.StandardException
- Standard exception policy.java.sql.SQLException
java.io.IOException
private void runQueryClob(java.lang.String query, boolean freelob, boolean commitAfterLobVerify) throws java.sql.SQLException, java.io.IOException
Expects input query to return 3 column's per row, which should be: (id, length of clob, clob) Will verify clob using verifyClob().
query
- query to run.freelob
- true if we should free the lob after it has
been retrieved and verified.commitAfterLobVerify
- true if we should commit after the lob has
been retrieved and verified.StandardException
- Standard exception policy.java.sql.SQLException
java.io.IOException
private void runQueryCasesBlob(java.lang.String query) throws java.sql.SQLException, java.io.IOException
Expects input query to return 3 column's per row, which should be: (id, length of clob, clob) Will verify blob using verifyBlob().
Runs the query 4 times testing the following combinations: free blob on each row = true, commit xact after each row = true free blob on each row = true, commit xact after each row = false free blob on each row = false, commit xact after each row = true free blob on each row = false, commit xact after each row = false
query
- query to run.StandardException
- Standard exception policy.java.sql.SQLException
java.io.IOException
private void runQueryBlob(java.lang.String query, boolean freelob, boolean commitAfterLobVerify) throws java.sql.SQLException, java.io.IOException
Expects input query to return single column per row, which is a blob. Will verify blob using verifyBlob().
query
- query to run.freelob
- true if we should free the lob after it has
been retrieved and verified.commitAfterLobVerify
- true if we should commit after the lob has
been retrieved and verified.StandardException
- Standard exception policy.java.sql.SQLException
java.io.IOException
private void verifyClob(java.io.Reader input, int length, java.io.Reader expected) throws java.sql.SQLException, java.io.IOException
java.sql.SQLException
java.io.IOException
private void verifyBlob(java.io.InputStream is, int length, int id) throws java.sql.SQLException, java.io.IOException
java.sql.SQLException
java.io.IOException
public void test1ToManyJoinClob() throws java.sql.SQLException, java.io.IOException
Test case of a 1 to many row join where the 1 row contains and returns a clob as a stream. Before fix for DERBY-3650 each row returned from this join would contain a reference to the same stream which would fail in various ways depending on commit, free, and reading the stream.
java.sql.SQLException
java.io.IOException
public void test1ToManyJoinBlob() throws java.sql.SQLException, java.io.IOException
Test case of a 1 to many row join where the 1 row contains and returns a blob as a stream. Before fix for DERBY-3650 each row returned from this join would contain a reference to the same stream which would fail in various ways depending on commit, free, and reading the stream.
java.sql.SQLException
java.io.IOException
public void test1ToManyHashJoinClob() throws java.sql.SQLException, java.io.IOException
java.sql.SQLException
java.io.IOException
public void test1ToManyHashJoinBlob() throws java.sql.SQLException, java.io.IOException
java.sql.SQLException
java.io.IOException
public void test1ToManyleftOuterJoinClob() throws java.sql.SQLException, java.io.IOException
java.sql.SQLException
java.io.IOException
public void test1ToManyleftOuterJoinBlob() throws java.sql.SQLException, java.io.IOException
java.sql.SQLException
java.io.IOException
public void testClobSelect() throws java.sql.SQLException, java.io.IOException
java.sql.SQLException
java.io.IOException
public void testBlobSelect() throws java.sql.SQLException, java.io.IOException
java.sql.SQLException
java.io.IOException
private static void initializeClobTables(java.sql.Statement stmt) throws java.sql.SQLException, java.io.IOException
java.sql.SQLException
java.io.IOException
private static void initializeBlobTables(java.sql.Statement stmt) throws java.sql.SQLException, java.io.IOException
java.sql.SQLException
java.io.IOException
protected static junit.framework.Test baseSuite(java.lang.String name)
public static junit.framework.Test suite()
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.