public class st_reclaim_longcol extends BaseJDBCTestCase
| Modifier and Type | Field and Description |
|---|---|
(package private) static boolean |
verbose |
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE| Constructor and Description |
|---|
st_reclaim_longcol(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
private java.sql.ResultSet |
getSpaceTable(java.lang.String table)
Invoke SYSCS_DIAG.SPACE_TABLE on the specified table in the current
schema.
|
private void |
printCurrentRow(java.sql.ResultSet rs)
Print the value of all columns in the current row of the specified
result set, if debugging is enabled.
|
static junit.framework.Test |
suite() |
private void |
test1(int blob_size,
int num_rows)
Test reclaim of a single deleted blob on a page with non-deleted rows.
|
private void |
test2(int blob_size,
int work_size,
int total_work)
DERBY-1913
test2 is too sensitive to machine speed and background thread
processing.
|
void |
testList() |
private void |
wait_for_max_allocated(java.lang.String test_name,
int alloc_wait_count)
wait for background thread to convert allocated pages to free pages
Wait until the total number of allocated pages is <= alloc_wait_count.
|
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, usingEmbeddedalarm, 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, isJava8, isPhoneME, isPlatform, isSunJVM, isWindowsPlatform, newAssertionFailedError, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeFiles, removeSystemProperty, runsWithEmma, runsWithJaCoCo, setSystemErr, setSystemOut, setSystemProperty, sleep, sleepAtLeastOneTick, traceit, vmAtLeastassertEquals, 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, setUp, toStringpublic static junit.framework.Test suite()
private void test1(int blob_size,
int num_rows)
throws java.sql.SQLException
loops through inserting alternating long and short column rows resulting in pages with 1 short and one long. Deletes the long column row and tests that space from the long column row is reclaimed even though there are non-deleted rows on the page.
java.sql.SQLExceptionprivate void test2(int blob_size,
int work_size,
int total_work)
throws java.sql.SQLException
test2 is too sensitive to machine speed and background thread processing. It would be better suited as a long running stress test if someone has the inclination. Disabling this test for now. test1 covers the original intent to test that blobs are immediately marked for post commit on individual delete, rather than waiting for all rows on a page to be deleted.
java.sql.SQLExceptionprivate java.sql.ResultSet getSpaceTable(java.lang.String table)
throws java.sql.SQLException
java.sql.SQLExceptionprivate void printCurrentRow(java.sql.ResultSet rs)
throws java.sql.SQLException
java.sql.SQLExceptionprivate void wait_for_max_allocated(java.lang.String test_name,
int alloc_wait_count)
throws java.sql.SQLException
Wait until the total number of allocated pages is <= alloc_wait_count. The expectation is that the test has performed some deletes and committed allowing the background task converted empty allocated pages with only deleted rows into free pages. On an machine with some idle processors only a short wait should be necessary. But on machines with lots of load, possibly other tests running just sleeping does not guarantee background thread an immediate chance to run. Without this extra wait some nightly's were seeing failures, see DERBY-1913.
java.sql.SQLExceptionpublic void testList()
throws java.sql.SQLException
java.sql.SQLExceptionApache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.