提交 d2b963d2 authored 作者: noelgrandin's avatar noelgrandin

remove unused parameter "quiet" in Restore#execute

上级 fb1e92ab
......@@ -69,7 +69,7 @@ public class Restore extends Tool {
showUsageAndThrowUnsupportedOption(arg);
}
}
execute(zipFileName, dir, db, false);
execute(zipFileName, dir, db);
}
private static String getOriginalDbName(String fileName, String db) throws IOException {
......@@ -132,10 +132,9 @@ public class Restore extends Tool {
* @param zipFileName the name of the backup file
* @param directory the directory name
* @param db the database name (null for all databases)
* @param quiet don't print progress information
* @throws DbException if there is an IOException
*/
public static void execute(String zipFileName, String directory, String db, boolean quiet) {
public static void execute(String zipFileName, String directory, String db) {
InputStream in = null;
try {
if (!FileUtils.exists(zipFileName)) {
......
......@@ -83,7 +83,7 @@ public class TestBackup extends TestBase {
updateEnd.set(System.currentTimeMillis() + 2000);
stat2.execute("backup to '"+getBaseDir()+"/backup.zip'");
stat2.execute("checkpoint");
Restore.execute(getBaseDir() + "/backup.zip", getBaseDir() + "/t2", "backup", true);
Restore.execute(getBaseDir() + "/backup.zip", getBaseDir() + "/t2", "backup");
Connection conn3;
conn3 = getConnection("t2/backup");
Statement stat3 = conn3.createStatement();
......@@ -142,7 +142,7 @@ public class TestBackup extends TestBase {
conn.close();
Backup.execute(getBaseDir() + "/backup.zip", getBaseDir(), "backup", true);
deleteDb("backup");
Restore.execute(getBaseDir() + "/backup.zip", getBaseDir(), "backup", true);
Restore.execute(getBaseDir() + "/backup.zip", getBaseDir(), "backup");
}
private void testBackupRestoreLobStatement() throws SQLException {
......@@ -152,7 +152,7 @@ public class TestBackup extends TestBase {
conn.createStatement().execute("backup to '" +getBaseDir() + "/backup.zip"+"'");
conn.close();
deleteDb("backup");
Restore.execute(getBaseDir() + "/backup.zip", getBaseDir(), "backup", true);
Restore.execute(getBaseDir() + "/backup.zip", getBaseDir(), "backup");
}
private void testBackup() throws SQLException {
......@@ -177,7 +177,7 @@ public class TestBackup extends TestBase {
conn2.rollback();
assertEqualDatabases(stat1, stat2);
Restore.execute(getBaseDir() + "/backup.zip", getBaseDir(), "restored", true);
Restore.execute(getBaseDir() + "/backup.zip", getBaseDir(), "restored");
conn3 = getConnection("restored");
stat3 = conn3.createStatement();
assertEqualDatabases(stat1, stat3);
......
......@@ -108,7 +108,7 @@ public class TestOpenClose extends TestBase implements DatabaseEventListener {
stat.execute("BACKUP TO '" + getBaseDir() + "/test.zip'");
conn.close();
deleteDb("openClose");
Restore.execute(getBaseDir() + "/test.zip", getBaseDir(), null, true);
Restore.execute(getBaseDir() + "/test.zip", getBaseDir(), null);
conn = DriverManager.getConnection(url, "sa", "abc def");
stat = conn.createStatement();
ResultSet rs = stat.executeQuery("SELECT * FROM TEST");
......
......@@ -121,7 +121,7 @@ public class TestCrashAPI extends TestBase implements Runnable {
}
DeleteDbFiles.execute("data", null, true);
try {
Restore.execute(f.getAbsolutePath(), "data", null, true);
Restore.execute(f.getAbsolutePath(), "data", null);
} catch (Exception e) {
System.out.println(f.getName() + " restore error " + e);
// ignore
......
......@@ -208,7 +208,7 @@ public class TestPageStoreCoverage extends TestBase {
stat.execute("delete from test where id > 5");
stat.execute("backup to '" + getBaseDir() + "/backup.zip'");
conn.rollback();
Restore.execute(getBaseDir() + "/backup.zip", getBaseDir(), "pageStore2", true);
Restore.execute(getBaseDir() + "/backup.zip", getBaseDir(), "pageStore2");
Connection conn2;
conn2 = getConnection("pageStore2");
Statement stat2 = conn2.createStatement();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论