Пример #1
0
 /**
  * Drop and remove the given local temporary table from this session.
  *
  * @param table the table
  */
 public void removeLocalTempTable(Table table) {
   modificationId++;
   localTempTables.remove(table.getName());
   synchronized (database) {
     table.removeChildrenAndResources(this);
   }
 }
Пример #2
0
 private void cleanTempTables(boolean closeSession) {
   if (localTempTables != null && localTempTables.size() > 0) {
     synchronized (database) {
       for (Table table : New.arrayList(localTempTables.values())) {
         if (closeSession || table.getOnCommitDrop()) {
           modificationId++;
           localTempTables.remove(table.getName());
           table.removeChildrenAndResources(this);
           if (closeSession) {
             // need to commit, otherwise recovery might
             // ignore the table removal
             database.commit(this);
           }
         } else if (table.getOnCommitTruncate()) {
           table.truncate(this);
         }
       }
     }
   }
 }