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

remove unused parameter "quiet" in Restore#execute

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