提交 f830ad95 authored 作者: Andrei Tokar's avatar Andrei Tokar

handle (ignore) R/O case

上级 c01a4c38
......@@ -845,12 +845,9 @@ public class Database implements DataHandler {
}
private void handleUpgradeIssues() {
if (mvStore != null) {
if (mvStore != null && !isReadOnly()) {
MVStore store = mvStore.getStore();
if (store.hasMap("index.0")) {
if (isReadOnly()) {
throw DbException.get(ErrorCode.GENERAL_ERROR_1, "Upgrade can not be performed while database is in R/O mode");
}
Index scanIndex = meta.getScanIndex(systemSession);
Cursor curs = scanIndex.find(systemSession, null, null);
List<Row> allMetaRows = new ArrayList<>();
......
......@@ -507,7 +507,7 @@ public class MVTable extends TableBase {
? SearchRow.ROWID_INDEX : getMainIndexColumn(indexType, cols);
if (database.isStarting()) {
// if this is not "SYS_ID" table and index does exists as a separate map
if (transactionStore.hasMap("index." + indexId)) {
if (indexId != 0 && transactionStore.hasMap("index." + indexId)) {
// we can not reuse primary index
mainIndexColumn = SearchRow.ROWID_INDEX;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论