提交 83a076d6 authored 作者: Thomas Mueller's avatar Thomas Mueller

save memory for in-memory databases

上级 b80b698d
...@@ -176,11 +176,16 @@ public class ScanIndex extends BaseIndex implements RowIndex { ...@@ -176,11 +176,16 @@ public class ScanIndex extends BaseIndex implements RowIndex {
} }
} else { } else {
// in-memory // in-memory
Row free = new Row(null, 0); if (!database.isMultiVersion() && rowCount == 1) {
free.setPos(firstFree); rows = new ObjectArray();
int key = row.getPos(); firstFree = -1;
rows.set(key, free); } else {
firstFree = key; Row free = new Row(null, 0);
free.setPos(firstFree);
int key = row.getPos();
rows.set(key, free);
firstFree = key;
}
} }
if (database.isMultiVersion()) { if (database.isMultiVersion()) {
// if storage is null, the delete flag is not yet set // if storage is null, the delete flag is not yet set
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论