public final class GrantRevokeDDLTest extends BaseJDBCTestCase
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NO_GENERIC_PERMISSION |
static java.lang.String |
NO_SELECT_OR_UPDATE_PERMISSION |
static java.lang.String |
NO_TABLE_PERMISSION |
private static java.lang.String |
RUTH |
private static java.lang.String |
TEST_DBO |
private static java.lang.String[] |
users |
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE| Constructor and Description |
|---|
GrantRevokeDDLTest(java.lang.String name)
Public constructor required for running test as standalone JUnit.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
grant_6429(java.sql.Connection conn,
java.lang.String permission) |
private void |
revoke_6429(java.sql.Connection conn,
java.lang.String permission) |
static junit.framework.Test |
suite() |
void |
test_6429_tableFunctions()
Test that UPDATE statements require the correct privileges as
described on DERBY-6429.
|
void |
test_6429_tables()
Test that UPDATE statements require the correct privileges as
described on DERBY-6429.
|
void |
test_6429_views()
Test that UPDATE statements require the correct privileges as
described on DERBY-6429.
|
void |
test_6432()
Test that INSERT and UPDATEs run CHECK constraints with definer's rights.
|
void |
test_6433()
Test that INSERT and UPDATEs run generation expressions with definer's rights.
|
void |
test_6434_delete()
Test that DELETE statements require the correct privileges as
described on DERBY-6434.
|
void |
test_6434_insert()
Test that INSERT statements require the correct privileges as
described on DERBY-6434.
|
void |
test_6434_select()
Test that INSERT statements driven by SELECTs require the correct privileges as
described on DERBY-6434.
|
void |
test_6491()
Test that SELECT does not require USAGE privilege on the user-defined
types of the table columns.
|
void |
test_derby_4502()
DERBY-4502
Allow creation of views against system tables when authorization is enabled.
|
void |
testAlterTablePrivilegesIntace() |
void |
testAlterTableWithPrivileges() |
void |
testGlobalTempTables()
DERBY-3266
|
void |
testGrantRevokeDDL() |
void |
testGrantRevokeDDL2() |
void |
testMinimumSelectPrivilegeRequirement()
DERBY-4191
Make sure that we check for atleast table level select privilege or
any column level select privilege for following kind of queries
select count(*) from t1
select count(1) from t1
select 1 from t1
select t1.c1 from t1, t2
|
void |
testRevokeDropsFKWithSharedConglom()
Test the situation where a REVOKE leads to the dropping of
a foreign key's backing conglomerate when that conglomerate
is shared by other indexes/constraints.
|
private void |
vetPermission_6429(Permission permission,
java.sql.Connection dboConnection,
java.sql.Connection ruthConnection,
java.lang.String update)
Verify that the update fails with the correct error after you revoke
a permission and that the update succeeds after you add the permission back.
|
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, usingEmbeddedalarm, 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, isJava8, isPhoneME, isPlatform, isSunJVM, isWindowsPlatform, newAssertionFailedError, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeFiles, removeSystemProperty, runsWithEmma, runsWithJaCoCo, setSystemErr, setSystemOut, setSystemProperty, sleep, sleepAtLeastOneTick, traceit, vmAtLeastassertEquals, 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 TEST_DBO
private static final java.lang.String RUTH
private static java.lang.String[] users
public static final java.lang.String NO_GENERIC_PERMISSION
public static final java.lang.String NO_SELECT_OR_UPDATE_PERMISSION
public static final java.lang.String NO_TABLE_PERMISSION
public GrantRevokeDDLTest(java.lang.String name)
public static junit.framework.Test suite()
public void testGrantRevokeDDL()
throws java.lang.Exception
java.lang.Exceptionpublic void testGrantRevokeDDL2()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testRevokeDropsFKWithSharedConglom()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testMinimumSelectPrivilegeRequirement()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGlobalTempTables()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void test_derby_4502()
throws java.lang.Exception
java.lang.Exceptionpublic void testAlterTablePrivilegesIntace()
throws java.lang.Exception
java.lang.Exceptionpublic void testAlterTableWithPrivileges()
throws java.lang.Exception
java.lang.Exceptionpublic void test_6429_tables()
throws java.lang.Exception
java.lang.Exceptionprivate void vetPermission_6429(Permission permission, java.sql.Connection dboConnection, java.sql.Connection ruthConnection, java.lang.String update) throws java.lang.Exception
java.lang.Exceptionprivate void grant_6429(java.sql.Connection conn,
java.lang.String permission)
throws java.lang.Exception
java.lang.Exceptionprivate void revoke_6429(java.sql.Connection conn,
java.lang.String permission)
throws java.lang.Exception
java.lang.Exceptionpublic void test_6429_views()
throws java.lang.Exception
java.lang.Exceptionpublic void test_6429_tableFunctions()
throws java.lang.Exception
java.lang.Exceptionpublic void test_6434_insert()
throws java.lang.Exception
java.lang.Exceptionpublic void test_6434_delete()
throws java.lang.Exception
java.lang.Exceptionpublic void test_6434_select()
throws java.lang.Exception
java.lang.Exceptionpublic void test_6432()
throws java.lang.Exception
java.lang.Exceptionpublic void test_6433()
throws java.lang.Exception
java.lang.Exceptionpublic void test_6491()
throws java.lang.Exception
java.lang.ExceptionApache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.