try {
TempTableInfo tempTableInfo = (TempTableInfo)allDeclaredGlobalTempTables.get(i);
TableDescriptor td = tempTableInfo.getTableDescriptor();
//the following 2 lines of code has been copied from DropTableConstantAction. If there are any changes made there in future,
//we should check if they need to be made here too.
dm.invalidateFor(td, DependencyManager.DROP_TABLE, this);
tran.dropConglomerate(td.getHeapConglomerateId());
} catch (StandardException e) {
if (topLevelStandardException == null) {
// always keep the first exception unchanged
topLevelStandardException = e;