public class Changes10_10 extends UpgradeChange
| Modifier and Type | Field and Description |
|---|---|
(package private) static double[] |
beyondDB2Double |
(package private) static float[] |
beyondDB2Real |
private static java.lang.String |
DB_README_FILE_NAME
The readme file cautioning users against touching the files in
the database directory
|
private static java.lang.String |
HARD_UPGRADE_REQUIRED |
private static java.lang.String |
NEEDS_JAVA_STYLE |
private static java.lang.String |
SYNTAX_ERROR |
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_10(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
private void |
assertSetError(java.sql.PreparedStatement ps,
double dv,
boolean defer) |
private void |
assertSetError(java.sql.PreparedStatement ps,
float fv,
boolean defer) |
private void |
assertUpdateError(java.sql.PreparedStatement ps,
double fv,
boolean defer) |
private void |
assertUpdateError(java.sql.PreparedStatement ps,
float fv,
boolean defer) |
private void |
lookForReadmeFile(java.lang.String path,
boolean fileShouldExist)
For pre-10.10 database, fileShouldExist will be false.
|
static junit.framework.Test |
suite(int phase)
Return the suite of tests to test the changes made in 10.10.
|
void |
testFloatLimits()
Verify upgrade behavior DERBY-3398: removing DB2 float limits
|
void |
testProcsNewTo10_10()
Make sure that the following procedure(s) which are new to 10.10 are
only available after hard-upgrade
1)invalidate stored statements
SYCS_UTIL.SYSCS_INVALIDATE_STORED_STATEMENTS
|
void |
testReadMeFiles()
DERBY-5996(Create readme files (cautioning users against modifying
database files) at database hard upgrade time)
Simple test to make sure readme files are getting created
|
void |
testUDAs()
Verify upgrade behavior for user-defined aggregates.
|
void |
testVarargss()
Verify upgrade behavior for vararg routines.
|
private void |
verifyDB2Behavior(java.sql.PreparedStatement psSelect,
java.sql.PreparedStatement psInsertReal,
java.sql.PreparedStatement psInsertDouble,
boolean defer)
Check that the old DB2 limits are (still) enforced.
|
private void |
vetProcs(java.sql.Statement s,
java.lang.String procCall,
boolean shouldExist,
java.lang.String sqlState) |
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, toStringprivate static final java.lang.String SYNTAX_ERROR
private static final java.lang.String HARD_UPGRADE_REQUIRED
private static final java.lang.String NEEDS_JAVA_STYLE
private static final java.lang.String DB_README_FILE_NAME
static final float[] beyondDB2Real
static final double[] beyondDB2Double
public static junit.framework.Test suite(int phase)
phase - an integer that indicates the current phase in
the upgrade test.public void testProcsNewTo10_10()
throws java.lang.Exception
java.lang.Exceptionprivate void vetProcs(java.sql.Statement s,
java.lang.String procCall,
boolean shouldExist,
java.lang.String sqlState)
throws java.lang.Exception
java.lang.Exceptionpublic void testUDAs()
throws java.lang.Exception
java.lang.Exceptionpublic void testVarargss()
throws java.lang.Exception
java.lang.Exceptionpublic void testReadMeFiles()
throws java.sql.SQLException,
java.io.IOException
java.sql.SQLExceptionjava.io.IOExceptionprivate void lookForReadmeFile(java.lang.String path,
boolean fileShouldExist)
throws java.io.IOException
path - - this can be root database directory, log or seg0 directoryfileShouldExist - java.io.IOExceptionpublic void testFloatLimits()
throws java.lang.Exception
java.lang.Exceptionprivate void assertSetError(java.sql.PreparedStatement ps,
float fv,
boolean defer)
throws java.sql.SQLException
java.sql.SQLExceptionprivate void assertSetError(java.sql.PreparedStatement ps,
double dv,
boolean defer)
throws java.sql.SQLException
java.sql.SQLExceptionprivate void assertUpdateError(java.sql.PreparedStatement ps,
float fv,
boolean defer)
throws java.sql.SQLException
java.sql.SQLExceptionprivate void assertUpdateError(java.sql.PreparedStatement ps,
double fv,
boolean defer)
throws java.sql.SQLException
java.sql.SQLExceptionprivate void verifyDB2Behavior(java.sql.PreparedStatement psSelect,
java.sql.PreparedStatement psInsertReal,
java.sql.PreparedStatement psInsertDouble,
boolean defer)
throws java.sql.SQLException
defer - In soft upgrade mode, the checking if deferred after
DERBY-3398, i.e. instead of throwing on the DB2 limits when calling
ResultSet#updateXXX or PreparedStatement#setXXX, the
check throws on ResultSet#updateRow, or {#insertRow}, and
similarly on PreparedStatement#execute or #executeUpdate.java.sql.SQLException - if we see some expected error.Apache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.