提交 1993a074 authored 作者: Thomas Mueller's avatar Thomas Mueller

Formatting

上级 fad0012c
......@@ -326,7 +326,7 @@ public class Insert extends Prepared implements ResultTarget {
variableNames.add(key);
session.setVariable(key, list.get(getCurrentRowNumber() - 1)[i].getValue(session));
}
StatementBuilder buff = new StatementBuilder("UPDATE ");
buff.append(table.getSQL()).append(" SET ");
for (Column column : duplicateKeyAssignmentMap.keySet()) {
......@@ -341,7 +341,7 @@ public class Insert extends Prepared implements ResultTarget {
}
buff.append(prepareUpdateCondition(foundIndex).getSQL());
String sql = buff.toString();
Prepared command = session.prepare(sql);
Prepared command = session.prepare(sql);
for (Parameter param : command.getParameters()) {
Parameter insertParam = parameters.get(param.getIndex());
param.setValue(insertParam.getValue(session));
......@@ -384,11 +384,11 @@ public class Insert extends Prepared implements ResultTarget {
for (int i = 0; i < columns.length; i++) {
if (expr.getColumnName().equals(columns[i].getName())) {
if (condition == null) {
condition = new Comparison(session, Comparison.EQUAL,
condition = new Comparison(session, Comparison.EQUAL,
expr, list.get(getCurrentRowNumber() - 1)[i++]);
} else {
condition = new ConditionAndOr(ConditionAndOr.AND, condition,
new Comparison(session, Comparison.EQUAL,
condition = new ConditionAndOr(ConditionAndOr.AND, condition,
new Comparison(session, Comparison.EQUAL,
expr, list.get(0)[i++]));
}
}
......
......@@ -327,7 +327,7 @@ public class DbSettings extends SettingsBase {
* Use the MVStore storage engine.
*/
public final boolean mvStore = get("MV_STORE", false);
/**
* Database setting <code>COMPRESS</code>
* (default: false).<br />
......
......@@ -1725,7 +1725,7 @@ public class MVStore {
/**
* How many versions to retain for in-memory stores. If not set, 5 old
* versions are retained.
*
*
* @param count the number of versions to keep
*/
public void setVersionsToKeep(int count) {
......@@ -2327,7 +2327,7 @@ public class MVStore {
* there is still a small risk that password stays in memory (due to
* Java garbage collection). Also, the hashed encryption key is kept in
* memory as long as the file is open.
*
*
* @param password the password
* @return this
*/
......@@ -2407,7 +2407,7 @@ public class MVStore {
* that any kind of store (including an off-heap store) is considered a
* "persistence", while an "in-memory store" means objects are not
* persisted and fully kept in the JVM heap.
*
*
* @param store the file store
* @return this
*/
......
......@@ -849,7 +849,7 @@ public class Page {
chunk.pageCountLive++;
return typePos + 1;
}
private void writeChildren(WriteBuffer buff) {
int len = keyCount;
for (int i = 0; i <= len; i++) {
......
......@@ -1471,7 +1471,7 @@ public class ObjectDataType implements DataType {
* The type for serialized objects.
*/
class SerializedObjectType extends AutoDetectDataType {
private int averageSize = 10000;
SerializedObjectType(ObjectDataType base) {
......
......@@ -46,7 +46,8 @@ public class LobStorageMap implements LobStorageInterface {
* (which is a long) to the stream store id (which is a byte array).
*
* Key: lobId (long)
* Value: { streamStoreId (byte[]), tableId (int), byteCount (long), hash (long) }.
* Value: { streamStoreId (byte[]), tableId (int),
* byteCount (long), hash (long) }.
*/
private MVMap<Long, Object[]> lobMap;
......
......@@ -194,7 +194,7 @@ public class TestDuplicateKeyUpdate extends TestBase {
ResultSet rs = stat.executeQuery("select count from test where key = 'a'");
rs.next();
assertEquals(3, rs.getInt(1));
stat.execute("drop table test");
}
......@@ -206,7 +206,7 @@ public class TestDuplicateKeyUpdate extends TestBase {
// Insert multiple values in single insert operation
for (int i = 0; i <= 2; ++i) {
PreparedStatement prep = conn.prepareStatement(
"insert into test(key, count) values(?, ?), (?, ?), (?, ?) " +
"insert into test(key, count) values(?, ?), (?, ?), (?, ?) " +
"on duplicate key update count = count + 1");
prep.setString(1, "a");
prep.setInt(2, 1);
......@@ -222,7 +222,7 @@ public class TestDuplicateKeyUpdate extends TestBase {
ResultSet rs = stat.executeQuery("select count from test where key = 'a'");
rs.next();
assertEquals(3, rs.getInt(1));
stat.execute("drop table test");
}
......
......@@ -106,7 +106,7 @@ public class TestMVStore extends TestBase {
// longer running tests
testLargerThan2G();
}
private void testCompressEmptyPage() {
String fileName = getBaseDir() + "/testDeletedMap.h3";
MVStore store = new MVStore.Builder().
......@@ -123,7 +123,7 @@ public class TestMVStore extends TestBase {
open();
store.close();
}
private void testCompressed() {
String fileName = getBaseDir() + "/testCompressed.h3";
MVStore s = new MVStore.Builder().fileName(fileName).compressData().open();
......@@ -214,7 +214,7 @@ public class TestMVStore extends TestBase {
}
}
}
private void testVersionsToKeep2() {
MVStore s = new MVStore.Builder().autoCommitDisabled().open();
s.setVersionsToKeep(2);
......@@ -1130,7 +1130,7 @@ public class TestMVStore extends TestBase {
// System.out.println("size: " + FileUtils.size(fileName));
}
}
private void testOldVersion() {
MVStore s;
for (int op = 0; op <= 1; op++) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论