提交 5b3d40db authored 作者: Thomas Mueller's avatar Thomas Mueller

remove unused code

上级 e52e4418
...@@ -64,7 +64,6 @@ import org.h2.util.FileUtils; ...@@ -64,7 +64,6 @@ import org.h2.util.FileUtils;
import org.h2.util.IntHashMap; import org.h2.util.IntHashMap;
import org.h2.util.NetUtils; import org.h2.util.NetUtils;
import org.h2.util.ObjectArray; import org.h2.util.ObjectArray;
import org.h2.util.ObjectUtils;
import org.h2.util.SmallLRUCache; import org.h2.util.SmallLRUCache;
import org.h2.util.StringUtils; import org.h2.util.StringUtils;
import org.h2.util.TempFileDeleter; import org.h2.util.TempFileDeleter;
...@@ -101,7 +100,6 @@ public class Database implements DataHandler { ...@@ -101,7 +100,6 @@ public class Database implements DataHandler {
private final HashMap userDataTypes = new HashMap(); private final HashMap userDataTypes = new HashMap();
private final HashMap aggregates = new HashMap(); private final HashMap aggregates = new HashMap();
private final HashMap comments = new HashMap(); private final HashMap comments = new HashMap();
private final HashMap databaseObjects = new HashMap();
private final Set userSessions = Collections.synchronizedSet(new HashSet()); private final Set userSessions = Collections.synchronizedSet(new HashSet());
private Session exclusiveSession; private Session exclusiveSession;
...@@ -820,9 +818,6 @@ public class Database implements DataHandler { ...@@ -820,9 +818,6 @@ public class Database implements DataHandler {
session.log(meta, UndoLogRecord.INSERT, r); session.log(meta, UndoLogRecord.INSERT, r);
} }
} }
if (SysProperties.PAGE_STORE && id > 0) {
databaseObjects.put(ObjectUtils.getInteger(id), obj);
}
} }
/** /**
...@@ -851,9 +846,6 @@ public class Database implements DataHandler { ...@@ -851,9 +846,6 @@ public class Database implements DataHandler {
} }
} }
} }
if (SysProperties.PAGE_STORE) {
databaseObjects.remove(ObjectUtils.getInteger(id));
}
} }
private HashMap getMap(int type) { private HashMap getMap(int type) {
...@@ -2349,14 +2341,4 @@ public class Database implements DataHandler { ...@@ -2349,14 +2341,4 @@ public class Database implements DataHandler {
return true; return true;
} }
/**
* Get a database object.
*
* @param id the object id
* @return the database object
*/
DbObject getDbObject(int id) {
return (DbObject) databaseObjects.get(ObjectUtils.getInteger(id));
}
} }
...@@ -13,7 +13,6 @@ import org.h2.command.Prepared; ...@@ -13,7 +13,6 @@ import org.h2.command.Prepared;
import org.h2.message.Message; import org.h2.message.Message;
import org.h2.message.Trace; import org.h2.message.Trace;
import org.h2.result.SearchRow; import org.h2.result.SearchRow;
import org.h2.schema.SchemaObject;
import org.h2.util.ObjectArray; import org.h2.util.ObjectArray;
import org.h2.value.ValueInt; import org.h2.value.ValueInt;
import org.h2.value.ValueString; import org.h2.value.ValueString;
...@@ -95,37 +94,6 @@ public class MetaRecord { ...@@ -95,37 +94,6 @@ public class MetaRecord {
} }
} }
/**
* Undo a metadata change.
*
* @param db the database
* @param systemSession the system session
* @param listener the database event listener
*/
void undo(Database db, Session systemSession, DatabaseEventListener listener) throws SQLException {
try {
DbObject obj = db.getDbObject(id);
// null if it was already removed
// (a identity sequence is removed when the table is removed)
if (obj != null) {
if (obj instanceof SchemaObject) {
db.removeSchemaObject(systemSession, (SchemaObject) obj);
} else {
db.removeDatabaseObject(systemSession, obj);
}
}
} catch (Exception e) {
SQLException s = Message.addSQL(Message.convert(e), sql);
db.getTrace(Trace.DATABASE).error(sql, s);
if (listener != null) {
listener.exceptionThrown(s, sql);
// continue startup in this case
} else {
throw s;
}
}
}
public int getId() { public int getId() {
return id; return id;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论