提交 ac7bab32 authored 作者: Thomas Mueller's avatar Thomas Mueller

Change order of recovery operations

上级 932f95ac
...@@ -322,12 +322,13 @@ public class Recover extends Tool implements DataHandler { ...@@ -322,12 +322,13 @@ public class Recover extends Tool implements DataHandler {
} else if (fileName.endsWith(Constants.SUFFIX_MV_FILE)) { } else if (fileName.endsWith(Constants.SUFFIX_MV_FILE)) {
String f = fileName.substring(0, fileName.length() - String f = fileName.substring(0, fileName.length() -
Constants.SUFFIX_PAGE_FILE.length()); Constants.SUFFIX_PAGE_FILE.length());
PrintWriter writer = getWriter(f + ".h2.db", ".sql"); PrintWriter writer;
dumpMVStoreFile(writer, fileName);
writer.close();
writer = getWriter(fileName, ".txt"); writer = getWriter(fileName, ".txt");
MVStoreTool.dump(fileName, writer); MVStoreTool.dump(fileName, writer);
writer.close(); writer.close();
writer = getWriter(f + ".h2.db", ".sql");
dumpMVStoreFile(writer, fileName);
writer.close();
} }
} }
} }
...@@ -582,7 +583,8 @@ public class Recover extends Tool implements DataHandler { ...@@ -582,7 +583,8 @@ public class Recover extends Tool implements DataHandler {
resetSchema(); resetSchema();
setDatabaseName(fileName.substring(0, fileName.length() - setDatabaseName(fileName.substring(0, fileName.length() -
Constants.SUFFIX_MV_FILE.length())); Constants.SUFFIX_MV_FILE.length()));
MVStore mv = new MVStore.Builder().fileName(fileName).readOnly().open(); MVStore mv = new MVStore.Builder().
fileName(fileName).readOnly().open();
dumpLobMaps(writer, mv); dumpLobMaps(writer, mv);
writer.println("-- Meta"); writer.println("-- Meta");
dumpMeta(writer, mv); dumpMeta(writer, mv);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论