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

--no commit message

--no commit message
上级 7b4f671f
...@@ -37,7 +37,8 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch. ...@@ -37,7 +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-TODO</h3><ul> <h3>Version 1.0 / 2007-TODO</h3><ul>
<li>For most IOExceptions now the file name is included in the error message. <li>In INSERT and MERGE statements, each column may only be specified once now.
</li><li>For most IOExceptions now the file name is included in the error message.
</li><li>A java.util.Date object is now converted to a TIMESTAMP in the JDBC API. Previously it was converted to a DATE. </li><li>A java.util.Date object is now converted to a TIMESTAMP in the JDBC API. Previously it was converted to a DATE.
</li><li>After calling SHUTDOWN and closing the connection and a superfluous error message appeared in the trace file. Fixed. </li><li>After calling SHUTDOWN and closing the connection and a superfluous error message appeared in the trace file. Fixed.
</li><li>In many situations, views did not use an index if they could have. Fixed. Also the explain plan for views works now. </li><li>In many situations, views did not use an index if they could have. Fixed. Also the explain plan for views works now.
...@@ -1181,7 +1182,8 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch. ...@@ -1181,7 +1182,8 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch.
<h3>In Version 1.1</h3> <h3>In Version 1.1</h3>
<ul> <ul>
<li>Change Constants.DEFAULT_MAX_MEMORY_UNDO to 10000 (and change the docs). Test. <li>ALTER TABLE on a table with a LOB could result in 'Cannot delete file' on some systems. Fixed.
</li><li>Change Constants.DEFAULT_MAX_MEMORY_UNDO to 10000 (and change the docs). Test.
</li><li>Enable and document optimizations, LOB files in directories </li><li>Enable and document optimizations, LOB files in directories
</li><li>Special methods for DataPage.writeByte / writeShort and so on </li><li>Special methods for DataPage.writeByte / writeShort and so on
</li><li>Index organized tables CREATE TABLE...(...) ORGANIZATION INDEX (store in data file) (probably file format changes are required for rowId) </li><li>Index organized tables CREATE TABLE...(...) ORGANIZATION INDEX (store in data file) (probably file format changes are required for rowId)
......
...@@ -8,6 +8,7 @@ import java.math.BigDecimal; ...@@ -8,6 +8,7 @@ import java.math.BigDecimal;
import java.math.BigInteger; import java.math.BigInteger;
import java.sql.SQLException; import java.sql.SQLException;
import java.text.Collator; import java.text.Collator;
import java.util.HashSet;
import org.h2.command.ddl.AlterIndexRename; import org.h2.command.ddl.AlterIndexRename;
import org.h2.command.ddl.AlterSequence; import org.h2.command.ddl.AlterSequence;
...@@ -406,7 +407,6 @@ public class Parser { ...@@ -406,7 +407,6 @@ public class Parser {
} }
} }
if(c==null) { if(c==null) {
//return new ParserInt(session).parse(sql);
throw getSyntaxError(); throw getSyntaxError();
} }
setSQL(c, null, start); setSQL(c, null, start);
...@@ -604,10 +604,12 @@ public class Parser { ...@@ -604,10 +604,12 @@ public class Parser {
do { do {
String columnName = readColumnIdentifier(); String columnName = readColumnIdentifier();
columns.add(columnName); columns.add(columnName);
if(readIf("ASC")) { if(ascDesc) {
// ignore if(readIf("ASC")) {
} else { // ignore
readIf("DESC"); } else {
readIf("DESC");
}
} }
} while(readIf(",")); } while(readIf(","));
read(")"); read(")");
...@@ -618,9 +620,13 @@ public class Parser { ...@@ -618,9 +620,13 @@ public class Parser {
private Column[] parseColumnList(Table table) throws SQLException { private Column[] parseColumnList(Table table) throws SQLException {
ObjectArray columns = new ObjectArray(); ObjectArray columns = new ObjectArray();
HashSet set = new HashSet();
if(!readIf(")")) { if(!readIf(")")) {
do { do {
Column column = table.getColumn(readColumnIdentifier()); Column column = table.getColumn(readColumnIdentifier());
if(!set.add(column)) {
throw Message.getSQLException(Message.DUPLICATE_COLUMN_NAME_1, column.getSQL());
}
columns.add(column); columns.add(column);
} while(readIf(",")); } while(readIf(","));
read(")"); read(")");
......
...@@ -158,7 +158,6 @@ public class FileLock { ...@@ -158,7 +158,6 @@ public class FileLock {
method = FILE; method = FILE;
properties = new Properties(); properties = new Properties();
byte[] bytes = RandomUtils.getSecureBytes(RANDOM_BYTES); byte[] bytes = RandomUtils.getSecureBytes(RANDOM_BYTES);
System.out.println("lockFile 2b" + fileName);
String random = ByteUtils.convertBytesToString(bytes); String random = ByteUtils.convertBytesToString(bytes);
properties.setProperty("id", Long.toHexString(System.currentTimeMillis())+random); properties.setProperty("id", Long.toHexString(System.currentTimeMillis())+random);
if (!FileUtils.createNewFile(fileName)) { if (!FileUtils.createNewFile(fileName)) {
......
...@@ -697,6 +697,7 @@ public class MetaTable extends Table { ...@@ -697,6 +697,7 @@ public class MetaTable extends Table {
add(rows, new String[]{"h2.objectCacheMaxPerElementSize", "" + Constants.OBJECT_CACHE_MAX_PER_ELEMENT_SIZE}); add(rows, new String[]{"h2.objectCacheMaxPerElementSize", "" + Constants.OBJECT_CACHE_MAX_PER_ELEMENT_SIZE});
add(rows, new String[]{"h2.clientTraceDirectory", Constants.CLIENT_TRACE_DIRECTORY}); add(rows, new String[]{"h2.clientTraceDirectory", Constants.CLIENT_TRACE_DIRECTORY});
add(rows, new String[]{"h2.scriptDirectory", Constants.SCRIPT_DIRECTORY}); add(rows, new String[]{"h2.scriptDirectory", Constants.SCRIPT_DIRECTORY});
add(rows, new String[]{"h2.maxFileRetry", "" + Constants.MAX_FILE_RETRY});
break; break;
} }
case TYPE_INFO: { case TYPE_INFO: {
......
...@@ -8,7 +8,6 @@ import java.sql.SQLException; ...@@ -8,7 +8,6 @@ import java.sql.SQLException;
import org.h2.command.Prepared; import org.h2.command.Prepared;
import org.h2.command.dml.Query; import org.h2.command.dml.Query;
import org.h2.engine.Constants;
import org.h2.engine.Session; import org.h2.engine.Session;
import org.h2.expression.Expression; import org.h2.expression.Expression;
import org.h2.index.Index; import org.h2.index.Index;
...@@ -18,7 +17,6 @@ import org.h2.message.Message; ...@@ -18,7 +17,6 @@ import org.h2.message.Message;
import org.h2.result.Row; import org.h2.result.Row;
import org.h2.schema.Schema; import org.h2.schema.Schema;
import org.h2.util.ObjectArray; import org.h2.util.ObjectArray;
import org.h2.util.SmallLRUCache;
import org.h2.util.StringUtils; import org.h2.util.StringUtils;
import org.h2.value.Value; import org.h2.value.Value;
......
...@@ -399,9 +399,6 @@ public class FileUtils { ...@@ -399,9 +399,6 @@ public class FileUtils {
} }
public static void copy(String original, String copy) throws SQLException { public static void copy(String original, String copy) throws SQLException {
int todoTestDidNotClose;
//System.out.println("###COPY### " + original + " " + copy);
//new Error("").printStackTrace();
FileOutputStream out = null; FileOutputStream out = null;
FileInputStream in = null; FileInputStream in = null;
try { try {
......
...@@ -8,7 +8,6 @@ import java.sql.SQLException; ...@@ -8,7 +8,6 @@ import java.sql.SQLException;
import java.util.Properties; import java.util.Properties;
import org.h2.engine.Constants; import org.h2.engine.Constants;
import org.h2.message.Message;
import org.h2.server.TcpServer; import org.h2.server.TcpServer;
import org.h2.test.jdbc.*; import org.h2.test.jdbc.*;
import org.h2.test.jdbc.xa.TestXA; import org.h2.test.jdbc.xa.TestXA;
...@@ -95,9 +94,11 @@ java -Xmx512m -Xrunhprof:cpu=samples,depth=8 org.h2.tools.RunScript -url jdbc:h2 ...@@ -95,9 +94,11 @@ java -Xmx512m -Xrunhprof:cpu=samples,depth=8 org.h2.tools.RunScript -url jdbc:h2
test.printSystem(); test.printSystem();
int testing;
Constants.MAX_FILE_RETRY = 1; Constants.MAX_FILE_RETRY = 1;
/* /*
MAX_FILE_RETRY to information.schema.settings
Before you ask support: Before you ask support:
Query is slow Query is slow
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
create table d(d double, r real); create table d(d double, r real);
> ok > ok
insert into d(d, d, r) values(1.1234567890123456789, 1.1234567890123456789, 3);
> exception
insert into d values(1.1234567890123456789, 1.1234567890123456789); insert into d values(1.1234567890123456789, 1.1234567890123456789);
> update count: 1 > update count: 1
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论