public class DeclareGlobalTempTableJavaTest extends BaseJDBCTestCase
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
DeclareGlobalTempTableJavaTest(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
dropSchemaTables()
A Utility method that deletes all the SESSION schema tables before each fixture.
|
protected void |
setUp() |
static junit.framework.Test |
suite() |
protected void |
tearDown()
Tear down this fixture, sub-classes should call
super.tearDown().
|
void |
testConstraintsAllowedOnSESSIONPhysicalTables()
Test the constraints allowed on physical tables in SESSION schema.
|
void |
testConstraintsNotAllowedOnGTTs()
Test the various constraints not allowed on temp tables namely primary
key constraints , Unique constraints , check constraints and foreign key
constraints.
|
void |
testCreateView()
CREATE VIEW in SESSION schema referencing a table outside of SESSION
schema.
|
void |
testDatabaseMetadata()
DatabaseMetaData.getTables() should not return temporary tables
|
void |
testDeleteOnGTT()
Test Delete Operation on temp tables.
|
void |
testDeleteWhereCurrentOfOnGTT()
Test for delete where current of on temporary tables
|
void |
testDerby1706()
Test switching to session schema (it doesn't yet exist because no create
schema session has been issued yet) and then try to create first persistent
object in it.
|
void |
testDMLRollback1()
Prepared statement test - DML and rollback behavior
|
void |
testDMLRollback2()
Prepared statement test - DML and rollback behavior.
|
void |
testDuplicateAndNullGTT()
Test that We can't create the temp table twice and we can'd drop a temp
table that doesn't wxist.
|
void |
testEntryForSEESSIONtoSysCatalog()
Verify that there is no entry in system catalogs for SESSION schmea after
declare table.
|
void |
testEntryForSESSIONTablesToSysCatalog()
The Test Verifies that there is no entry in system catalogs for temporary
tables. while physical tables from SESSION schema have an entry.
|
void |
testFeaturesAllowedOnPhysicalTablesOfSESSIONSchema()
Test some features that allowed on physical tables in SESSION Schema
|
void |
testFeaturesNotAllowedOnGTTs()
Test some of the features that are not allowed on temp tables namely
ALTER TABLE , LOCK TABLE , RENAME TABLE , CREATE INDEX AND CREATE VIEW
CREATE VIEW is some what special in that it can't have reference to the
temp tables.
|
void |
testGTTSchemaName()
Test the schema of Golabal Temporary Tables.
|
void |
testInsertOnGTT()
Test That Insert command allowed on temp tables in various conditions.
|
void |
testNegativeGrammars()
Some Negative Grammar tests for the DECLARE GLOBAL TEMPORARY TABLE
|
void |
testOnCommiDeleteRowsWithAndWithoutOpenCursors()
Test declared temporary table with ON COMMIT DELETE ROWS with and without
open cursors.
|
void |
testOnCommitPreserveRowsWithAndWithoutOpenCursors()
Declare a temporary table with ON COMMIT PRESERVE ROWS with and without
open cursors.
|
void |
testOneGTTInConnection()
Temporary table created in one connection should not be available in
another connection.
|
void |
testPositiveGrammars()
Some positive Grammar tests for the DECLARE GLOBAL TEMPORARY TABLE
|
void |
testPreparedStatement1()
Prepared statement test - drop the temp table underneath
|
void |
testPreparedStatement2()
Prepared statement test - drop and recreate the temp table with different
definition underneath
|
void |
testRollbackBehavior1()
Rollback behavior - declare temp table, rollback, select should fail.
|
void |
testRollbackBehavior2()
Rollback behavior - declare temp table, commit, drop temp table,
rollback, select should pass
|
void |
testRollbackBehavior3()
Rollback behavior - create temp table , commit , drop it and create
another temp table with samename , rollback select will select from the
first temp table.
|
void |
testRollbackBehavior4()
Rollback behavior for tables touched with DML
|
void |
testSameGTTNameForTwoConnections()
Temp table in one connection should not conflict with temp table with
same name in another connection.
|
void |
testSESSIONQualifier()
After creating SESSION schema and making it current schema, temporary
tables should not require SESSION qualification
|
void |
testSESSIONschema()
Test CREATE and DROP operations on SESSION schema
|
void |
testStatementCaching()
Multiple tests to make sure we do not do statement caching for statement
referencing SESSION schema tables.
|
void |
testTempTableDDLRollbackbehaviour1()
Temporary table create and drop Rollback behaviour
Tests the basic function of temporary table with holdability
|
void |
testTempTableDDLRollbackbehaviour2()
Temporary table create and drop Rollback behaviour
Tests drop of temp table and rollback - select should still work
|
void |
testTempTableDDLRollbackbehaviour3()
Temporary table create and drop Rollback behaviour
Tests drop of temp table and commit - select should no longer work
|
void |
testTempTableDDLRollbackbehaviour4()
Temporary table create and drop Rollback behaviour
Tests create of temp table and rollback - select should fail
|
void |
testUpdateOnGTT()
Test Update on temp tables in various ways.
|
void |
testVtiInsertIntoGTT()
Tests that you can insert data into a GTT with a VTI as the source.
|
void |
UpdateWhereCurrentOfOnGTT()
Test for update where current of on temporary tables
|
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, 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, toString
public DeclareGlobalTempTableJavaTest(java.lang.String name)
public static junit.framework.Test suite()
protected void setUp() throws java.lang.Exception
setUp
in class junit.framework.TestCase
java.lang.Exception
protected void tearDown() throws java.lang.Exception
BaseJDBCTestCase
tearDown
in class BaseJDBCTestCase
java.lang.Exception
public void testDerby1706() throws java.sql.SQLException
java.sql.SQLException
- Thrown if some unexpected error happenspublic void testGTTSchemaName() throws java.sql.SQLException
java.sql.SQLException
- Thrown if some unexpected error happenspublic void testPositiveGrammars() throws java.sql.SQLException
java.sql.SQLException
- Thrown if some unexpected error happenspublic void testNegativeGrammars() throws java.sql.SQLException
java.sql.SQLException
- Thrown if some unexpected error happenspublic void testFeaturesNotAllowedOnGTTs() throws java.sql.SQLException
java.sql.SQLException
public void testFeaturesAllowedOnPhysicalTablesOfSESSIONSchema() throws java.sql.SQLException
java.sql.SQLException
public void testConstraintsNotAllowedOnGTTs() throws java.sql.SQLException
java.sql.SQLException
public void testConstraintsAllowedOnSESSIONPhysicalTables() throws java.sql.SQLException
java.sql.SQLException
public void testOnCommiDeleteRowsWithAndWithoutOpenCursors() throws java.sql.SQLException
java.sql.SQLException
- Thrown if some unexpected error happenspublic void testOnCommitPreserveRowsWithAndWithoutOpenCursors() throws java.sql.SQLException
java.sql.SQLException
- Thrown if some unexpected error happenspublic void testDuplicateAndNullGTT() throws java.sql.SQLException
java.sql.SQLException
public void testInsertOnGTT() throws java.sql.SQLException
java.sql.SQLException
public void testDeleteOnGTT() throws java.sql.SQLException
java.sql.SQLException
public void testUpdateOnGTT() throws java.sql.SQLException
java.sql.SQLException
public void testSESSIONschema() throws java.sql.SQLException
java.sql.SQLException
public void testCreateView() throws java.sql.SQLException
java.sql.SQLException
public void testStatementCaching() throws java.sql.SQLException
java.sql.SQLException
- Thrown if some unexpected error happenspublic void testSESSIONQualifier() throws java.sql.SQLException
java.sql.SQLException
public void testOneGTTInConnection() throws java.sql.SQLException
java.sql.SQLException
- Thrown if some unexpected error happenspublic void testSameGTTNameForTwoConnections() throws java.sql.SQLException
java.sql.SQLException
- Thrown if some unexpected error happenspublic void testPreparedStatement1() throws java.sql.SQLException
java.sql.SQLException
public void testPreparedStatement2() throws java.sql.SQLException
java.sql.SQLException
public void testTempTableDDLRollbackbehaviour1() throws java.sql.SQLException
java.sql.SQLException
public void testTempTableDDLRollbackbehaviour2() throws java.sql.SQLException
java.sql.SQLException
public void testTempTableDDLRollbackbehaviour3() throws java.sql.SQLException
java.sql.SQLException
public void testTempTableDDLRollbackbehaviour4() throws java.sql.SQLException
java.sql.SQLException
public void testRollbackBehavior1() throws java.sql.SQLException
java.sql.SQLException
public void testRollbackBehavior2() throws java.sql.SQLException
java.sql.SQLException
public void testRollbackBehavior3() throws java.sql.SQLException
java.sql.SQLException
public void testRollbackBehavior4() throws java.sql.SQLException
java.sql.SQLException
public void testEntryForSESSIONTablesToSysCatalog() throws java.sql.SQLException
java.sql.SQLException
public void testEntryForSEESSIONtoSysCatalog() throws java.sql.SQLException
java.sql.SQLException
public void testDatabaseMetadata() throws java.sql.SQLException
java.sql.SQLException
public void testDeleteWhereCurrentOfOnGTT() throws java.sql.SQLException
java.sql.SQLException
public void UpdateWhereCurrentOfOnGTT() throws java.sql.SQLException
java.sql.SQLException
public void testDMLRollback1() throws java.sql.SQLException
java.sql.SQLException
public void testDMLRollback2() throws java.sql.SQLException
java.sql.SQLException
- Thrown if some unexpected error happenspublic void testVtiInsertIntoGTT() throws java.sql.SQLException
This used to fail because inserting from a VTI would trigger bulk insert, but the bulk insert code path is not supported for GTT as the destination of the insert.
See DERBY-5614.
java.sql.SQLException
public void dropSchemaTables() throws java.sql.SQLException
java.sql.SQLException
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.