| Modifier and Type | Class and Description |
|---|---|
| private static class | DDLConstantAction.
Mutable Boolean wrapper, initially false |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected void | addColumnDependencies(LanguageConnectionContext lcc, DataDictionary dd, TableDescriptor td, ColumnInfo ci)
Add dependencies of a column on providers. |
| protected void | adjustUDTDependencies(LanguageConnectionContext lcc, DataDictionary dd, TableDescriptor td, ColumnInfo[] columnInfos, boolean dropWholeTable)
Adjust dependencies of a table on ANSI UDTs. |
| private void | adjustUDTDependencies(LanguageConnectionContext
Interpreter's state variable for this session. lcc, DataDictionary Metadata dd, Dependent Object which depends on UDT dependent, HashMap<String, AliasDescriptor> Map of UDTs for which dependencies should be added addUdtMap, HashMap<String, AliasDescriptor> Map of UDT for which dependencies should be dropped dropUdtMap)Add and drop dependencies of an object on UDTs. |
| protected void | adjustUDTDependencies(LanguageConnectionContext
Interpreter's state variable for this session. lcc, DataDictionary Metadata dd, AliasDescriptor Alias descriptor for the routine ad, boolean True if we are adding dependencies, false if we're dropping them adding)Add and drop dependencies of a routine on UDTs. |
| protected String | |
| private static void | executeCAPreferSubTrans(CreateSchemaConstantAction csca, TransactionController tc, Activation activation)
|
| private static PermissionsDescriptor | Returns: the permission descriptor that yielded the privilegeWe have determined that the statement permission described by statPerm is not granted to the current user nor to PUBLIC, so it must be granted to the current role or one of the roles inherited by the current role. |
| pack-priv static SchemaDescriptor | Returns: the schema descriptorthe data dictionary dd, UUID the schema id schemaId, String string describing type of statement for error
reporting. e.g. "ALTER STATEMENT" statementType)Get the schema descriptor for the schemaid. |
| pack-priv static SchemaDescriptor | Returns: the schema descriptorthe data dictionary dd, Activation activation activation, String name of the schema schemaName)Get the schema descriptor in the creation of an object in the passed in schema. |
| private boolean | |
| pack-priv final void | lockTableForDDL(TransactionController
The TransactionController tc, long The conglomerate number for the heap. heapConglomerateNumber, boolean Whether or not to lock the table in exclusive mode. exclusiveMode)Lock the table in exclusive or share mode to prevent deadlocks. |
| protected void | storeConstraintDependenciesOnPrivileges(Activation
The execution environment for this constant action. activation, Dependent Make this object depend on required privileges dependent, UUID Make sure we are looking for REFERENCES privilege
for right table refTableUUID, ProviderInfo[] set of providers for this constraint providers)This method saves dependencies of constraints on privileges in the dependency system. |
| protected void | storeViewTriggerDependenciesOnPrivileges(Activation
The execution environment for this constant action. activation, Dependent Make this object depend on required privileges dependent)This method saves dependencies of views and triggers on privileges in the dependency system. |
| private static void | trackRoleDependency(Activation
the current activation activation, Dependent the view, constraint or trigger that is dependent on the
current role for some privilege. dependent, DDLConstantAction.keeps track of whether a dependency on the
current role has already been registered. roleDepAddedThe statement permission needed for dependent has been found to rely on the current role. |
| DDLConstantAction | back to summary |
|---|---|
| pack-priv DDLConstantAction() | |
| addColumnDependencies | back to summary |
|---|---|
| protected void addColumnDependencies(LanguageConnectionContext lcc, DataDictionary dd, TableDescriptor td, ColumnInfo ci) throws StandardException Add dependencies of a column on providers. These can arise if a generated column depends on a user created function. | |
| adjustUDTDependencies | back to summary |
|---|---|
| protected void adjustUDTDependencies(LanguageConnectionContext lcc, DataDictionary dd, TableDescriptor td, ColumnInfo[] columnInfos, boolean dropWholeTable) throws StandardException Adjust dependencies of a table on ANSI UDTs. We only add one dependency between a table and a UDT. If the table already depends on the UDT, we don't add a redundant dependency. | |
| adjustUDTDependencies | back to summary |
|---|---|
| private void adjustUDTDependencies(LanguageConnectionContext lcc, DataDictionary dd, Dependent dependent, HashMap<String, AliasDescriptor> addUdtMap, HashMap<String, AliasDescriptor> dropUdtMap) throws StandardException Add and drop dependencies of an object on UDTs.
| |
| adjustUDTDependencies | back to summary |
|---|---|
| protected void adjustUDTDependencies(LanguageConnectionContext lcc, DataDictionary dd, AliasDescriptor ad, boolean adding) throws StandardException Add and drop dependencies of a routine on UDTs.
| |
| constructToString | back to summary |
|---|---|
| protected String constructToString(String statementType, String objectName) | |
| executeCAPreferSubTrans | back to summary |
|---|---|
| private static void executeCAPreferSubTrans(CreateSchemaConstantAction csca, TransactionController tc, Activation activation) throws StandardException | |
| findRoleUsage | back to summary |
|---|---|
| private static PermissionsDescriptor findRoleUsage(Activation activation, StatementPermission statPerm) throws StandardException We have determined that the statement permission described by statPerm is not granted to the current user nor to PUBLIC, so it must be granted to the current role or one of the roles inherited by the current role. Find the relevant permission descriptor and return it.
| |
| getAndCheckSchemaDescriptor | back to summary |
|---|---|
| pack-priv static SchemaDescriptor getAndCheckSchemaDescriptor(DataDictionary dd, UUID schemaId, String statementType) throws StandardException Get the schema descriptor for the schemaid.
| |
| getSchemaDescriptorForCreate | back to summary |
|---|---|
| pack-priv static SchemaDescriptor getSchemaDescriptorForCreate(DataDictionary dd, Activation activation, String schemaName) throws StandardException Get the schema descriptor in the creation of an object in the passed in schema.
| |
| inProviderSet | back to summary |
|---|---|
| private boolean inProviderSet(ProviderInfo[] providers, UUID routineId) | |
| lockTableForDDL | back to summary |
|---|---|
| pack-priv final void lockTableForDDL(TransactionController tc, long heapConglomerateNumber, boolean exclusiveMode) throws StandardException Lock the table in exclusive or share mode to prevent deadlocks.
| |
| storeConstraintDependenciesOnPrivileges | back to summary |
|---|---|
| protected void storeConstraintDependenciesOnPrivileges(Activation activation, Dependent dependent, UUID refTableUUID, ProviderInfo[] providers) throws StandardException This method saves dependencies of constraints on privileges in the dependency system. It gets called by CreateConstraintConstantAction. Views and triggers and constraints run with definer's privileges. If one of the required privileges is revoked from the definer, the dependent view/trigger/constraint on that privilege will be dropped automatically. In order to implement this behavior, we need to save view/trigger/constraint dependencies on required privileges in the dependency system. Following method accomplishes that part of the equation for constraints only. The dependency collection for constraints is not same as for views and triggers and hence constraints are handled by this special method. Views and triggers can depend on many different kind of privileges where as constraints only depend on REFERENCES privilege on a table (FOREIGN KEY constraints) or EXECUTE privileges on one or more functions (CHECK constraints). Another difference is only one view or trigger can be defined by a sql statement and hence all the dependencies collected for the sql statement apply to the view or trigger in question. As for constraints, one sql statement can defined multiple constraints and hence the all the privileges required by the statement are not necessarily required by all the constraints defined by that sql statement. We need to identify right privileges for right constraints for a given sql statement. Because of these differences between constraints and views (and triggers), there are 2 different methods in this class to save their privileges in the dependency system. For each required privilege, we now register a dependency on a role if that role was required to find an applicable privilege.
| |
| storeViewTriggerDependenciesOnPrivileges | back to summary |
|---|---|
| protected void storeViewTriggerDependenciesOnPrivileges(Activation activation, Dependent dependent) throws StandardException This method saves dependencies of views and triggers on privileges in the dependency system. It gets called by CreateViewConstantAction and CreateTriggerConstantAction. Views and triggers and constraints run with definer's privileges. If one of the required privileges is revoked from the definer, the dependent view/trigger/constraint on that privilege will be dropped automatically. In order to implement this behavior, we need to save view/trigger/constraint dependencies on required privileges in the dependency system. Following method accomplishes that part of the equation for views and triggers. The dependency collection for constraints is not same as for views and triggers and hence constraints are not covered by this method. Views and triggers can depend on many different kind of privileges where as constraints only depend on REFERENCES privilege on a table. Another difference is only one view or trigger can be defined by a sql statement and hence all the dependencies collected for the sql statement apply to the view or trigger in question. As for constraints, one sql statement can defined multiple constraints and hence the all the privileges required by the statement are not necessarily required by all the constraints defined by that sql statement. We need to identify right privileges for right constraints for a given sql statement. Because of these differences between constraints and views (and triggers), there are 2 different methods in this class to save their privileges in the dependency system. For each required privilege, we now register of a dependency on a role if that role was required to find an applicable privilege.
| |
| trackRoleDependency | back to summary |
|---|---|
| private static void trackRoleDependency(Activation activation, Dependent dependent, DDLConstantAction. The statement permission needed for dependent has been found to rely on the current role. If not already done, register the dependency so that if the current role (or any of the roles it inherits) is revoked (or dropped), we can invalidate dependent.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv boolean | |
| pack-priv void |
| value | back to summary |
|---|---|
| pack-priv boolean value | |
| SettableBoolean | back to summary |
|---|---|
| pack-priv SettableBoolean() | |
| get | back to summary |
|---|---|
| pack-priv boolean get() | |
| set | back to summary |
|---|---|
| pack-priv void set(boolean b) | |