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

--no commit message

--no commit message
上级 6c3455a1
...@@ -37,6 +37,8 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch. ...@@ -37,6 +37,8 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch.
<h3>Version 1.0 (Current)</h3> <h3>Version 1.0 (Current)</h3>
<h3>Version 1.0 / 2007-02-TODO</h3><ul> <h3>Version 1.0 / 2007-02-TODO</h3><ul>
<li>SCRIPT did not work correctly with BLOB or CLOB data. Fixed. <li>SCRIPT did not work correctly with BLOB or CLOB data. Fixed.
</li><li>ORDER BY picked the wrong column if the same column name (but with a different table name)
was used twice in the select list.
</li><li>When a subquery was used in the select list of a query, and GROUP BY was used at the same time, </li><li>When a subquery was used in the select list of a query, and GROUP BY was used at the same time,
a NullPointerException could occur. Fixed. a NullPointerException could occur. Fixed.
</li><li>ORDER BY did not work when DISTINCT was used at the same timein some situations. Fixed. </li><li>ORDER BY did not work when DISTINCT was used at the same timein some situations. Fixed.
......
...@@ -257,7 +257,7 @@ import org.h2.tools.Server; ...@@ -257,7 +257,7 @@ import org.h2.tools.Server;
... ...
// start the TCP Server with SSL enabled // start the TCP Server with SSL enabled
String[] args = new String[]{"-ssl", "true"}; String[] args = new String[]{"-ssl", "true"};
Server server = Server.startTcpServer(args); Server server = Server.createTcpServer(args).start();
... ...
// stop the TCP Server // stop the TCP Server
server.stop(); server.stop();
......
...@@ -131,7 +131,18 @@ public abstract class Query extends Prepared { ...@@ -131,7 +131,18 @@ public abstract class Query extends Prepared {
Expression ec2 = ec.getNonAliasExpression(); Expression ec2 = ec.getNonAliasExpression();
if(ec2 instanceof ExpressionColumn) { if(ec2 instanceof ExpressionColumn) {
ExpressionColumn c2 = (ExpressionColumn) ec2; ExpressionColumn c2 = (ExpressionColumn) ec2;
String ta = exprCol.getSQL(); // exprCol.getTableAlias();
String tb = c2.getSQL(); // getTableAlias();
found = col.equals(c2.getColumnName()); found = col.equals(c2.getColumnName());
if(ta == null || tb == null) {
if(ta != tb) {
found = false;
}
} else {
if(!ta.equals(tb)) {
found = false;
}
}
} }
} }
if(found) { if(found) {
......
...@@ -89,20 +89,9 @@ java -Xmx512m -Xrunhprof:cpu=samples,depth=8 org.h2.tools.RunScript -url jdbc:h2 ...@@ -89,20 +89,9 @@ java -Xmx512m -Xrunhprof:cpu=samples,depth=8 org.h2.tools.RunScript -url jdbc:h2
// run TestHalt // run TestHalt
// SELECT (SELECT true)+1 GROUP BY 1; // When you run SCRIPT DROP it drops the tables but not the autoincrement values.
// When I try to restore the db I get errors that the already exist.
// DROP TABLE IF EXISTS TESTA, TESTB; // The workaround is to drop all objects at the beginning which seems to work fine.
// CREATE TABLE TESTA(ID IDENTITY);
// CREATE TABLE TESTB(ID IDENTITY);
// @LOOP 4 INSERT INTO TESTA() VALUES();
// @LOOP 4 INSERT INTO TESTB() VALUES();
// SELECT TESTA.ID A, TESTB.ID B FROM TESTA, TESTB ORDER BY TESTA.ID, TESTB.ID;
// script.sql /
// UPDATE Supplier_Original_Input SET global_duns = parent_duns
// INSERT INTO SupplierBase (ID, duns, subscriber, watch_list, name, city, state, country, global_duns, Feed, FeedNo, frequency) SELECT ID, duns, subscriber, watch_list, name,city, state, country,global_duns, Feed, FeedNo,frequency FROM Supplier_Original_Input
// number of rows in supplier_original_input is 354704.
// time taken for executing the update statement is 700 seconds.
// deebee.tar.gz // deebee.tar.gz
......
--- special grammar and test cases --------------------------------------------------------------------------------------------- --- special grammar and test cases ---------------------------------------------------------------------------------------------
CREATE TABLE TESTA(ID IDENTITY);
> ok
CREATE TABLE TESTB(ID IDENTITY);
> ok
explain SELECT TESTA.ID A, TESTB.ID B FROM TESTA, TESTB ORDER BY TESTA.ID, TESTB.ID;
> PLAN
> -------------------------------------------------------------------------------------------------------------------------------------------------------
> SELECT TESTA.ID AS A, TESTB.ID AS B FROM PUBLIC.TESTA /* PUBLIC.TESTA_TABLE_SCAN */ INNER JOIN PUBLIC.TESTB /* PUBLIC.TESTB_TABLE_SCAN */ ORDER BY 1, 2
> rows (ordered): 1
DROP TABLE IF EXISTS TESTA, TESTB;
> ok
CREATE TABLE test (family_name VARCHAR_IGNORECASE(63) NOT NULL); CREATE TABLE test (family_name VARCHAR_IGNORECASE(63) NOT NULL);
> ok > ok
......
SELECT (SELECT true)+1 GROUP BY 1; select (SELECT true)+1 GROUP BY 1;
> 2; > 2;
create table FOO (ID int, A number(18, 2)); create table FOO (ID int, A number(18, 2));
insert into FOO (ID, A) values (1, 10.0), (2, 20.0); insert into FOO (ID, A) values (1, 10.0), (2, 20.0);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论