提交 bbdadfce authored 作者: noelgrandin@gmail.com's avatar noelgrandin@gmail.com

Script tool: Fix parsing of BLOCKSIZE parameter, original patch by Ken Jorissen

上级 f5814f7e
......@@ -19,6 +19,7 @@ Change Log
<h2>Next Version (unreleased)</h2>
<ul><li>MVStore: concurrent compaction and store operations could result in an IllegalStateException.
</li><li>Issue 594: Profiler.copyInThread does not work properly.
</li><li>Script tool: Fix parsing of BLOCKSIZE parameter, original patch by Ken Jorissen
</li></ul>
<h2>Version 1.4.184 Beta (2014-12-19)</h2>
......
......@@ -79,6 +79,12 @@ public class Script extends Tool {
if ("SIMPLE".equals(upper) || upper.startsWith("NO") || "DROP".equals(upper)) {
buff1.append(' ');
buff1.append(args[i]);
} else if ("BLOCKSIZE".equals(upper)) {
buff1.append(' ');
buff1.append(args[i]);
i++;
buff1.append(' ');
buff1.append(args[i]);
} else {
buff2.append(' ');
buff2.append(args[i]);
......
......@@ -869,6 +869,18 @@ public class TestTools extends TestBase {
tool.runTool("-url", url, "-user", user, "-password", password,
"-script", fileName + ".txt", "-showResults");
assertTrue(buff.toString().contains("Hello"));
// test parsing of BLOCKSIZE option
DeleteDbFiles.main("-dir", getBaseDir(), "-db", "testScriptRunscript",
"-quiet");
conn = getConnection(url, user, password);
conn.createStatement().execute(
"CREATE TABLE TEST(ID INT PRIMARY KEY, NAME VARCHAR)");
conn.close();
Script.main("-url", url, "-user", user, "-password", password,
"-script", fileName, "-options", "simple", "blocksize",
"8192");
}
private void testBackupRestore() throws SQLException {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论