public final class ConglomerateSharingTest extends BaseJDBCTestCase
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
COUNT_TABLE_CONGLOMS |
private java.lang.String |
GET_CONSTRAINT_NAMES |
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE| Constructor and Description |
|---|
ConglomerateSharingTest(java.lang.String name)
Public constructor required for running test as standalone JUnit.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
checkStatementError(java.lang.String sqlState,
java.sql.Statement st,
java.lang.String query,
java.lang.String ixOrConstraint)
Execute the received statement and assert that:
1.
|
private void |
countConglomerates(java.lang.String tableName,
java.sql.PreparedStatement countCongloms,
int expected)
Count the number of physical conglomerates that exist for
the received table, and assert that the number found matches
the expected number.
|
static junit.framework.Test |
suite()
Create a suite of tests.
|
void |
testConstraintDrops()
Test various conditions in which a constraint can be dropped,
and verify that if the constraint's backing conglomerate is
shared, we do the right thing.
|
void |
testConversionToNonUnique()
If we have a unique constraint and a non-unique constraint
which a) reference the same columns and b) share a single
(unique) conglomerate, then test that dropping the unique
constraint will convert the physical conglomerate to be
non-unique.
|
void |
testUniqueConstraintWithNullsBackingIndex()
Test conglomerate sharing when a unique constraint having one or
more nullable columns is in play (possible as of DERBY-3330).
|
private void |
verifyConstraints(java.sql.Statement st,
java.sql.PreparedStatement constraintNames,
java.lang.String tName,
java.lang.String constraintName,
java.lang.String[][] remainingConstraints,
int numRowsExpected)
Do various checks to ensure that the constraint has truly
been dropped.
|
assertCallError, 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 final java.lang.String COUNT_TABLE_CONGLOMS
private final java.lang.String GET_CONSTRAINT_NAMES
public ConglomerateSharingTest(java.lang.String name)
public static junit.framework.Test suite()
public void testConversionToNonUnique()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testConstraintDrops()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testUniqueConstraintWithNullsBackingIndex()
throws java.sql.SQLException
java.sql.SQLExceptionprivate void countConglomerates(java.lang.String tableName,
java.sql.PreparedStatement countCongloms,
int expected)
throws java.sql.SQLException
java.sql.SQLExceptionprivate void checkStatementError(java.lang.String sqlState,
java.sql.Statement st,
java.lang.String query,
java.lang.String ixOrConstraint)
throws java.sql.SQLException
java.sql.SQLExceptionprivate void verifyConstraints(java.sql.Statement st,
java.sql.PreparedStatement constraintNames,
java.lang.String tName,
java.lang.String constraintName,
java.lang.String[][] remainingConstraints,
int numRowsExpected)
throws java.sql.SQLException
java.sql.SQLExceptionApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.