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

Javadoc, spellcheck, formatting.

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