SchemaDescriptor sd = (schema == null) ?
getSystemSchemaDescriptor()
: schema;
UUID schemaUUID = sd.getUUID();
if (SchemaDescriptor.STD_SYSTEM_DIAG_SCHEMA_NAME.equals(
sd.getSchemaName()))
{
TableDescriptor td =
new TableDescriptor(this, tableName, sd,
TableDescriptor.VTI_TYPE,
TableDescriptor.DEFAULT_LOCK_GRANULARITY);
// ensure a vti class exists
if (getVTIClass(td, false) != null)
return td;
// otherwise just standard search
}
TableKey tableKey = new TableKey(schemaUUID, tableName);
/* Only use the cache if we're in compile-only mode */
if (getCacheMode() == DataDictionary.COMPILE_ONLY_MODE)
{
NameTDCacheable cacheEntry = (NameTDCacheable) nameTdCache.find(tableKey);
if (cacheEntry != null)
{
retval = cacheEntry.getTableDescriptor();
// bind in previous command might have set refernced cols
retval.setReferencedColumnMap(null);
nameTdCache.release(cacheEntry);
}
return retval;
}
return getTableDescriptorIndex1Scan(tableName, schemaUUID.toString());
}