public class Derby4577Test extends StoreBaseTest
SPACE_INFO_ESTIMSPACESAVING, SPACE_INFO_IS_INDEX, SPACE_INFO_NUM_ALLOC, SPACE_INFO_NUM_FREE, SPACE_INFO_NUM_UNFILLED, SPACE_INFO_NUMCOLS, SPACE_INFO_PAGE_SIZE
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
Derby4577Test(java.lang.String name)
Public Methods of XXXX class:
|
Modifier and Type | Method and Description |
---|---|
protected static junit.framework.Test |
baseSuite(java.lang.String name) |
static junit.framework.Test |
suite() |
void |
testDERBY_4577()
DERBY-4577 test case
The update error occurs with the following:
o update of a long row which requires an update on it's overflow page
o The portion of the long row on the overflow page needs to have
max(row size, reserved space) + free space on page <= 12
(12 causes the error, other values might also).
|
void |
testSmallRow1() |
getSpaceInfo
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, setUp, toString
public Derby4577Test(java.lang.String name)
public void testDERBY_4577() throws java.sql.SQLException
The update error occurs with the following: o update of a long row which requires an update on it's overflow page o The portion of the long row on the overflow page needs to have max(row size, reserved space) + free space on page <= 12 (12 causes the error, other values might also). In order to get to this one needs multiple rows on the overflow page, so that they can eat up the free space on the page. This test simulates the overflow page state that I got from running the test case associated with DERBY-2286. I could only repro on a fast dual core linux machine. I repro'd a few times and it always had 3 rows on the page: one that had a long column pointer, one that had a long row pointer, and one that had the blob on the page eating up most of the space on the overflow page. The test does the following: o drop/create table o insert 3 rows of interest that will all fit on 1st page, with 1 byte blob columns. o insert a dummy row that will fill up the rest of the 1st page. o update 1st 3 rows so that they are now all long rows that share the same overflow page. o update row 1 so that it now has a long column, this actually shrinks it on this overflow page. o update row 2 so that blob column is bigger, but still less than a page this results in row 2 getting another long row pointer to a page that holds the new blob value. Again this actually shrinks the row piece on the overflow page in question. o update row 3 so that it's overflow piece fills up all the remaining space on the overflow page. o finally update row 1's long column, this update causes the bug. The no space error should never be thrown to a user on an update. The only time an error of this type is allowed is if the actual disk is full.
java.sql.SQLException
public void testSmallRow1() throws java.sql.SQLException
java.sql.SQLException
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.