提交 75f62370 authored 作者: Thomas Mueller's avatar Thomas Mueller

Javadoc, spellcheck, formatting.

上级 abdb1dbb
......@@ -1581,7 +1581,7 @@ This database has the following known limitations:
An example database URL is: <code>jdbc:h2:split:~/test</code>.
</li><li>The maximum number of rows per table is 2^64.
</li><li>Main memory requirements: The larger the database, the more main memory is required.
With the current storage mechanism (the page store),
With the current storage mechanism (the page store),
the minimum main memory required is around 1 MB for each 8 GB database file size.
</li><li>Limit on the complexity of SQL statements.
Statements of the following form will result in a stack overflow exception:
......
......@@ -49,9 +49,9 @@ Change Log
</li><li>Add support for in-memory spatial index.
</li><li>change the PageStore#changeCount field from an int to a long,
to cope with databases with very high transaction rates.
</li><li>Fix NPE when attempting to add foreign key reference to Table View.
</li><li>Fix a NullPointerException when attempting to add foreign key reference to a view.
</li><li>Add sufficient ClientInfo support to our javax.sql.Connection implementation to make WebSphere happy.
</li><li>Issue 482: class LobStorageBackend$LobInputStream does not override method int avalaible() from InputStream.
</li><li>Issue 482: class LobStorageBackend$LobInputStream does not override the method InputStream.available().
</li></ul>
<h2>Version 1.3.172 (2013-05-25)</h2>
......
......@@ -1602,6 +1602,9 @@ public class JdbcConnection extends TraceObject implements Connection {
/**
* Set a client property.
* This method always throws a SQLClientInfoException.
*
* @param name the name of the property (ignored)
* @param value the value (ignored)
*/
@Override
public void setClientInfo(String name, String value)
......@@ -1614,6 +1617,8 @@ public class JdbcConnection extends TraceObject implements Connection {
/**
* Set the client properties.
* This method always throws a SQLClientInfoException.
*
* @param properties the properties (ignored)
*/
@Override
public void setClientInfo(Properties properties) throws SQLClientInfoException {
......@@ -1625,6 +1630,8 @@ public class JdbcConnection extends TraceObject implements Connection {
/**
* Get the client properties.
* This method always returns null.
*
* @return always null
*/
@Override
public Properties getClientInfo() throws SQLClientInfoException {
......@@ -1636,6 +1643,9 @@ public class JdbcConnection extends TraceObject implements Connection {
/**
* Set a client property.
* This method always throws a SQLClientInfoException.
*
* @param name the client info name (ignored)
* @return this method never returns normally
*/
@Override
public String getClientInfo(String name) throws SQLException {
......
......@@ -163,7 +163,13 @@ public class MVTableEngine implements TableEngine {
}
}
}
/**
* Prepare a transaction.
*
* @param session the session
* @param transactionName the transaction name (may be null)
*/
public void prepareCommit(Session session, String transactionName) {
Transaction t = session.getTransaction();
t.setName(transactionName);
......@@ -183,16 +189,16 @@ public class MVTableEngine implements TableEngine {
}
}
/**
* An in-doubt transaction.
*/
private static class MVInDoubtTransaction implements InDoubtTransaction {
private final MVStore store;
private final Transaction transaction;
private int state = InDoubtTransaction.IN_DOUBT;
MVInDoubtTransaction(MVStore store, Transaction transaction) {
this.store = store;
this.transaction = transaction;
......@@ -222,12 +228,12 @@ public class MVTableEngine implements TableEngine {
throw DbException.throwInternalError("state="+state);
}
}
@Override
public String getTransactionName() {
return transaction.getName();
}
}
}
......@@ -48,5 +48,5 @@ public interface InDoubtTransaction {
* @return the transaction name
*/
String getTransactionName();
}
......@@ -675,7 +675,7 @@ public class LobStorageBackend implements LobStorageInterface {
}
return MathUtils.convertLongToInt(length);
}
@Override
public int read(byte[] buff) throws IOException {
return readFully(buff, 0, buff.length);
......
......@@ -382,7 +382,7 @@ public class TableView extends Table {
public boolean canReference() {
return false;
}
@Override
public ArrayList<Index> getIndexes() {
return null;
......
......@@ -18,11 +18,14 @@ import org.h2.util.Task;
*/
public class TestMultiConn extends TestBase {
/**
* How long to wait in milliseconds.
*/
static int wait;
/**
* Run just this test.
*
*
* @param a ignored
*/
public static void main(String... a) throws Exception {
......
......@@ -29,7 +29,7 @@ public class TestOpenClose extends TestBase {
/**
* Run just this test.
*
*
* @param a ignored
*/
public static void main(String... a) throws Exception {
......
......@@ -23,7 +23,7 @@ public class TestView extends TestBase {
/**
* Run just this test.
*
*
* @param a ignored
*/
public static void main(String... a) throws Exception {
......@@ -113,7 +113,7 @@ public class TestView extends TestBase {
/**
* This method is called via reflection from the database.
*
*
* @return the static value x
*/
public static int getX() {
......
......@@ -22,8 +22,11 @@ import org.h2.test.TestBase;
*/
public class TestDatabaseEventListener extends TestBase {
private static boolean calledOpened, calledClosingDatabase, calledScan, calledCreateIndex;
private static boolean calledStatementStart, calledStatementEnd, calledStatementProgress;
/**
* A flag to mark that the given method was called.
*/
static boolean calledOpened, calledClosingDatabase, calledScan, calledCreateIndex,
calledStatementStart, calledStatementEnd, calledStatementProgress;
/**
* Run just this test.
......@@ -238,8 +241,11 @@ public class TestDatabaseEventListener extends TestBase {
assertTrue(calledStatementProgress);
}
/**
* The database event listener for this test.
*/
public static final class MyDatabaseEventListener implements DatabaseEventListener {
@Override
public void closingDatabase() {
calledClosingDatabase = true;
......@@ -286,7 +292,7 @@ public class TestDatabaseEventListener extends TestBase {
}
}
}
}
}
......@@ -45,7 +45,7 @@ public class TestXASimple extends TestBase {
// testTwoPhase(false, false);
testTwoPhase("xaSimple2a", true, true);
testTwoPhase("xaSimple2b", true, false);
}
private void testTwoPhase(String db, boolean shutdown, boolean commit) throws Exception {
......
......@@ -180,7 +180,7 @@ public class TestAutoReconnect extends TestBase {
* A database event listener used in this test.
*/
public static final class MyDatabaseEventListener implements DatabaseEventListener {
@Override
public void closingDatabase() {
// ignore
......
......@@ -22,9 +22,9 @@ import org.h2.test.utils.SelfDestructor;
*/
public class TestExit extends TestBase {
public static Connection conn;
private static Connection conn;
static final int OPEN_WITH_CLOSE_ON_EXIT = 1, OPEN_WITHOUT_CLOSE_ON_EXIT = 2;
private static final int OPEN_WITH_CLOSE_ON_EXIT = 1, OPEN_WITHOUT_CLOSE_ON_EXIT = 2;
@Override
public void test() throws Exception {
......@@ -104,6 +104,8 @@ public class TestExit extends TestBase {
conn = open(url);
Connection conn2 = open(url);
conn2.close();
// do not close
conn.isClosed();
}
private static Connection open(String url) throws SQLException {
......@@ -119,7 +121,7 @@ public class TestExit extends TestBase {
* A database event listener used in this test.
*/
public static final class MyDatabaseEventListener implements DatabaseEventListener {
@Override
public void exceptionThrown(SQLException e, String sql) {
// nothing to do
......@@ -148,7 +150,7 @@ public class TestExit extends TestBase {
public void opened() {
// nothing to do
}
}
}
......@@ -32,11 +32,14 @@ import org.h2.util.New;
*/
public class TestPageStore extends TestBase {
/**
* The events log.
*/
static StringBuilder eventBuffer = new StringBuilder();
/**
* Run just this test.
*
*
* @param a ignored
*/
public static void main(String... a) throws Exception {
......@@ -834,7 +837,7 @@ public class TestPageStore extends TestBase {
* A database event listener used in this test.
*/
public static final class MyDatabaseEventListener implements DatabaseEventListener {
@Override
public void closingDatabase() {
event("closing");
......
......@@ -730,4 +730,4 @@ customizers retains scalability assuming gili cancelled departments juerg
franklin indicated offending unimplemented executors dumping variants
presence spiess azeckoski aaron cowwoc decompiles canceling vividsolutions
quadtree envelope geometry polygon typname intersects wkt intersects wkb
coordinate geometric rates cope
coordinate geometric rates cope attempting sphere
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论