提交 66546122 authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 29dc32d9
......@@ -18,17 +18,19 @@ Change Log
<h1>Change Log</h1>
<h2>Next Version (unreleased)</h2>
<ul><li>Multiple nested queries in the FROM clause with parameters did not always work.
<ul><li>The optimization for IN(...) is now only used if comparing a column with an index.
</li><li>User defined functions can now be deterministic (see CREATE ALIAS documentation).
</li><li>Multiple nested queries in the FROM clause with parameters did not always work.
</li><li>When converting CLOB to BINARY, each character resulted in one byte.
Now, the text is parsed as a hex as when converting VARCHAR.
</li><li>New experimental NIO storage mechanism with both FileChannel and
memory mapped files. To use it, use the file name prefix nio: or nioMapped:
as in jdbc:h2:nio:~/test. So far it looks like NIO storage is faster Mac OS
as in jdbc:h2:nio:~/test. So far it looks like NIO storage is faster Mac OS
but slower on some Windows systems. Thanks a lot to Jan Kotek for the patch!
</li><li>The functions BITOR, BITAND, BITXOR, and MOD now accept
</li><li>The functions BITOR, BITAND, BITXOR, and MOD now accept
and return BIGINT instead of INT.
</li><li>Could not use the same linked table multiple times in the same query.
</li><li>A bug in the server-less multi-connection mode has been fixed.
</li><li>Bugs in the server-less multi-connection mode have been fixed.
</li><li>Column names could not be named "UNIQUE" (with the quotes).
</li><li>New system function TRANSACTION_ID() to get the current transaction
identifier for a session.
......
......@@ -561,7 +561,7 @@ Minimum Java Toolset.
<p><a href="http://www.vpda.org">
VPDA</a><br />
View providers driven applications is a Java based application framework
View providers driven applications is a Java based application framework
for building applications composed from server components - view providers.
</p>
......
......@@ -410,6 +410,9 @@ Of course, patches are always welcome, but are not always applied as is. Patches
</li><li>Optimize IN(...) for DELETE and UPDATE.
</li><li>Natural join: somehow support this: select a.x, b.x, x from dual a natural join dual b
</li><li>MySQL compatibility: for auto_increment columns, convert 0 to next value (as when inserting NULL).
</li><li>Functions: support hashcode(value)
</li><li>Sequences: CURRVAL should be session specific. Compatibility with PostgreSQL.
</li><li>Serialized file lock: support long running queries.
</li></ul>
<h2>Not Planned</h2>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -364,11 +364,12 @@ CREATE AGGREGATE MEDIAN FOR ""com.acme.db.Median""
"
"Commands (DDL)","CREATE ALIAS","
CREATE ALIAS [IF NOT EXISTS] newFunctionAliasName FOR classAndMethodName
CREATE ALIAS [IF NOT EXISTS] newFunctionAliasName [DETERMINISTIC] FOR classAndMethodName
","
Creates a new function alias. The method name must be the full qualified class and method name,
and may optionally include the parameter classes as in ""java.lang.Integer.parseInt(java.lang.String, int)"").
The class and the method must both be public, and the method must be static.
Deterministic functions always return the same value for the same parameters.
Admin rights are required to execute this command.
If the first parameter of the Java function is a java.sql.Connection, then
the current to the database is provided. This connection must not be closed.
......@@ -2847,10 +2848,12 @@ Converts a value to another data type.
","
CONVERT(NAME, INT)
"
"Functions (System)","CURRVAL","
CURRVAL([schemaName, ] sequenceString): long
","
Returns the current (last) value of the sequence.
Returns the current (last) value of the sequence, independent of the session.
If the sequence was just created, the method returns (start - interval).
If the schema name is not set, the current schema is used.
If the schema name is not set, the sequence name is converted to uppercase (for compatibility).
","
......
......@@ -283,12 +283,9 @@ java org.h2.test.TestAll timer
/*
FILE_LOCK=SERIALIZED with prepared statement, statement,
maybe updatable result set
mark 1.1 as stable
documentation: start rolling review; consistently use <code> or not.
documentation: rolling review; consistently use <code> or not.
test performance with log=2
......
......@@ -888,7 +888,7 @@ insert into test values(1), (2), (3);
explain select * from test where id in(1, 2, null);
> PLAN
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> SELECT TEST.ID FROM TABLE_DISTINCT(_23 INTEGER=(1, 2, NULL)) _24 /* PUBLIC."" */ INNER JOIN PUBLIC.TEST /* PUBLIC.PRIMARY_KEY_2: ID >= 1 AND ID <= 2 AND ID = _24._23 */ ON 1=1 WHERE (ID IN(1, 2, NULL)) AND (ID = _24._23)
> SELECT TEST.ID FROM TABLE_DISTINCT(_19 INTEGER=(1, 2, NULL)) _20 /* PUBLIC."" */ INNER JOIN PUBLIC.TEST /* PUBLIC.PRIMARY_KEY_2: ID >= 1 AND ID <= 2 AND ID = _20._19 */ ON 1=1 WHERE (ID IN(1, 2, NULL)) AND (ID = _20._19)
> rows: 1
drop table test;
......@@ -2569,8 +2569,8 @@ where exists (select 1 from test t4 where t2.id=t4.id);
explain select * from test t1 where id in(select id from test t2 where t1.id=t2.id);
> PLAN
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> SELECT T1.ID, T1.NAME FROM PUBLIC.TEST T1 /* PUBLIC.TEST_TABLE_SCAN */ WHERE ID IN(SELECT ID FROM PUBLIC.TEST T2 /* PUBLIC.PRIMARY_KEY_2: ID = T1.ID */ WHERE T1.ID = T2.ID)
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> SELECT T1.ID, T1.NAME FROM PUBLIC.TEST T1 /* PUBLIC.TEST_TABLE_SCAN */ WHERE ID IN(SELECT DISTINCT ID FROM PUBLIC.TEST T2 /* PUBLIC.PRIMARY_KEY_2: ID = T1.ID */ WHERE T1.ID = T2.ID)
> rows: 1
select * from test t1 where id in(select id from test t2 where t1.id=t2.id);
......@@ -2609,7 +2609,7 @@ select * from test t1 where id in(id);
explain select * from test t1 where id in(select id from test);
> PLAN
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> SELECT T1.ID, T1.NAME FROM (SELECT DISTINCT ID AS _73 FROM PUBLIC.TEST /* PUBLIC.TEST_TABLE_SCAN */) _74 /* SELECT DISTINCT ID AS _73 FROM PUBLIC.TEST /++ PUBLIC.TEST_TABLE_SCAN ++/ */ INNER JOIN PUBLIC.TEST T1 /* PUBLIC.PRIMARY_KEY_2: ID = _74._73 */ ON 1=1 WHERE ID = _74._73
> SELECT T1.ID, T1.NAME FROM (SELECT DISTINCT ID AS _65 FROM PUBLIC.TEST /* PUBLIC.TEST_TABLE_SCAN */) _66 /* SELECT DISTINCT ID AS _65 FROM PUBLIC.TEST /++ PUBLIC.TEST_TABLE_SCAN ++/ */ INNER JOIN PUBLIC.TEST T1 /* PUBLIC.PRIMARY_KEY_2: ID = _66._65 */ ON 1=1 WHERE ID = _66._65
> rows: 1
select * from test t1 where id in(select id from test);
......@@ -2622,7 +2622,7 @@ select * from test t1 where id in(select id from test);
explain select * from test t1 where id in(1, select max(id) from test);
> PLAN
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> SELECT T1.ID, T1.NAME FROM TABLE_DISTINCT(_81 INTEGER=(1, 2)) _82 /* PUBLIC."" */ INNER JOIN PUBLIC.TEST T1 /* PUBLIC.PRIMARY_KEY_2: ID >= 1 AND ID <= 2 AND ID = _82._81 */ ON 1=1 WHERE (ID IN(1, 2)) AND (ID = _82._81)
> SELECT T1.ID, T1.NAME FROM TABLE_DISTINCT(_73 INTEGER=(1, 2)) _74 /* PUBLIC."" */ INNER JOIN PUBLIC.TEST T1 /* PUBLIC.PRIMARY_KEY_2: ID >= 1 AND ID <= 2 AND ID = _74._73 */ ON 1=1 WHERE (ID IN(1, 2)) AND (ID = _74._73)
> rows: 1
select * from test t1 where id in(1, select max(id) from test);
......@@ -5525,13 +5525,13 @@ EXPLAIN PLAN FOR SELECT * FROM TEST T1 WHERE EXISTS(SELECT * FROM TEST T2 WHERE
EXPLAIN PLAN FOR SELECT * FROM TEST T1 WHERE ID IN(1, 2);
> PLAN
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> SELECT T1.ID, T1.NAME FROM TABLE_DISTINCT(_118 INTEGER=(1, 2)) _119 /* PUBLIC."" */ INNER JOIN PUBLIC.TEST T1 /* PUBLIC.PRIMARY_KEY_2: ID >= 1 AND ID <= 2 AND ID = _119._118 */ ON 1=1 WHERE (ID IN(1, 2)) AND (ID = _119._118)
> SELECT T1.ID, T1.NAME FROM TABLE_DISTINCT(_106 INTEGER=(1, 2)) _107 /* PUBLIC."" */ INNER JOIN PUBLIC.TEST T1 /* PUBLIC.PRIMARY_KEY_2: ID >= 1 AND ID <= 2 AND ID = _107._106 */ ON 1=1 WHERE (ID IN(1, 2)) AND (ID = _107._106)
> rows: 1
EXPLAIN PLAN FOR SELECT * FROM TEST T1 WHERE ID IN(SELECT ID FROM TEST);
> PLAN
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> SELECT T1.ID, T1.NAME FROM (SELECT DISTINCT ID AS _122 FROM PUBLIC.TEST /* PUBLIC.TEST_TABLE_SCAN */) _123 /* SELECT DISTINCT ID AS _122 FROM PUBLIC.TEST /++ PUBLIC.TEST_TABLE_SCAN ++/ */ INNER JOIN PUBLIC.TEST T1 /* PUBLIC.PRIMARY_KEY_2: ID = _123._122 */ ON 1=1 WHERE ID = _123._122
> SELECT T1.ID, T1.NAME FROM (SELECT DISTINCT ID AS _110 FROM PUBLIC.TEST /* PUBLIC.TEST_TABLE_SCAN */) _111 /* SELECT DISTINCT ID AS _110 FROM PUBLIC.TEST /++ PUBLIC.TEST_TABLE_SCAN ++/ */ INNER JOIN PUBLIC.TEST T1 /* PUBLIC.PRIMARY_KEY_2: ID = _111._110 */ ON 1=1 WHERE ID = _111._110
> rows: 1
EXPLAIN PLAN FOR SELECT * FROM TEST T1 WHERE ID NOT IN(SELECT ID FROM TEST);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论