提交 334374e6 authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 50b5f52a
......@@ -18,7 +18,15 @@ Change Log
<h1>Change Log</h1>
<h2>Next Version (unreleased)</h2>
<ul><li>New system property h2.browser to set the browser to use.
<ul><li>Aliases for built-in data types (such as MEDIUMBLOB which is an alias for BLOB)
can now be re-mapped to another data type using CREATE DOMAIN. However
main built-in data types (such as INTEGER) can not be re-mapped.
</li><li>The Japanese translation has been completed by Masahiro Ikemoto.
Thanks a lot!
</li><li>Improved PostgreSQL compatibility for NEXTVAL and CURRVAL.
</li><li>Less heap memory is needed when multiple databases are open at the same time: The memory reserve
(used to rollback after out of memory) is now global and no longer allocated for each database separately.
</li><li>New system property h2.browser to set the browser to use.
</li><li>To start the browser, java.awt.Desktop.browse is now used if available.
</li></ul>
......
......@@ -32,6 +32,7 @@ Of course, patches are always welcome, but are not always applied as is. Patches
</li><li>Support large updates (use the transaction log to undo).
</li><li>Shutdown compact
</li><li>Server side cursors
</li><li>Support nested outer joins (see todo.txt).
</li></ul>
<h2>Priority 2</h2>
......@@ -45,6 +46,7 @@ Of course, patches are always welcome, but are not always applied as is. Patches
</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>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>Implement INSTEAD OF trigger (for views, tables, metadata tables).
</li><li>Full outer joins
</li><li>Support trigger on the tables information_schema.tables and ...columns
</li><li>Test very large databases and LOBs (up to 256 GB)
......@@ -242,7 +244,6 @@ Of course, patches are always welcome, but are not always applied as is. Patches
</li><li>Add a role DBA (like ADMIN).
</li><li>Better support multiple processors for in-memory databases.
</li><li>Access rights: remember the owner of an object. COMMENT: allow owner of object to change it.
</li><li>Implement INSTEAD OF trigger.
</li><li>Access rights: Finer grained access control (grant access for specific functions)
</li><li>Support N'text'
</li><li>Support SCOPE_IDENTITY() to avoid problems when inserting rows in a trigger
......
......@@ -107,6 +107,7 @@ public class SysProperties {
/**
* System property <code>h2.browser</code> (default: null).<br />
* The preferred browser to use. If not set, the default browser is used.
* For Windows, to use the Internet Explorer, set this property to 'explorer'.
*/
public static final String BROWSER = getStringSetting("h2.browser", null);
......
......@@ -1199,6 +1199,13 @@ public class DiskFile implements CacheWriter {
}
});
// first write all deleted entries
// because delete entries are always 1 block,
// while not-deleted entries can be many blocks
// so for example:
// (A) block: 1 (delete)
// (B) block: 2 (delete)
// (C) block: 1 ('Hello', 2 blocks long)
// needs to be written in this order and not (A) (C) (B)
RedoLogRecord last = null;
for (int i = 0; i < redoBuffer.size(); i++) {
RedoLogRecord entry = (RedoLogRecord) redoBuffer.get(i);
......
......@@ -721,5 +721,9 @@ public class TableFilter implements ColumnResolver {
public Expression optimize(ExpressionColumn expressionColumn, Column column) {
return expressionColumn;
}
public String toString() {
return alias != null ? alias : "" + table;
}
}
......@@ -92,6 +92,7 @@ import org.h2.test.synth.TestJoin;
import org.h2.test.synth.TestKill;
import org.h2.test.synth.TestKillRestart;
import org.h2.test.synth.TestKillRestartMulti;
import org.h2.test.synth.TestMultiThreaded;
import org.h2.test.synth.TestRandomSQL;
import org.h2.test.synth.TestTimer;
import org.h2.test.synth.sql.TestSynth;
......@@ -280,12 +281,7 @@ java org.h2.test.TestAll timer
/*
allow to map TEXT to VARCHAR
PostgreSQL compatibility: TEXT seems to be VARCHAR there.
http://validator.w3.org/
test web site (including search, main, web main)
test with firefox 3, internet explorer, opera, safari, google chrome
test web site with firefox 3, internet explorer, opera, safari, google chrome
test with 1.0
......@@ -296,8 +292,6 @@ osgi: create a sample application, test, document
merge join test case
osgi (derby, hsqldb)
auto_reconnect
implemented:
- auto_server includes auto_reconnect
......@@ -380,7 +374,7 @@ http://www.w3schools.com/sql/
test.runTests();
}
TestPerformance.main(new String[]{ "-init", "-db", "1"});
System.out.println("done (" + (System.currentTimeMillis() - time) + " ms)");
System.out.println(TestBase.formatTime(System.currentTimeMillis() - time) + " total");
}
/**
......@@ -579,6 +573,7 @@ http://www.w3schools.com/sql/
new TestRandomSQL().runTest(this);
new TestKillRestart().runTest(this);
new TestKillRestartMulti().runTest(this);
new TestMultiThreaded().runTest(this);
// unit
new TestBitField().runTest(this);
......
......@@ -392,13 +392,11 @@ public abstract class TestBase {
/**
* Print a message, prepended with the specified time in milliseconds.
*
* @param time the milliseconds
* @param millis the time in milliseconds
* @param s the message
*/
static void printlnWithTime(long time, String s) {
String t = "0000000000" + time;
t = t.substring(t.length() - 6);
System.out.println(t + " " + s);
static void printlnWithTime(long millis, String s) {
System.out.println(formatTime(millis) + " " + s);
}
/**
......@@ -410,6 +408,17 @@ public abstract class TestBase {
SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");
println(dateFormat.format(new java.util.Date()) + " " + s);
}
/**
* Format the time in the format hh:mm:ss.1234 where 1234 is milliseconds.
*
* @param millis the time in milliseconds
* @return the formatted time
*/
static String formatTime(long millis) {
return new java.sql.Time(java.sql.Time.valueOf("0:0:0").getTime() + millis).toString()
+ "." + ("" + (1000 + (millis % 1000))).substring(1);
}
/**
* Delete all database files for this database.
......
/*
* Copyright 2004-2008 H2 Group. Multiple-Licensed under the H2 License,
* Version 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package org.h2.test.synth;
import java.sql.Connection;
import java.util.Random;
import org.h2.test.TestBase;
/**
* Tests the multi-threaded mode.
*/
public class TestMultiThreaded extends TestBase {
/**
* Run just this test.
*
* @param a ignored
*/
public static void main(String[] a) throws Exception {
TestBase.createCaller().init().test();
}
public void test() throws Exception {
if (config.mvcc) {
return;
}
int test;
deleteDb("multiThreaded");
int size = getSize(2, 4);
Connection[] conn = new Connection[size];
for(int i=0; i<size; i++) {
conn[i] = getConnection("multiThreaded;MULTI_THREADED=1");
}
Random random = new Random(1);
for(int i=0; i<size; i++) {
conn[i].close();
}
}
}
Nested Outer Joins
-----------------
Example:
create table a(x int);
create table b(x int);
create table c(x int, y int);
insert into a values(1);
insert into a values(2);
insert into b values(3);
insert into c values(1, 3);
insert into c values(4, 5);
select * from a left outer join (b left outer join c on b.x = c.y) on a.x = c.x;
explain select * from a left outer join (b left outer join c on b.x = c.y) on a.x = c.x;
drop table a;
drop table b;
drop table c;
The following doesn't work correctly:
TableFilter,
private void mapAndAddFilter(Expression on) throws SQLException {
on.mapColumns(this, 0);
if (join == null || on.isEverything(ExpressionVisitor.RESOLVED)) {
addFilterCondition(on, true);
on.createIndexConditions(session, this);
}
if (join != null) {
join.mapAndAddFilter(on);
}
}
Auto Upgrade
-----------------
file conversion should be done automatically when the new engine connects.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论