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

Documentation.

上级 1b972af6
......@@ -178,7 +178,7 @@ The statement <a href="grammar.html#create_linked_table" class="notranslate" >CR
supports an optional schema name parameter.
</p>
<p>
The following are not supported because they may result in a deadlock:
The following are not supported because they may result in a deadlock:
creating a linked table to the same database,
and creating a linked table to another database using the server mode if the other database is open in the same server
(use the embedded mode instead).
......
......@@ -40,7 +40,7 @@ Change Log
</li><li>Java functions: array component types are now preserved, so that a ResultSet.getObject()
will return Integer[] if the Java functions returns Integer[]. Thanks to Noel Grandin for the patch.
Component types are transferred over the network, but not persisted in the database file as of now.
</li><li>Recover tool: the script generated by the recover tool didn't work
</li><li>Recover tool: the script generated by the recover tool didn't work
if fulltext search was used, because the triggers were created before the primary keys.
</li><li>Issue 321: the database does not expect XA rollback without XA prepare
(an exception was unnecessarily written into the .trace.db file).
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -219,6 +219,9 @@ public abstract class Query extends Prepared {
return true;
}
/**
* Disable caching of result sets.
*/
public void disableCache() {
this.noCache = true;
}
......
......@@ -174,7 +174,7 @@ public class ViewIndex extends BaseIndex {
throw DbException.get(ErrorCode.SYNTAX_ERROR_2, "recursive queries without UNION ALL");
}
Query left = union.getLeft();
// to ensure the last result isn't closed
// to ensure the last result is not closed
left.disableCache();
LocalResult r = left.query(0);
LocalResult result = union.getEmptyResult();
......@@ -184,7 +184,7 @@ public class ViewIndex extends BaseIndex {
Query right = union.getRight();
r.reset();
view.setRecursiveResult(r);
// to ensure the last result isn't closed
// to ensure the last result is not closed
right.disableCache();
while (true) {
r = right.query(0);
......
......@@ -946,9 +946,9 @@ RANDOM_UUID()
","
Returns a new UUID with 122 pseudo random bits."
"Functions (Numeric)","ROUND","
ROUND(numeric, digitsInt)
ROUND(numeric [, digitsInt])
","
Rounds to a number of digits."
Rounds to a number of digits, or to the nearest long if the number of digits if not set."
"Functions (Numeric)","ROUNDMAGIC","
ROUNDMAGIC(numeric)
","
......
......@@ -210,7 +210,7 @@ public class LobStorage {
* Retrieve the sequence id and offset that is smaller than the requested
* offset. Those values can be used to quickly skip to a given position
* without having to read all data.
*
*
* @param lob the lob
* @param offset the required offset
* @return null if the data is not available, or an array of two elements:
......@@ -284,22 +284,6 @@ public class LobStorage {
return super.skip(n);
}
// public long skip(long n) throws IOException {
// n -= skipSmall(n);
// while (n > BLOCK_LENGTH) {
// try {
// n -= skipBuffer(lob, seq++);
// pos = 0;
// buffer = null;
// } catch (SQLException e) {
// throw DbException.convertToIOException(e);
// }
// }
// fillBuffer();
// n -= skipSmall(n);
// return super.skip(n);
// }
//
private int skipSmall(long n) {
if (n > 0 && buffer != null && pos < buffer.length) {
int x = MathUtils.convertLongToInt(Math.min(n, buffer.length - pos));
......@@ -553,8 +537,6 @@ public class LobStorage {
long lobId = getNextLobId();
String sql = "INSERT INTO " + LOB_MAP + "(LOB, SEQ, OFFSET, HASH, BLOCK) " +
"SELECT ?, SEQ, OFFSET, HASH, BLOCK FROM " + LOB_MAP + " WHERE LOB = ?";
// String sql = "INSERT INTO " + LOB_MAP + "(LOB, SEQ, LEN, HASH, BLOCK) " +
// "SELECT ?, SEQ, LEN, HASH, BLOCK FROM " + LOB_MAP + " WHERE LOB = ?";
PreparedStatement prep = prepare(sql);
prep.setLong(1, lobId);
prep.setLong(2, oldLobId);
......@@ -608,7 +590,6 @@ public class LobStorage {
*/
void storeBlock(long lobId, int seq, long offset, byte[] b, String compressAlgorithm) throws SQLException {
long block;
// int len = b.length;
boolean blockExists = false;
if (compressAlgorithm != null) {
b = compress.compress(b, compressAlgorithm);
......@@ -643,11 +624,9 @@ public class LobStorage {
reuse(sql, prep);
}
String sql = "INSERT INTO " + LOB_MAP + "(LOB, SEQ, OFFSET, HASH, BLOCK) VALUES(?, ?, ?, ?, ?)";
// String sql = "INSERT INTO " + LOB_MAP + "(LOB, SEQ, LEN, HASH, BLOCK) VALUES(?, ?, ?, ?, ?)";
PreparedStatement prep = prepare(sql);
prep.setLong(1, lobId);
prep.setInt(2, seq);
// prep.setInt(3, len);
prep.setLong(3, offset);
prep.setLong(4, hash);
prep.setLong(5, block);
......
......@@ -77,8 +77,10 @@ public class CloseWatcher extends PhantomReference<Object> {
* called in a loop to remove old references.
*
* @param o the object
* @param closeable the object to close
* @param stackTrace whether the stack trace should be registered (this is
* relatively slow)
* @return the close watcher
*/
public static CloseWatcher register(Object o, Closeable closeable, boolean stackTrace) {
ReferenceQueue<Object> q = queue;
......
......@@ -27,7 +27,7 @@ public class ValueArray extends Value {
this.componentType = componentType;
this.values = list;
}
private ValueArray(Value[] list) {
this(Object.class, list);
}
......@@ -47,13 +47,14 @@ public class ValueArray extends Value {
* Get or create a array value for the given value array.
* Do not clone the data.
*
* @param componentType the array class (null for Object[])
* @param list the value array
* @return the value
*/
public static ValueArray get(Class<?> componentType, Value[] list) {
return new ValueArray(componentType, list);
}
public int hashCode() {
if (hash != 0) {
return hash;
......@@ -73,7 +74,7 @@ public class ValueArray extends Value {
public int getType() {
return Value.ARRAY;
}
public Class<?> getComponentType() {
return componentType;
}
......
......@@ -603,7 +603,7 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
new TestBatchUpdates().runTest(this);
new TestCallableStatement().runTest(this);
new TestCancel().runTest(this);
new TestDatabaseEventListener().runTest(this);
new TestDatabaseEventListener().runTest(this);
new TestDriver().runTest(this);
new TestLobApi().runTest(this);
new TestManyJdbcObjects().runTest(this);
......
......@@ -601,7 +601,7 @@ public abstract class TestBase {
}
}
}
/**
* Check if two readers are equal, and if not throw an exception.
*
......
......@@ -52,7 +52,7 @@ public class TestSelectCountNonNullColumn extends TestBase {
}
void checkStarCount(long expect) throws SQLException {
private void checkStarCount(long expect) throws SQLException {
String sql = "SELECT COUNT(*) FROM SIMPLE";
if (expect < 0) {
sql = "EXPLAIN " + sql;
......@@ -68,7 +68,7 @@ public class TestSelectCountNonNullColumn extends TestBase {
}
}
void checkKeyCount(long expect) throws SQLException {
private void checkKeyCount(long expect) throws SQLException {
String sql = "SELECT COUNT(KEY) FROM SIMPLE";
if (expect < 0) {
sql = "EXPLAIN " + sql;
......@@ -84,7 +84,7 @@ public class TestSelectCountNonNullColumn extends TestBase {
}
}
void checkNameCount(long expect) throws SQLException {
private void checkNameCount(long expect) throws SQLException {
String sql = "SELECT COUNT(NAME) FROM SIMPLE";
if (expect < 0) {
sql = "EXPLAIN " + sql;
......
......@@ -684,3 +684,5 @@ diagnostics checkout somewhat icu delegation classifications karlsson applet
litailang springsource eccn springframework spr growth teams gigabytes europe
mcleod decade experience travel willing scjp himself routinely tsi retrieving
multiplied ross judson closeable watcher enqueued referent refs watch tracked
preserving disallowed restrictive
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论