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

Formatting

上级 c2a3dab7
......@@ -1970,7 +1970,7 @@ Fix to org.h2.util.ScriptReader when handling unclosed block comments.
Make org.h2.util.ScriptReader throw a better exception when handling broken scripts which generate extremely large statements.
@changelog_1035_li
Fix bug with ALLOW_LITERALS=NONE, where the periodic analyze table on insert would throw an exception.
Fix bug with ALLOW_LITERALS=NONE, where the periodic analyze table on insert would throw an exception. A similar problem was fixed in the Console tool.
@changelog_1036_li
Issue 510: Make org.h2.bnf public for consumption by external projects, patch by Nicolas Fortin
......
......@@ -1970,7 +1970,7 @@ Centralリ�?ジトリ�?�利用
#Make org.h2.util.ScriptReader throw a better exception when handling broken scripts which generate extremely large statements.
@changelog_1035_li
#Fix bug with ALLOW_LITERALS=NONE, where the periodic analyze table on insert would throw an exception.
#Fix bug with ALLOW_LITERALS=NONE, where the periodic analyze table on insert would throw an exception. A similar problem was fixed in the Console tool.
@changelog_1036_li
#Issue 510: Make org.h2.bnf public for consumption by external projects, patch by Nicolas Fortin
......
......@@ -655,7 +655,7 @@ changelog_1031_li=Support the JDBC DatabaseMetaData\#getClientInfoProperties() m
changelog_1032_li=Make Server\#openBrowser respect the $BROWSER environment variable. Add "chromium" to the list of browsers tried. Patch from Felix Kaiser.
changelog_1033_li=Fix to org.h2.util.ScriptReader when handling unclosed block comments.
changelog_1034_li=Make org.h2.util.ScriptReader throw a better exception when handling broken scripts which generate extremely large statements.
changelog_1035_li=Fix bug with ALLOW_LITERALS\=NONE, where the periodic analyze table on insert would throw an exception.
changelog_1035_li=Fix bug with ALLOW_LITERALS\=NONE, where the periodic analyze table on insert would throw an exception. A similar problem was fixed in the Console tool.
changelog_1036_li=Issue 510\: Make org.h2.bnf public for consumption by external projects, patch by Nicolas Fortin
changelog_1037_li=Issue 509\: Important fix on ValueGeometry, patch by Nicolas Fortin (with some tweaking) Make ValueGeometry\#getDimensionCount more reliable. Add unit test to check for illegal ValueGeometry comparison Add unit test for conversion of Geometry object into Object Add optional export to MANIFEST.MF for JTS Geometry classes Validate that geometry values can be represented in WKB.
changelog_1038_li=Issue 506\: RFE\: Include Thread.getName() in case of a deadlock
......
......@@ -142,7 +142,7 @@ public class DbContents {
isH2 = url.startsWith("jdbc:h2:");
if (isH2) {
PreparedStatement prep = meta.getConnection().prepareStatement(
"SELECT UPPER(VALUE) FROM INFORMATION_SCHEMA.SETTINGS " +
"SELECT UPPER(VALUE) FROM INFORMATION_SCHEMA.SETTINGS " +
"WHERE NAME=?");
prep.setString(1, "MODE");
ResultSet rs = prep.executeQuery();
......
......@@ -136,9 +136,9 @@ public class MVMap<K, V> extends AbstractMap<K, V>
long[] children = { p.getPos(), split.getPos() };
Page[] childrenPages = { p, split };
long[] counts = { p.getTotalCount(), split.getTotalCount() };
p = Page.create(this, writeVersion,
1, keys, null,
2, children, childrenPages, counts,
p = Page.create(this, writeVersion,
1, keys, null,
2, children, childrenPages, counts,
totalCount, 0, 0);
return p;
}
......
......@@ -47,7 +47,7 @@ public class Page {
* The number of keys.
*/
private int keyCount;
/**
* The number of children.
*/
......@@ -114,9 +114,9 @@ public class Page {
* @return the new page
*/
public static Page createEmpty(MVMap<?, ?> map, long version) {
return create(map, version,
return create(map, version,
0, EMPTY_OBJECT_ARRAY, EMPTY_OBJECT_ARRAY,
0, null, null, null,
0, null, null, null,
0, 0, DataUtils.PAGE_MEMORY);
}
......@@ -128,6 +128,7 @@ public class Page {
* @param keyCount the number of keys
* @param keys the keys
* @param values the values
* @param childCount the number of children
* @param children the children
* @param childrenPages the children pages
* @param counts the children counts
......@@ -137,7 +138,7 @@ public class Page {
* @return the page
*/
public static Page create(MVMap<?, ?> map, long version,
int keyCount, Object[] keys, Object[] values,
int keyCount, Object[] keys, Object[] values,
int childCount, long[] children, Page[] childrenPages, long[] counts,
long totalCount, int sharedFlags, int memory) {
Page p = new Page(map, version);
......@@ -282,7 +283,7 @@ public class Page {
*/
public Page copy(long version) {
Page newPage = create(map, version,
keyCount, keys, values,
keyCount, keys, values,
childCount, children, childrenPages, counts, totalCount,
SHARED_KEYS | SHARED_VALUES | SHARED_CHILDREN | SHARED_COUNTS,
memory);
......@@ -370,8 +371,8 @@ public class Page {
values = aValues;
sharedFlags &= ~(SHARED_KEYS | SHARED_VALUES);
totalCount = a;
Page newPage = create(map, version,
b, bKeys, bValues,
Page newPage = create(map, version,
b, bKeys, bValues,
0, null, null, null,
bKeys.length, 0, 0);
memory = calculateMemory();
......@@ -418,9 +419,9 @@ public class Page {
for (long x : bCounts) {
t += x;
}
Page newPage = create(map, version,
b - 1, bKeys, null,
b, bChildren, bChildrenPages, bCounts,
Page newPage = create(map, version,
b - 1, bKeys, null,
b, bChildren, bChildrenPages, bCounts,
t, 0, 0);
memory = calculateMemory();
newPage.memory = newPage.calculateMemory();
......@@ -614,7 +615,7 @@ public class Page {
DataUtils.copyWithGap(keys, newKeys, keyCount, index);
newKeys[index] = key;
keys = newKeys;
keyCount++;
long[] newChildren = new long[childCount + 1];
......@@ -631,7 +632,7 @@ public class Page {
DataUtils.copyWithGap(counts, newCounts, childCount, index);
newCounts[index] = childPage.totalCount;
counts = newCounts;
childCount++;
sharedFlags &= ~(SHARED_KEYS | SHARED_CHILDREN | SHARED_COUNTS);
......@@ -697,7 +698,7 @@ public class Page {
sharedFlags &= ~(SHARED_CHILDREN | SHARED_COUNTS);
totalCount -= countOffset;
childCount--;
}
}
......
......@@ -235,8 +235,8 @@ public class MVRTreeMap<V> extends MVMap<SpatialKey, V> {
long[] children = { p.getPos(), split.getPos(), 0 };
Page[] childrenPages = { p, split, null };
long[] counts = { p.getTotalCount(), split.getTotalCount(), 0 };
p = Page.create(this, v,
2, keys, null,
p = Page.create(this, v,
2, keys, null,
3, children, childrenPages, counts,
totalCount, 0, 0);
// now p is a node; continues
......@@ -433,8 +433,8 @@ public class MVRTreeMap<V> extends MVMap<SpatialKey, V> {
Object[] values = leaf ? new Object[4] : null;
long[] c = leaf ? null : new long[1];
Page[] cp = leaf ? null : new Page[1];
return Page.create(this, writeVersion,
0, new Object[4], values,
return Page.create(this, writeVersion,
0, new Object[4], values,
leaf ? 0 : 1, c, cp, c, 0, 0, 0);
}
......
......@@ -44,7 +44,7 @@ import org.h2.value.Value;
public class TestFunctions extends TestBase implements AggregateFunction {
static int count;
private static int countOfCallsToTestCache;
/**
......@@ -949,7 +949,7 @@ public class TestFunctions extends TestBase implements AggregateFunction {
/**
* This method is called via reflection from the database.
*
*
* @return a result set
*/
public static synchronized ResultSet testCache() {
......@@ -959,7 +959,7 @@ public class TestFunctions extends TestBase implements AggregateFunction {
rs.addRow(0);
return rs;
}
private void assertCallResult(String expected, Statement stat, String sql) throws SQLException {
ResultSet rs = stat.executeQuery("CALL " + sql);
rs.next();
......
......@@ -120,7 +120,7 @@ public class TestDiskFull extends TestBase {
stat = conn.createStatement();
stat.execute("script to 'memFS:test.sql'");
conn.close();
return false;
}
......
......@@ -44,11 +44,11 @@ public class FilePathUnstable extends FilePathWrapper {
FilePath.register(INSTANCE);
return INSTANCE;
}
/**
* Set the number of write operations before the disk is full, and the
* random seed (for partial writes).
*
*
* @param count the number of write operations (0 to never fail,
* Integer.MAX_VALUE to count the operations)
* @param seed the new seed
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论