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_UPGRADEDEFAULT_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, oldLessThanassertCallError, assertCheckTable, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertErrorCode, assertGetIntError, assertNextError, assertPreparedStatementError, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertStatementErrorUnordered, assertTableRowCount, assertUpdateCount, assertUpdateCount, assertWarning, checkAllConsistency, checkEstimatedRowCount, closeStatement, commit, createStatement, createStatement, createStatement, dropTable, dropTable, dropView, dropView, emptyStatementCache, getClientTransactionID, getConnection, getDatabaseProperty, getLastSQLException, 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, assertExecJavaCmdAsExpected, assertLaunchedJUnitTestMethod, assertLaunchedJUnitTestMethod, assertSecurityManager, assertThrowableEquals, currentDirectory, execJavaCmd, execJavaCmd, fail, getClassVersionMajor, getEmmaJar, getFailureFolder, getFilesWith, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, hasInterruptibleIO, isCVM, isIBMJVM, isJ9Platform, isJava5, isJava7, isJava8, isPhoneME, isPlatform, isSunJVM, isWindowsPlatform, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeFiles, removeSystemProperty, runsWithEmma, runsWithJaCoCo, setSystemProperty, sleep, sleepAtLeastOneTick, traceitassertEquals, 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(int phase)
phase - an integer that indicates the current phase in
the upgrade test.public void testMetaDataQueryRunInSYScompilationSchema()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testTableFunctionDeclaration()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testRoutineParameters()
throws java.sql.SQLException
java.sql.SQLExceptionprivate 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.Exceptionprivate void createTablesForIndexTesting(java.sql.Statement s,
java.lang.String prefix)
throws java.lang.Exception
s - Statementprefix - prefix for table namesjava.lang.Exceptionpublic void testIndexes()
throws java.lang.Exception
java.lang.Exceptionpublic void testUniqueConstraint()
throws java.sql.SQLException
java.sql.SQLException - at any unexpected failure.private void verifyError()
throws java.sql.SQLException
java.sql.SQLExceptionprivate void prepareTable()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testErrorMessage()
throws java.lang.Exception
java.lang.Exceptionpublic void testAlterColumnOfUniqueConstraint()
throws java.lang.Exception
java.lang.ExceptionApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.