colPermsKey.getType(),
(FormatableBitSet) null);
}
else if( key instanceof RoutinePermsDescriptor)
{
RoutinePermsDescriptor routinePermsKey = (RoutinePermsDescriptor) key;
permissions = dd.getUncachedRoutinePermsDescriptor( routinePermsKey);
if( permissions == null)
{
// The owner has all privileges unless they have been revoked.
try
{
AliasDescriptor ad = dd.getAliasDescriptor( routinePermsKey.getRoutineUUID());
SchemaDescriptor sd = dd.getSchemaDescriptor( ad.getSchemaUUID(),
ConnectionUtil.getCurrentLCC().getTransactionExecute());
if (sd.isSystemSchema() && !sd.isSchemaWithGrantableRoutines())
permissions = new RoutinePermsDescriptor( dd,
routinePermsKey.getGrantee(),
(String) null,
routinePermsKey.getRoutineUUID(),
true);
else if( routinePermsKey.getGrantee().equals( sd.getAuthorizationId()))
permissions = new RoutinePermsDescriptor( dd,
routinePermsKey.getGrantee(),
Authorizer.SYSTEM_AUTHORIZATION_ID,
routinePermsKey.getRoutineUUID(),
true);
}
catch( java.sql.SQLException sqle)
{
throw StandardException.plainWrapException( sqle);