public class Changes10_4 extends UpgradeChange
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 |
---|
Changes10_4(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
private void |
createTablesForIndexTesting(java.sql.Statement s,
java.lang.String prefix)
Creates tables to test indexes during and after soft and hard
upgrades
|
private void |
prepareTable()
Generates error messages and stores in a table.
|
static junit.framework.Test |
suite(int phase)
Return the suite of tests to test the changes made in 10.4.
|
void |
testAlterColumnOfUniqueConstraint()
Tests if alter column works for a column in unique constraint.
|
void |
testErrorMessage()
check if error message generated during soft upgrade is
same as privious version.
|
void |
testIndexes()
Test index created before upgrades to insure their behaviour
remains same after soft and hard upgrades.
|
private void |
testIndexes(java.sql.Statement s,
java.lang.String tableName,
int val,
boolean nulls,
boolean duplicate)
Tests whether or not indexes are exibiting their expected behaviour.
|
void |
testMetaDataQueryRunInSYScompilationSchema()
Check that even though we have set schema to a user schema, the
metadata queries get run with compilation schema as SYS.
|
void |
testRoutineParameters()
Test that routine parameters and return types are
handled correctly with 10.4 creating a procedure
in soft-upgrade. 10.4 simplified the stored
format of the types by ensuring the catalog
type was written.
|
void |
testTableFunctionDeclaration()
Check that you must be hard-upgraded to 10.4 or later in order to declare
table functions.
|
void |
testUniqueConstraint()
Tests Unique constraint in soft and hard upgrade enviornment.
|
private void |
verifyError()
Verifies error messages priviously generated.
|
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
public static junit.framework.Test suite(int phase)
phase
- an integer that indicates the current phase in
the upgrade test.public void testMetaDataQueryRunInSYScompilationSchema() throws java.sql.SQLException
java.sql.SQLException
public void testTableFunctionDeclaration() throws java.sql.SQLException
java.sql.SQLException
public void testRoutineParameters() throws java.sql.SQLException
java.sql.SQLException
private void testIndexes(java.sql.Statement s, java.lang.String tableName, int val, boolean nulls, boolean duplicate) throws java.lang.Exception
s
- StatementtableName
- table name to be used for testingval
- value to be used for insertionnulls
- if nulls are allowedduplicate
- if duplicates are allowedjava.lang.Exception
private void createTablesForIndexTesting(java.sql.Statement s, java.lang.String prefix) throws java.lang.Exception
s
- Statementprefix
- prefix for table namesjava.lang.Exception
public void testIndexes() throws java.lang.Exception
java.lang.Exception
public void testUniqueConstraint() throws java.sql.SQLException
java.sql.SQLException
- at any unexpected failure.private void verifyError() throws java.sql.SQLException
java.sql.SQLException
private void prepareTable() throws java.sql.SQLException
java.sql.SQLException
public void testErrorMessage() throws java.lang.Exception
java.lang.Exception
public void testAlterColumnOfUniqueConstraint() throws java.lang.Exception
java.lang.Exception
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.