提交 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. ...@@ -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. Make org.h2.util.ScriptReader throw a better exception when handling broken scripts which generate extremely large statements.
@changelog_1035_li @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 @changelog_1036_li
Issue 510: Make org.h2.bnf public for consumption by external projects, patch by Nicolas Fortin Issue 510: Make org.h2.bnf public for consumption by external projects, patch by Nicolas Fortin
......
...@@ -1970,7 +1970,7 @@ Centralリ�?ジトリ�?�利用 ...@@ -1970,7 +1970,7 @@ Centralリ�?ジトリ�?�利用
#Make org.h2.util.ScriptReader throw a better exception when handling broken scripts which generate extremely large statements. #Make org.h2.util.ScriptReader throw a better exception when handling broken scripts which generate extremely large statements.
@changelog_1035_li @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 @changelog_1036_li
#Issue 510: Make org.h2.bnf public for consumption by external projects, patch by Nicolas Fortin #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 ...@@ -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_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_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_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_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_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 changelog_1038_li=Issue 506\: RFE\: Include Thread.getName() in case of a deadlock
......
...@@ -142,7 +142,7 @@ public class DbContents { ...@@ -142,7 +142,7 @@ public class DbContents {
isH2 = url.startsWith("jdbc:h2:"); isH2 = url.startsWith("jdbc:h2:");
if (isH2) { if (isH2) {
PreparedStatement prep = meta.getConnection().prepareStatement( PreparedStatement prep = meta.getConnection().prepareStatement(
"SELECT UPPER(VALUE) FROM INFORMATION_SCHEMA.SETTINGS " + "SELECT UPPER(VALUE) FROM INFORMATION_SCHEMA.SETTINGS " +
"WHERE NAME=?"); "WHERE NAME=?");
prep.setString(1, "MODE"); prep.setString(1, "MODE");
ResultSet rs = prep.executeQuery(); ResultSet rs = prep.executeQuery();
......
...@@ -136,9 +136,9 @@ public class MVMap<K, V> extends AbstractMap<K, V> ...@@ -136,9 +136,9 @@ public class MVMap<K, V> extends AbstractMap<K, V>
long[] children = { p.getPos(), split.getPos() }; long[] children = { p.getPos(), split.getPos() };
Page[] childrenPages = { p, split }; Page[] childrenPages = { p, split };
long[] counts = { p.getTotalCount(), split.getTotalCount() }; long[] counts = { p.getTotalCount(), split.getTotalCount() };
p = Page.create(this, writeVersion, p = Page.create(this, writeVersion,
1, keys, null, 1, keys, null,
2, children, childrenPages, counts, 2, children, childrenPages, counts,
totalCount, 0, 0); totalCount, 0, 0);
return p; return p;
} }
......
...@@ -47,7 +47,7 @@ public class Page { ...@@ -47,7 +47,7 @@ public class Page {
* The number of keys. * The number of keys.
*/ */
private int keyCount; private int keyCount;
/** /**
* The number of children. * The number of children.
*/ */
...@@ -114,9 +114,9 @@ public class Page { ...@@ -114,9 +114,9 @@ public class Page {
* @return the new page * @return the new page
*/ */
public static Page createEmpty(MVMap<?, ?> map, long version) { public static Page createEmpty(MVMap<?, ?> map, long version) {
return create(map, version, return create(map, version,
0, EMPTY_OBJECT_ARRAY, EMPTY_OBJECT_ARRAY, 0, EMPTY_OBJECT_ARRAY, EMPTY_OBJECT_ARRAY,
0, null, null, null, 0, null, null, null,
0, 0, DataUtils.PAGE_MEMORY); 0, 0, DataUtils.PAGE_MEMORY);
} }
...@@ -128,6 +128,7 @@ public class Page { ...@@ -128,6 +128,7 @@ public class Page {
* @param keyCount the number of keys * @param keyCount the number of keys
* @param keys the keys * @param keys the keys
* @param values the values * @param values the values
* @param childCount the number of children
* @param children the children * @param children the children
* @param childrenPages the children pages * @param childrenPages the children pages
* @param counts the children counts * @param counts the children counts
...@@ -137,7 +138,7 @@ public class Page { ...@@ -137,7 +138,7 @@ public class Page {
* @return the page * @return the page
*/ */
public static Page create(MVMap<?, ?> map, long version, 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, int childCount, long[] children, Page[] childrenPages, long[] counts,
long totalCount, int sharedFlags, int memory) { long totalCount, int sharedFlags, int memory) {
Page p = new Page(map, version); Page p = new Page(map, version);
...@@ -282,7 +283,7 @@ public class Page { ...@@ -282,7 +283,7 @@ public class Page {
*/ */
public Page copy(long version) { public Page copy(long version) {
Page newPage = create(map, version, Page newPage = create(map, version,
keyCount, keys, values, keyCount, keys, values,
childCount, children, childrenPages, counts, totalCount, childCount, children, childrenPages, counts, totalCount,
SHARED_KEYS | SHARED_VALUES | SHARED_CHILDREN | SHARED_COUNTS, SHARED_KEYS | SHARED_VALUES | SHARED_CHILDREN | SHARED_COUNTS,
memory); memory);
...@@ -370,8 +371,8 @@ public class Page { ...@@ -370,8 +371,8 @@ public class Page {
values = aValues; values = aValues;
sharedFlags &= ~(SHARED_KEYS | SHARED_VALUES); sharedFlags &= ~(SHARED_KEYS | SHARED_VALUES);
totalCount = a; totalCount = a;
Page newPage = create(map, version, Page newPage = create(map, version,
b, bKeys, bValues, b, bKeys, bValues,
0, null, null, null, 0, null, null, null,
bKeys.length, 0, 0); bKeys.length, 0, 0);
memory = calculateMemory(); memory = calculateMemory();
...@@ -418,9 +419,9 @@ public class Page { ...@@ -418,9 +419,9 @@ public class Page {
for (long x : bCounts) { for (long x : bCounts) {
t += x; t += x;
} }
Page newPage = create(map, version, Page newPage = create(map, version,
b - 1, bKeys, null, b - 1, bKeys, null,
b, bChildren, bChildrenPages, bCounts, b, bChildren, bChildrenPages, bCounts,
t, 0, 0); t, 0, 0);
memory = calculateMemory(); memory = calculateMemory();
newPage.memory = newPage.calculateMemory(); newPage.memory = newPage.calculateMemory();
...@@ -614,7 +615,7 @@ public class Page { ...@@ -614,7 +615,7 @@ public class Page {
DataUtils.copyWithGap(keys, newKeys, keyCount, index); DataUtils.copyWithGap(keys, newKeys, keyCount, index);
newKeys[index] = key; newKeys[index] = key;
keys = newKeys; keys = newKeys;
keyCount++; keyCount++;
long[] newChildren = new long[childCount + 1]; long[] newChildren = new long[childCount + 1];
...@@ -631,7 +632,7 @@ public class Page { ...@@ -631,7 +632,7 @@ public class Page {
DataUtils.copyWithGap(counts, newCounts, childCount, index); DataUtils.copyWithGap(counts, newCounts, childCount, index);
newCounts[index] = childPage.totalCount; newCounts[index] = childPage.totalCount;
counts = newCounts; counts = newCounts;
childCount++; childCount++;
sharedFlags &= ~(SHARED_KEYS | SHARED_CHILDREN | SHARED_COUNTS); sharedFlags &= ~(SHARED_KEYS | SHARED_CHILDREN | SHARED_COUNTS);
...@@ -697,7 +698,7 @@ public class Page { ...@@ -697,7 +698,7 @@ public class Page {
sharedFlags &= ~(SHARED_CHILDREN | SHARED_COUNTS); sharedFlags &= ~(SHARED_CHILDREN | SHARED_COUNTS);
totalCount -= countOffset; totalCount -= countOffset;
childCount--; childCount--;
} }
} }
......
...@@ -235,8 +235,8 @@ public class MVRTreeMap<V> extends MVMap<SpatialKey, V> { ...@@ -235,8 +235,8 @@ public class MVRTreeMap<V> extends MVMap<SpatialKey, V> {
long[] children = { p.getPos(), split.getPos(), 0 }; long[] children = { p.getPos(), split.getPos(), 0 };
Page[] childrenPages = { p, split, null }; Page[] childrenPages = { p, split, null };
long[] counts = { p.getTotalCount(), split.getTotalCount(), 0 }; long[] counts = { p.getTotalCount(), split.getTotalCount(), 0 };
p = Page.create(this, v, p = Page.create(this, v,
2, keys, null, 2, keys, null,
3, children, childrenPages, counts, 3, children, childrenPages, counts,
totalCount, 0, 0); totalCount, 0, 0);
// now p is a node; continues // now p is a node; continues
...@@ -433,8 +433,8 @@ public class MVRTreeMap<V> extends MVMap<SpatialKey, V> { ...@@ -433,8 +433,8 @@ public class MVRTreeMap<V> extends MVMap<SpatialKey, V> {
Object[] values = leaf ? new Object[4] : null; Object[] values = leaf ? new Object[4] : null;
long[] c = leaf ? null : new long[1]; long[] c = leaf ? null : new long[1];
Page[] cp = leaf ? null : new Page[1]; Page[] cp = leaf ? null : new Page[1];
return Page.create(this, writeVersion, return Page.create(this, writeVersion,
0, new Object[4], values, 0, new Object[4], values,
leaf ? 0 : 1, c, cp, c, 0, 0, 0); leaf ? 0 : 1, c, cp, c, 0, 0, 0);
} }
......
...@@ -44,7 +44,7 @@ import org.h2.value.Value; ...@@ -44,7 +44,7 @@ import org.h2.value.Value;
public class TestFunctions extends TestBase implements AggregateFunction { public class TestFunctions extends TestBase implements AggregateFunction {
static int count; static int count;
private static int countOfCallsToTestCache; private static int countOfCallsToTestCache;
/** /**
...@@ -949,7 +949,7 @@ public class TestFunctions extends TestBase implements AggregateFunction { ...@@ -949,7 +949,7 @@ public class TestFunctions extends TestBase implements AggregateFunction {
/** /**
* This method is called via reflection from the database. * This method is called via reflection from the database.
* *
* @return a result set * @return a result set
*/ */
public static synchronized ResultSet testCache() { public static synchronized ResultSet testCache() {
...@@ -959,7 +959,7 @@ public class TestFunctions extends TestBase implements AggregateFunction { ...@@ -959,7 +959,7 @@ public class TestFunctions extends TestBase implements AggregateFunction {
rs.addRow(0); rs.addRow(0);
return rs; return rs;
} }
private void assertCallResult(String expected, Statement stat, String sql) throws SQLException { private void assertCallResult(String expected, Statement stat, String sql) throws SQLException {
ResultSet rs = stat.executeQuery("CALL " + sql); ResultSet rs = stat.executeQuery("CALL " + sql);
rs.next(); rs.next();
......
...@@ -120,7 +120,7 @@ public class TestDiskFull extends TestBase { ...@@ -120,7 +120,7 @@ public class TestDiskFull extends TestBase {
stat = conn.createStatement(); stat = conn.createStatement();
stat.execute("script to 'memFS:test.sql'"); stat.execute("script to 'memFS:test.sql'");
conn.close(); conn.close();
return false; return false;
} }
......
...@@ -44,11 +44,11 @@ public class FilePathUnstable extends FilePathWrapper { ...@@ -44,11 +44,11 @@ public class FilePathUnstable extends FilePathWrapper {
FilePath.register(INSTANCE); FilePath.register(INSTANCE);
return INSTANCE; return INSTANCE;
} }
/** /**
* Set the number of write operations before the disk is full, and the * Set the number of write operations before the disk is full, and the
* random seed (for partial writes). * random seed (for partial writes).
* *
* @param count the number of write operations (0 to never fail, * @param count the number of write operations (0 to never fail,
* Integer.MAX_VALUE to count the operations) * Integer.MAX_VALUE to count the operations)
* @param seed the new seed * @param seed the new seed
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论