public class GeneratedColumnsPermsTest extends GeneratedColumnsHelper
Test permissions on generated columns. See DERBY-481.
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
JANET |
private static java.lang.String[] |
LEGAL_USERS |
private static java.lang.String |
TEST_DBO |
BAD_BEFORE_TRIGGER, BAD_CAST, BAD_FOREIGN_KEY_ACTION, CANT_CONTAIN_NULLS, CANT_MODIFY_IDENTITY, CANT_OVERRIDE_GENERATION_CLAUSE, CANT_REFERENCE_GENERATED_COLUMN, CASCADED_COLUMN_DROP_WARNING, COLUMN_OUT_OF_SCOPE, CONSTRAINT_DROPPED_WARNING, CONSTRAINT_VIOLATION, DUPLICATE_CLAUSE, FORBIDDEN_DROP_TRIGGER, FORBIDDEN_ORDERING_OPERATION, FOREIGN_KEY_VIOLATION, GRANT_REVOKE_NOT_ALLOWED, ILLEGAL_ADD_DEFAULT, ILLEGAL_AGG, ILLEGAL_AGGREGATE, ILLEGAL_COMPARISON, ILLEGAL_DUPLICATE, ILLEGAL_RENAME, ILLEGAL_STORAGE, ILLEGAL_UDT_CLASS, JAVA_EXCEPTION, LACK_COLUMN_PRIV, LACK_EXECUTE_PRIV, LACK_TABLE_PRIV, LACK_USAGE_PRIV, LANG_INVALID_USE_OF_DEFAULT, LEXICAL_ERROR, LOCK_TIMEOUT, MISSING_OBJECT, NEED_EXPLICIT_DATATYPE, NO_GENERIC_PERMISSION, NO_SELECT_OR_UPDATE_PERMISSION, NO_TABLE_PERMISSION, NON_EMPTY_SCHEMA, NONEXISTENT_OBJECT, NOT_IMPLEMENTED, NOT_NULL_NEEDS_DATATYPE, NOT_NULL_VIOLATION, OBJECT_DOES_NOT_EXIST, OPERATION_FORBIDDEN, REDUNDANT_CLAUSE, ROUTINE_CANT_ISSUE_SQL, ROUTINE_DEPENDS_ON_TYPE, STRING_TRUNCATION, SYNTAX_ERROR, TABLE_DEPENDS_ON_TYPE, TOO_MUCH_CONTENTION, TRIGGER_DROPPED_WARNING, UNSTABLE_RESULTS, VIEW_DEPENDENCY
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
GeneratedColumnsPermsTest(java.lang.String name)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
static junit.framework.Test |
suite()
Construct top level suite in this JUnit test
|
void |
test_001_basicPermissions()
Test that you need select/insert/update/delete privileges on a generated column and not just on
the columns it references.
|
void |
test_002_functionPermissions()
Test that you DON'T need execute privilege to run functions mentioned in
generation clauses.
|
void |
test_003_ddl()
Test ddl that can only be issued when authorization is turned on.
|
void |
test_004_functionSchema()
Test that unqualified function references in generation clauses resolve
to the current schema in effect when the generated column was added.
|
void |
test_005_functionSchema()
Test that unqualified function references in check constraints resolve
to the current schema in effect when the constraint was declared.
|
void |
test_006_functionSchema()
Test that unqualified function references in views resolve
to the view's schema.
|
assertColumnTypes, assertDeterministic, expectExecutionWarning, expectExecutionWarnings, expectInsertRowError, expectNoWarning, expectUpdateRowError, fill, verifyRestrictedDrop, verifyRevokePrivilege
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
private static final java.lang.String TEST_DBO
private static final java.lang.String JANET
private static final java.lang.String[] LEGAL_USERS
public GeneratedColumnsPermsTest(java.lang.String name)
public static junit.framework.Test suite()
public void test_001_basicPermissions() throws java.lang.Exception
Test that you need select/insert/update/delete privileges on a generated column and not just on the columns it references.
java.lang.Exception
public void test_002_functionPermissions() throws java.lang.Exception
Test that you DON'T need execute privilege to run functions mentioned in generation clauses. That privilege is needed by the user who declared the generation clause.
java.lang.Exception
public void test_003_ddl() throws java.lang.Exception
Test ddl that can only be issued when authorization is turned on.
java.lang.Exception
public void test_004_functionSchema() throws java.lang.Exception
Test that unqualified function references in generation clauses resolve to the current schema in effect when the generated column was added. See DERBY-3945.
java.lang.Exception
public void test_005_functionSchema() throws java.lang.Exception
Test that unqualified function references in check constraints resolve to the current schema in effect when the constraint was declared. See DERBY-3944, which is related to the bug above, DERBY-3945.
java.lang.Exception
public void test_006_functionSchema() throws java.lang.Exception
Test that unqualified function references in views resolve to the view's schema. See DERBY-3953, which is related to the bugs above, DERBY-3944 and DERBY-3945.
java.lang.Exception
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.