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

MVTableEngine bugfix

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