提交 9b6138bf authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 2684342d
......@@ -18,7 +18,10 @@ Change Log
<h1>Change Log</h1>
<h2>Next Version (unreleased)</h2>
<ul><li>Right outer joins on tables that were already 'inner joined' was processed incorrectly.
<ul><li>The shell tool now has a very simple statement history.
</li><li>The zip file system implementation now supports the '~' home directory prefix.
Example database URL: jdbc:h2:zip:~/test.zip!/test
</li><li>Right outer joins on tables that were already 'inner joined' was processed incorrectly.
</li><li>Temporary files from LOB objects were not deleted early enough when using the server mode.
</li><li>Trying to alter a temporary table threw a strange exception.
It is still not possible to do that, but the exception message is better now.
......@@ -38,6 +41,7 @@ Change Log
(only when using compression), the COMPRESS function, and storing CLOB or BLOB data (only when compression is enabled).
</li><li>The compression algorithm "LZF" is now about 33% faster than before when compressing small block
(around 2 KB). It is much faster than Deflate, but the compression ratio is lower.
Some of the optimizations are from Sam Van Oort, thanks a lot!
</li><li>Compressing large blocks of data didn't work when using the "Deflate" compression algorithm.
Compressing a lot of data could run out of heap memory.
</li><li>The test cases don't access the file system directly, this simplifies GAE for Java testing.
......
......@@ -405,6 +405,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Support INTERVAL data type (see Oracle and others).
</li><li>Combine Server and Console tool (only keep Server).
</li><li>Store the Lucene index in the database itself.
</li><li>Support standard MERGE statement: http://en.wikipedia.org/wiki/Merge_%28SQL%29
</li><li>Oracle compatibility: support DECODE(x, ...).
</li><li>Console: Start Browser: if ip number changed, try localhost instead.
</li><li>MVCC: compare concurrent update behavior with PostgreSQL and Oracle.
......@@ -417,7 +418,6 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>CACHE_SIZE: automatically use a fraction of Runtime.maxMemory - maybe automatically the second level cache.
</li><li>Support date/time/timestamp as documented in http://en.wikipedia.org/wiki/ISO_8601
</li><li>PostgreSQL compatibility: when in PG mode, treat BYTEA data like PG.
</li><li>Support standard MERGE statement: http://en.wikipedia.org/wiki/Merge_%28SQL%29
</li><li>MySQL compatibility: REPLACE http://dev.mysql.com/doc/refman/6.0/en/replace.html
</li><li>Support =ANY(array) as in PostgreSQL.
</li><li>IBM DB2 compatibility: support PREVIOUS VALUE FOR sequence.
......@@ -465,6 +465,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Move away from system properties where possible.
</li><li>Database file lock: detect hibernate / standby / very slow threads (compare system time).
</li><li>An index on (id, name) should be used for a query: select * from t where s=? order by i
</li><li>Automatic detection of redundant indexes.
</li></ul>
<h2>Not Planned</h2>
......
......@@ -297,11 +297,16 @@ java org.h2.test.TestAll timer
/*
TestClob - delete temp files
memory usage:
drop table test;
create table test(username varchar, city varchar);
create index test_user on test(username);
create index test_city on test(city);
insert into test select x || ' user', (x / 20) || ' city' from system_range(1, 500000);
Document Shell tool
reserveMemory no longer needed
Add link to http://groups.google.com/group/h2-cn
Document Shell tool
// System.setProperty("h2.pageSize", "64");
test with small freeList pages, page size 64
......
......@@ -12,6 +12,7 @@ import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Random;
import java.util.StringTokenizer;
import org.h2.fulltext.FullText;
import org.h2.store.fs.FileSystem;
......@@ -31,11 +32,12 @@ public class TestFullText extends TestBase {
TestBase.createCaller().init().test();
}
public void test() throws SQLException {
public void test() throws Exception {
testCreateDrop();
if (config.memory) {
return;
}
testMultiThreaded();
testStreamLob();
test(false, "VARCHAR");
test(false, "CLOB");
......@@ -59,6 +61,61 @@ public class TestFullText extends TestBase {
deleteDb("fullTextReopen");
}
public void testMultiThreaded() throws Exception {
deleteDb("fullText");
final boolean[] stop = new boolean[1];
final Exception[] exception = new Exception[1];
int len = 2;
Thread[] threads = new Thread[len];
for (int i = 0; i < len; i++) {
// final Connection conn = getConnection("fullText;MULTI_THREADED=1;LOCK_TIMEOUT=10000");
final Connection conn = getConnection("fullText");
Statement stat = conn.createStatement();
stat.execute("CREATE ALIAS IF NOT EXISTS FT_INIT FOR \"org.h2.fulltext.FullText.init\"");
stat.execute("CALL FT_INIT()");
stat.execute("CREATE ALIAS IF NOT EXISTS FT_INIT FOR \"org.h2.fulltext.FullText.init\"");
stat.execute("CALL FT_INIT()");
final String tableName = "TEST" + i;
stat.execute("CREATE TABLE " + tableName + "(ID INT PRIMARY KEY, DATA VARCHAR)");
FullText.createIndex(conn, "PUBLIC", tableName, null);
threads[i] = new Thread() {
public void run() {
try {
PreparedStatement prep = conn.prepareStatement("INSERT INTO " + tableName + " VALUES(?, ?)");
Random random = new Random();
int x = 0;
while (!stop[0]) {
StringBuilder buff = new StringBuilder();
for (int j = 0; j < 1000; j++) {
buff.append(" " + random.nextInt(10000));
buff.append(" x" + j);
}
prep.setInt(1, x);
prep.setString(2, buff.toString());
prep.execute();
x++;
}
conn.close();
} catch (SQLException e) {
exception[0] = e;
}
}
};
}
for (Thread t : threads) {
t.start();
}
Thread.sleep(1000);
stop[0] = true;
for (Thread t : threads) {
t.join();
}
if (exception[0] != null) {
throw exception[0];
}
}
private void testStreamLob() throws SQLException {
deleteDb("fullText");
Connection conn = getConnection("fullText");
......
......@@ -249,6 +249,7 @@ public abstract class TestHalt extends TestBase {
}
controllerWaitAfterAppStart();
p.destroy();
p.waitFor();
try {
traceOperation("backing up " + sequenceId);
Backup.execute(baseDir + "/haltSeq" + sequenceId + ".zip", baseDir, null, true);
......
......@@ -70,6 +70,7 @@ public class TestKillRestartMulti extends TestBase {
Thread.sleep(sleep);
printTime("killing: " + i);
p.destroy();
p.waitFor();
break;
} else if (s.startsWith("#Info")) {
// System.out.println("info: " + s);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论