提交 7d29b8ad authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 7c2d2c45
...@@ -18,7 +18,15 @@ Change Log ...@@ -18,7 +18,15 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>Result sets with just a unique index can now be updated (previously a primary key was required). <ul><li>Multiple processes can now access the same database without having to explicitly
start the server. To do that, append ;AUTO_SERVER=TRUE to the database URL.
In this case, the server is started automatically if the connection is in embedded mode,
and the server mode is used if a server is running.
</li><li>The server tool now displays the correct IP address if networked.
</li><li>Can now start a TCP server with port 0 (automatically select a port).
</li><li>LOB files are now stored in sub-directories by default for new databases.
Existing databases with LOB files will work as before.
</li><li>Result sets with just a unique index can now be updated (previously a primary key was required).
</li><li>LINKED TABLE: the schema name can now be set. When multiple tables exist in different schema, </li><li>LINKED TABLE: the schema name can now be set. When multiple tables exist in different schema,
and the schema name is not set, an exception is thrown. and the schema name is not set, an exception is thrown.
</li><li>LINKED TABLE: worked around a bug in Oracle with the CHAR data type. </li><li>LINKED TABLE: worked around a bug in Oracle with the CHAR data type.
......
...@@ -28,7 +28,6 @@ Of course, patches are always welcome, but are not always applied as is. Patches ...@@ -28,7 +28,6 @@ Of course, patches are always welcome, but are not always applied as is. Patches
</li><li>Change Constants.DEFAULT_MAX_MEMORY_UNDO to 10000 (and change the docs). Test. </li><li>Change Constants.DEFAULT_MAX_MEMORY_UNDO to 10000 (and change the docs). Test.
</li><li>Enable and document optimizations, LOB files in directories </li><li>Enable and document optimizations, LOB files in directories
</li><li>Special methods for DataPage.writeByte / writeShort and so on </li><li>Special methods for DataPage.writeByte / writeShort and so on
</li><li>Index organized tables CREATE TABLE...(...) ORGANIZATION INDEX (store in data file) (probably file format changes are required for rowId)
</li><li>Change the default for NULL || 'x' to NULL </li><li>Change the default for NULL || 'x' to NULL
</li></ul> </li></ul>
...@@ -51,7 +50,6 @@ Of course, patches are always welcome, but are not always applied as is. Patches ...@@ -51,7 +50,6 @@ Of course, patches are always welcome, but are not always applied as is. Patches
<li>Improve test code coverage <li>Improve test code coverage
</li><li>More fuzz tests </li><li>More fuzz tests
</li><li>Test multi-threaded in-memory db access </li><li>Test multi-threaded in-memory db access
</li><li>Automatic mode: jdbc:h2:auto: (embedded mode if possible, if not use server mode). Keep the server running until all have disconnected.
</li><li>Linked tables that point to the same database should share the connection ([SHARED CONNECTION]). Serialize access to the connection. </li><li>Linked tables that point to the same database should share the connection ([SHARED CONNECTION]). Serialize access to the connection.
</li><li>Procedural language / script language (Javascript) </li><li>Procedural language / script language (Javascript)
</li><li>Linked tables should support a schema name: CREATE LINKED TABLE ... (... [schemaName, ] originalTableString) - DB2: SET SCHEMA after connecting </li><li>Linked tables should support a schema name: CREATE LINKED TABLE ... (... [schemaName, ] originalTableString) - DB2: SET SCHEMA after connecting
...@@ -59,6 +57,7 @@ Of course, patches are always welcome, but are not always applied as is. Patches ...@@ -59,6 +57,7 @@ Of course, patches are always welcome, but are not always applied as is. Patches
</li><li>Support OSGi: http://oscar-osgi.sourceforge.net, http://incubator.apache.org/felix/index.html </li><li>Support OSGi: http://oscar-osgi.sourceforge.net, http://incubator.apache.org/felix/index.html
</li><li>Optimize ID=? OR ID=?: convert to IN(...) </li><li>Optimize ID=? OR ID=?: convert to IN(...)
</li><li>Optimize .. OR .. to UNION if the cost is lower </li><li>Optimize .. OR .. to UNION if the cost is lower
</li><li>Index organized tables CREATE TABLE...(...) ORGANIZATION INDEX (store in data file) (probably file format changes are required for rowId)
</li><li>H2 Console: new option 'Open a browser when starting the H2 Console'. </li><li>H2 Console: new option 'Open a browser when starting the H2 Console'.
</li><li>Better space re-use in the files after deleting data: shrink the data file without closing the database (if the end of the file is empty) </li><li>Better space re-use in the files after deleting data: shrink the data file without closing the database (if the end of the file is empty)
</li><li>Support large updates (use the transaction log to undo). </li><li>Support large updates (use the transaction log to undo).
...@@ -393,6 +392,7 @@ Of course, patches are always welcome, but are not always applied as is. Patches ...@@ -393,6 +392,7 @@ Of course, patches are always welcome, but are not always applied as is. Patches
</li><li>H2 Console: support single file upload and directory download (optional). </li><li>H2 Console: support single file upload and directory download (optional).
</li><li>Document FTL_SEARCH, FTL_SEARCH_DATA. </li><li>Document FTL_SEARCH, FTL_SEARCH_DATA.
</li><li>Support DatabaseMetaData.insertsAreDetected: updatable result sets should detect inserts. </li><li>Support DatabaseMetaData.insertsAreDetected: updatable result sets should detect inserts.
</li><li>Auto-server: add option to define the IP address range or list.
</li></ul> </li></ul>
<h2>Not Planned</h2> <h2>Not Planned</h2>
......
...@@ -49,7 +49,7 @@ public class TestRights extends TestBase { ...@@ -49,7 +49,7 @@ public class TestRights extends TestBase {
stat = conn.createStatement(); stat = conn.createStatement();
stat.execute("CREATE USER IF NOT EXISTS READER PASSWORD 'READER'"); stat.execute("CREATE USER IF NOT EXISTS READER PASSWORD 'READER'");
stat.execute("CREATE TABLE TEST(ID INT)"); stat.execute("CREATE TABLE TEST(ID INT)");
Connection conn2 = getConnection("rights", "READER", "READER"); Connection conn2 = getConnection("rights", "READER", getPassword("READER"));
Statement stat2 = conn2.createStatement(); Statement stat2 = conn2.createStatement();
try { try {
stat2.execute("SELECT * FROM TEST"); stat2.execute("SELECT * FROM TEST");
...@@ -119,7 +119,7 @@ public class TestRights extends TestBase { ...@@ -119,7 +119,7 @@ public class TestRights extends TestBase {
executeSuccess("GRANT SELECT, INSERT, UPDATE ON TEST TO PASS_READER"); executeSuccess("GRANT SELECT, INSERT, UPDATE ON TEST TO PASS_READER");
conn.close(); conn.close();
conn = getConnection("rights", "PASS_READER", "abc"); conn = getConnection("rights", "PASS_READER", getPassword("abc"));
stat = conn.createStatement(); stat = conn.createStatement();
executeSuccess("SELECT * FROM PASS_NAME"); executeSuccess("SELECT * FROM PASS_NAME");
executeSuccess("SELECT * FROM (SELECT * FROM PASS_NAME)"); executeSuccess("SELECT * FROM (SELECT * FROM PASS_NAME)");
...@@ -170,24 +170,24 @@ public class TestRights extends TestBase { ...@@ -170,24 +170,24 @@ public class TestRights extends TestBase {
conn.close(); conn.close();
try { try {
conn = getConnection("rights", "Test", "abc"); conn = getConnection("rights", "Test", getPassword("abc"));
fail("mixed case user name"); fail("mixed case user name");
} catch (SQLException e) { } catch (SQLException e) {
assertKnownException(e); assertKnownException(e);
} }
try { try {
conn = getConnection("rights", "TEST", "abc"); conn = getConnection("rights", "TEST", getPassword("abc"));
fail("wrong password"); fail("wrong password");
} catch (SQLException e) { } catch (SQLException e) {
assertKnownException(e); assertKnownException(e);
} }
try { try {
conn = getConnection("rights", "TEST", null); conn = getConnection("rights", "TEST", getPassword(""));
fail("wrong password"); fail("wrong password");
} catch (SQLException e) { } catch (SQLException e) {
assertKnownException(e); assertKnownException(e);
} }
conn = getConnection("rights", "TEST", "def"); conn = getConnection("rights", "TEST", getPassword("def"));
stat = conn.createStatement(); stat = conn.createStatement();
executeError("SET DEFAULT_TABLE_TYPE MEMORY"); executeError("SET DEFAULT_TABLE_TYPE MEMORY");
......
...@@ -247,7 +247,7 @@ public class TestXA extends TestBase { ...@@ -247,7 +247,7 @@ public class TestXA extends TestBase {
private XADataSource createXADatasource(boolean useOneDatabase, String url) { private XADataSource createXADatasource(boolean useOneDatabase, String url) {
JdbcDataSource ds = new JdbcDataSource(); JdbcDataSource ds = new JdbcDataSource();
ds.setPassword(""); ds.setPassword(getPassword(""));
ds.setUser("sa"); ds.setUser("sa");
if (useOneDatabase) { if (useOneDatabase) {
ds.setURL(getURL("xa", true)); ds.setURL(getURL("xa", true));
......
...@@ -98,7 +98,7 @@ public class TestCrashAPI extends TestBase { ...@@ -98,7 +98,7 @@ public class TestCrashAPI extends TestBase {
Connection conn = null; Connection conn = null;
// System.gc(); // System.gc();
conn = DriverManager.getConnection(url, "sa", ""); conn = DriverManager.getConnection(url, "sa", getPassword(""));
int len = random.getInt(50); int len = random.getInt(50);
int start = random.getInt(statements.size() - len); int start = random.getInt(statements.size() - len);
int end = start + len; int end = start + len;
......
...@@ -167,7 +167,8 @@ public class TestServlet extends TestBase { ...@@ -167,7 +167,8 @@ public class TestServlet extends TestBase {
DbStarter listener = new DbStarter(); DbStarter listener = new DbStarter();
TestServletContext context = new TestServletContext(); TestServletContext context = new TestServletContext();
context.setInitParameter("db.url", getURL("servlet", true)); String url = getURL("servlet", true);
context.setInitParameter("db.url", url);
context.setInitParameter("db.user", getUser()); context.setInitParameter("db.user", getUser());
context.setInitParameter("db.password", getPassword()); context.setInitParameter("db.password", getPassword());
context.setInitParameter("db.tcpServer", "-tcpPort 8888"); context.setInitParameter("db.tcpServer", "-tcpPort 8888");
...@@ -181,8 +182,10 @@ public class TestServlet extends TestBase { ...@@ -181,8 +182,10 @@ public class TestServlet extends TestBase {
Statement stat1 = conn1.createStatement(); Statement stat1 = conn1.createStatement();
stat1.execute("CREATE TABLE T(ID INT)"); stat1.execute("CREATE TABLE T(ID INT)");
String u2 = url.substring(url.indexOf("servlet"));
u2 = "jdbc:h2:tcp://localhost:8888/" + baseDir + "/" + u2;
Connection conn2 = DriverManager.getConnection( Connection conn2 = DriverManager.getConnection(
"jdbc:h2:tcp://localhost:8888/" + baseDir + "/servlet", getUser(), getPassword()); u2, getUser(), getPassword());
Statement stat2 = conn2.createStatement(); Statement stat2 = conn2.createStatement();
stat2.execute("SELECT * FROM T"); stat2.execute("SELECT * FROM T");
stat2.execute("DROP TABLE T"); stat2.execute("DROP TABLE T");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论