提交 03f604b5 authored 作者: Thomas Mueller's avatar Thomas Mueller

MVTableEngine bugfix

上级 b5408508
...@@ -68,6 +68,9 @@ public class MVSecondaryIndex extends BaseIndex { ...@@ -68,6 +68,9 @@ public class MVSecondaryIndex extends BaseIndex {
keyType(keyType). keyType(keyType).
valueType(valueType); valueType(valueType);
dataMap = mvTable.getTransaction(null).openMap(mapName, mapBuilder); dataMap = mvTable.getTransaction(null).openMap(mapName, mapBuilder);
if (keyType != dataMap.map.getKeyType()) {
throw DbException.throwInternalError("Incomatible key type");
}
} }
@Override @Override
......
...@@ -383,10 +383,7 @@ public class MVTable extends TableBase { ...@@ -383,10 +383,7 @@ public class MVTable extends TableBase {
int mainIndexColumn; int mainIndexColumn;
mainIndexColumn = getMainIndexColumn(indexType, cols); mainIndexColumn = getMainIndexColumn(indexType, cols);
if (database.isStarting()) { if (database.isStarting()) {
index = new MVSecondaryIndex(session.getDatabase(), if (store.store.hasMap("index." + indexId)) {
this, indexId,
indexName, cols, indexType);
if (index.getRowCountApproximation() != 0) {
mainIndexColumn = -1; mainIndexColumn = -1;
} }
} else if (primaryIndex.getRowCount(session) != 0) { } else if (primaryIndex.getRowCount(session) != 0) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论