public class BasicSetup extends UpgradeChange
Modifier and Type | Field and Description |
---|---|
(package private) java.lang.String |
A_COL |
(package private) java.lang.String |
B_COL |
(package private) int |
FAILURES |
(package private) int |
TEST_COUNT |
oldVersion, PH_CREATE, PH_HARD_UPGRADE, PH_POST_HARD_UPGRADE, PH_POST_SOFT_UPGRADE, PH_SOFT_UPGRADE, phase, PHASES, SQLSTATE_NEED_UPGRADE
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
BasicSetup(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
private void |
assertDERBY5289ResultsAndDelete()
Private helper method for fixture testDERBY5289TriggerUpgradeFormat
to check and cleanup date in each phase.
|
void |
atestTriggersWithLOBcolumns() |
static void |
clearSPSPlans()
Stored procedure that clears all SPS plans in the database.
|
private java.lang.String |
columnName(java.lang.String stub,
int idx) |
private int[][] |
constructPowerSet(int count) |
private void |
createT1(int[] triggerCols,
int[] permutation) |
private void |
createT2(int columnCount,
int[] triggerCols,
int[] permutation) |
private void |
createTrigger(int[] triggerCols,
int[] permutation) |
void |
dropAllTriggerPlans()
Test case that drops all trigger plans.
|
private void |
dropColumn_triggersql_DERBY5044_And_DERBY5120(java.sql.Statement s) |
private void |
fail(int[] statusCounters,
int[] triggerCols,
int[] permutation,
int[] updateColumns,
java.lang.String detail) |
private int[] |
getResults(int rowLength,
java.lang.String text) |
private void |
include(java.util.ArrayList<int[]> list,
int idx,
boolean[] inclusions) |
private void |
include(java.util.ArrayList<int[]> list,
int idx,
boolean[] inclusions,
boolean currentCell) |
private void |
loadData(int columnCount,
int[] triggerCols,
int[] permutation) |
private java.lang.String |
makeTableName(java.lang.String stub,
int[] triggerCols,
int[] permutation) |
private java.lang.String |
makeTriggerName(java.lang.String stub,
int[] triggerCols,
int[] permutation) |
void |
noConnectionAfterHardUpgrade()
Ensure that after hard upgrade (with the old version)
we can no longer connect to the database.
|
private int |
numberOfRowsInSysdepends(java.sql.Statement st) |
private boolean |
overlap(int[] left,
int[] right) |
private void |
permute(java.util.ArrayList<int[]> list,
int[] start,
int[] remainder) |
private int[][] |
permute(int[][] original) |
private void |
preapreForDERBY5044_And_DERBY5120() |
void |
preapreFortDERBY5044() |
void |
preapreFortDERBY5120() |
private void |
runTrigger(int[] statusCounters,
int columnCount,
int[] triggerCols,
int[] permutation,
int[] updateColumns) |
private java.lang.String |
stringify(int[] array) |
private java.lang.String |
stringify(int[][] array) |
static junit.framework.Test |
suite() |
private void |
summarize(int[] statusCounters) |
void |
testCreateTable()
Make sure table created in soft upgrade mode can be
accessed after shutdown.
|
void |
testDERBY4753()
Verify that recompilation of a stale meta-data query works in soft
upgrade.
|
void |
testDERBY5044_And_DERBY5120_DropColumn()
Following test is for checking the upgrade scenario for DERBY-5044
and DERBY-5120.
|
void |
testDERBY5044AlterTableDropColumn()
DERBY-5044(ALTER TABLE DROP COLUMN will not detect triggers defined
on other tables with their trigger action using the column being
dropped)
ALTER TABLE DROP COLUMN should detect triggers defined on other table
but using the table being altered in their trigger action.
|
void |
testDERBY5120NumRowsInSydependsForTrigger() |
void |
testDERBY5121TriggerDataCorruption()
Changes made for DERBY-1482 caused corruption which is being logged
under DERBY-5121.
|
void |
testDERBY5121TriggerTest2() |
void |
testDERBY5289TriggerUpgradeFormat()
DERBY-5289 Upgrade could fail during upgrade with triggers due to
failure reading serializable or SQLData object
|
void |
testDERBY6314()
Regression test case for DERBY-6314, which caused upgrade to fail if a
metadata query had been executed with the old version of the database.
|
void |
testDML()
Test general DML.
|
void |
testDropTableAfterUpgradeWithConstraint()
DERBY-5249 table created with primary and foreign key can't be dropped
Test currently disabled.
|
void |
testExhuastivePermutationOfTriggerColumns() |
void |
testIndex()
Test table with index can be read after
shutdown DERBY-2931
|
void |
testOldVersion()
Simple test of the old version from the meta data.
|
void |
testTriggerBasic()
Simple test of the triggers.
|
private void |
triggersql_for_DERBY5044_And_DERBY5120(java.sql.Statement s) |
private java.lang.String |
updateData(int[] statusCounters,
int[] triggerCols,
int[] permutation,
int[] updateColumns) |
private void |
vetData(int[] statusCounters,
int[] triggerCols,
int[] permutation,
int[] updateColumns,
java.lang.String updateStatement) |
void |
xmlTestTriggerWithXMLOperators()
Test that triggers that use XML operators work after upgrade.
|
getOldFixPack, getOldMajor, getOldMinor, getOldPoint, getOldVersion, getOldVersionString, getPhase, getPhaseString, oldAtLeast, oldIs, oldIs, oldLessThan
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
final int TEST_COUNT
final int FAILURES
final java.lang.String A_COL
final java.lang.String B_COL
public static junit.framework.Test suite()
public void testTriggerBasic() throws java.sql.SQLException
java.sql.SQLException
public void testOldVersion() throws java.sql.SQLException
java.sql.SQLException
public void testDML() throws java.sql.SQLException
java.sql.SQLException
public void testCreateTable() throws java.sql.SQLException
java.sql.SQLException
public void testIndex() throws java.sql.SQLException
java.sql.SQLException
public void noConnectionAfterHardUpgrade()
public void dropAllTriggerPlans() throws java.lang.Exception
java.lang.Exception
public static void clearSPSPlans() throws java.sql.SQLException
java.sql.SQLException
public void testDropTableAfterUpgradeWithConstraint() throws java.sql.SQLException
java.sql.SQLException
public void testDERBY5121TriggerTest2() throws java.lang.Exception
java.lang.Exception
public void preapreFortDERBY5120() throws java.lang.Exception
java.lang.Exception
public void testDERBY5120NumRowsInSydependsForTrigger() throws java.lang.Exception
java.lang.Exception
private int numberOfRowsInSysdepends(java.sql.Statement st) throws java.sql.SQLException
java.sql.SQLException
public void testDERBY5044_And_DERBY5120_DropColumn() throws java.lang.Exception
java.lang.Exception
private void dropColumn_triggersql_DERBY5044_And_DERBY5120(java.sql.Statement s) throws java.lang.Exception
java.lang.Exception
private void preapreForDERBY5044_And_DERBY5120() throws java.lang.Exception
java.lang.Exception
private void triggersql_for_DERBY5044_And_DERBY5120(java.sql.Statement s) throws java.lang.Exception
java.lang.Exception
public void testDERBY5044AlterTableDropColumn() throws java.lang.Exception
java.lang.Exception
public void preapreFortDERBY5044() throws java.lang.Exception
java.lang.Exception
public void testDERBY5121TriggerDataCorruption() throws java.lang.Exception
java.lang.Exception
public void atestTriggersWithLOBcolumns() throws java.lang.Exception
java.lang.Exception
public void testExhuastivePermutationOfTriggerColumns() throws java.lang.Exception
java.lang.Exception
private int[][] constructPowerSet(int count)
private void include(java.util.ArrayList<int[]> list, int idx, boolean[] inclusions)
private void include(java.util.ArrayList<int[]> list, int idx, boolean[] inclusions, boolean currentCell)
private int[][] permute(int[][] original)
private void permute(java.util.ArrayList<int[]> list, int[] start, int[] remainder)
private java.lang.String columnName(java.lang.String stub, int idx)
private void createT1(int[] triggerCols, int[] permutation) throws java.lang.Exception
java.lang.Exception
private void createT2(int columnCount, int[] triggerCols, int[] permutation) throws java.lang.Exception
java.lang.Exception
private java.lang.String makeTableName(java.lang.String stub, int[] triggerCols, int[] permutation)
private void createTrigger(int[] triggerCols, int[] permutation) throws java.lang.Exception
java.lang.Exception
private java.lang.String makeTriggerName(java.lang.String stub, int[] triggerCols, int[] permutation)
private int[] getResults(int rowLength, java.lang.String text) throws java.lang.Exception
java.lang.Exception
private boolean overlap(int[] left, int[] right)
private void vetData(int[] statusCounters, int[] triggerCols, int[] permutation, int[] updateColumns, java.lang.String updateStatement) throws java.lang.Exception
java.lang.Exception
private void runTrigger(int[] statusCounters, int columnCount, int[] triggerCols, int[] permutation, int[] updateColumns) throws java.lang.Exception
java.lang.Exception
private void loadData(int columnCount, int[] triggerCols, int[] permutation) throws java.lang.Exception
java.lang.Exception
private java.lang.String updateData(int[] statusCounters, int[] triggerCols, int[] permutation, int[] updateColumns) throws java.lang.Exception
java.lang.Exception
private void fail(int[] statusCounters, int[] triggerCols, int[] permutation, int[] updateColumns, java.lang.String detail)
private void summarize(int[] statusCounters)
private java.lang.String stringify(int[][] array)
private java.lang.String stringify(int[] array)
public void xmlTestTriggerWithXMLOperators() throws java.sql.SQLException
java.sql.SQLException
public void testDERBY5289TriggerUpgradeFormat() throws java.sql.SQLException
java.sql.SQLException
private void assertDERBY5289ResultsAndDelete() throws java.sql.SQLException
java.sql.SQLException
public void testDERBY6314() throws java.sql.SQLException
java.sql.SQLException
public void testDERBY4753() throws java.sql.SQLException
java.sql.SQLException
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.