提交 7204fc1f authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 91b9c9e0
...@@ -18,7 +18,9 @@ Change Log ...@@ -18,7 +18,9 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>Multiple processes can now access the same database without having to explicitly <ul><li>Linked tables that point to the same database now share the connection
within the same database. Access to the same connection is serialized.
</li><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. 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, 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. If the process that opened the first and the server mode is used if a server is running. If the process that opened the first
......
...@@ -50,9 +50,7 @@ Of course, patches are always welcome, but are not always applied as is. Patches ...@@ -50,9 +50,7 @@ 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>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>Option to shutdown all the running servers (on the same VM). </li><li>Option to shutdown all the running servers (on the same VM).
</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(...)
...@@ -61,6 +59,7 @@ Of course, patches are always welcome, but are not always applied as is. Patches ...@@ -61,6 +59,7 @@ Of course, patches are always welcome, but are not always applied as is. Patches
</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).
</li><li>Auto-reconnect on lost connection to server (even if the server was re-started) except if autocommit was off and there was pending transaction.
</li><li>Full outer joins </li><li>Full outer joins
</li><li>Support trigger on the tables information_schema.tables and ...columns </li><li>Support trigger on the tables information_schema.tables and ...columns
</li><li>Test very large databases and LOBs (up to 256 GB) </li><li>Test very large databases and LOBs (up to 256 GB)
...@@ -145,7 +144,6 @@ Of course, patches are always welcome, but are not always applied as is. Patches ...@@ -145,7 +144,6 @@ Of course, patches are always welcome, but are not always applied as is. Patches
</li><li>Implement point-in-time recovery </li><li>Implement point-in-time recovery
</li><li>Include the version name in the jar file name </li><li>Include the version name in the jar file name
</li><li>LIKE: improved version for larger texts (currently using naive search) </li><li>LIKE: improved version for larger texts (currently using naive search)
</li><li>Auto-reconnect on lost connection to server (even if the server was re-started) except if autocommit was off and there was pending transaction
</li><li>The Script tool should work with other databases as well </li><li>The Script tool should work with other databases as well
</li><li>Automatically convert to the next 'higher' data type whenever there is an overflow. </li><li>Automatically convert to the next 'higher' data type whenever there is an overflow.
</li><li>Throw an exception when the application calls getInt on a Long (optional) </li><li>Throw an exception when the application calls getInt on a Long (optional)
......
...@@ -31,7 +31,7 @@ public class TestAutoServer extends TestBase { ...@@ -31,7 +31,7 @@ public class TestAutoServer extends TestBase {
} }
public void test() throws Exception { public void test() throws Exception {
if (config.memory) { if (config.memory || config.networked) {
return; return;
} }
deleteDb("autoServer"); deleteDb("autoServer");
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
package org.h2.test.unit; package org.h2.test.unit;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.StringReader; import java.io.StringReader;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.sql.SQLException; import java.sql.SQLException;
...@@ -15,9 +16,12 @@ import java.util.IdentityHashMap; ...@@ -15,9 +16,12 @@ import java.util.IdentityHashMap;
import java.util.Random; import java.util.Random;
import org.h2.constant.SysProperties; import org.h2.constant.SysProperties;
import org.h2.engine.Constants;
import org.h2.message.Message;
import org.h2.store.DataHandler; import org.h2.store.DataHandler;
import org.h2.store.FileStore; import org.h2.store.FileStore;
import org.h2.test.TestBase; import org.h2.test.TestBase;
import org.h2.util.FileUtils;
import org.h2.util.MemoryUtils; import org.h2.util.MemoryUtils;
import org.h2.util.SmallLRUCache; import org.h2.util.SmallLRUCache;
import org.h2.value.Value; import org.h2.value.Value;
...@@ -49,6 +53,7 @@ import org.h2.value.ValueUuid; ...@@ -49,6 +53,7 @@ import org.h2.value.ValueUuid;
public class TestValueMemory extends TestBase implements DataHandler { public class TestValueMemory extends TestBase implements DataHandler {
private Random random = new Random(1); private Random random = new Random(1);
private SmallLRUCache lobFileListCache = new SmallLRUCache(128);
public void test() throws SQLException { public void test() throws SQLException {
for (int i = 0; i < Value.TYPE_COUNT; i++) { for (int i = 0; i < Value.TYPE_COUNT; i++) {
...@@ -118,12 +123,12 @@ public class TestValueMemory extends TestBase implements DataHandler { ...@@ -118,12 +123,12 @@ public class TestValueMemory extends TestBase implements DataHandler {
case Value.STRING_IGNORECASE: case Value.STRING_IGNORECASE:
return ValueStringIgnoreCase.get(randomString(random.nextInt(100))); return ValueStringIgnoreCase.get(randomString(random.nextInt(100)));
case Value.BLOB: { case Value.BLOB: {
int len = (int) Math.abs(random.nextGaussian() * 100); int len = (int) Math.abs(random.nextGaussian() * 10);
byte[] data = randomBytes(len); byte[] data = randomBytes(len);
return ValueLob.createBlob(new ByteArrayInputStream(data), len, this); return ValueLob.createBlob(new ByteArrayInputStream(data), len, this);
} }
case Value.CLOB: { case Value.CLOB: {
int len = (int) Math.abs(random.nextGaussian() * 100); int len = (int) Math.abs(random.nextGaussian() * 10);
String s = randomString(len); String s = randomString(len);
return ValueLob.createClob(new StringReader(s), len, this); return ValueLob.createClob(new StringReader(s), len, this);
} }
...@@ -185,8 +190,13 @@ public class TestValueMemory extends TestBase implements DataHandler { ...@@ -185,8 +190,13 @@ public class TestValueMemory extends TestBase implements DataHandler {
return 0; return 0;
} }
public String createTempFile() { public String createTempFile() throws SQLException {
return baseDir + "/valueMemory/data"; String name = baseDir + "/valueMemory/data";
try {
return FileUtils.createTempFile(name, Constants.SUFFIX_TEMP_FILE, true, false);
} catch (IOException e) {
throw Message.convertIOException(e, name);
}
} }
public void freeUpDiskSpace() { public void freeUpDiskSpace() {
...@@ -230,7 +240,7 @@ public class TestValueMemory extends TestBase implements DataHandler { ...@@ -230,7 +240,7 @@ public class TestValueMemory extends TestBase implements DataHandler {
} }
public SmallLRUCache getLobFileListCache() { public SmallLRUCache getLobFileListCache() {
return null; return lobFileListCache;
} }
} }
...@@ -560,4 +560,4 @@ owl rdf recommendations axiom fabric broker osoa epictetus replacements ...@@ -560,4 +560,4 @@ owl rdf recommendations axiom fabric broker osoa epictetus replacements
brittain wasn november unixtime ddd jason formatter psqlodbc onmousemove brittain wasn november unixtime ddd jason formatter psqlodbc onmousemove
monitoring razuna asset drag pekar devx dmitry fragments onmouseup nav monitoring razuna asset drag pekar devx dmitry fragments onmouseup nav
onmousedown olap valign army blitz backgammon knife abbreviate berger dhuse onmousedown olap valign army blitz backgammon knife abbreviate berger dhuse
strictly greg germany abbreviates frontends cleversafe strictly greg germany abbreviates frontends cleversafe payload cloneable
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论