Unverified 提交 1d9b69e2 authored 作者: Andrei Tokar's avatar Andrei Tokar 提交者: GitHub

Merge pull request #1249 from h2database/issue#1248

Unable to open database created with older version
......@@ -144,6 +144,16 @@ public class TransactionStore {
if (!init) {
for (String mapName : store.getMapNames()) {
if (mapName.startsWith(UNDO_LOG_NAME_PREFIX)) {
// The following block will be executed only once
// upon upgrade from older version where
// undo log was persisted as a single map
if (mapName.equals(UNDO_LOG_NAME_PREFIX)) {
if (!store.hasData(mapName) && !store.isReadOnly()) {
store.removeMap(mapName);
}
continue;
}
boolean committed = mapName.charAt(UNDO_LOG_NAME_PREFIX.length()) == UNDO_LOG_COMMITTED;
if (store.hasData(mapName) || committed) {
int transactionId = Integer.parseInt(mapName.substring(UNDO_LOG_NAME_PREFIX.length() + 1));
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论