Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
9bc3308f
提交
9bc3308f
authored
17 年前
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
7b4f671f
无相关合并请求
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
22 行增加
和
15 行删除
+22
-15
history.html
h2/src/docsrc/html/history.html
+4
-2
Parser.java
h2/src/main/org/h2/command/Parser.java
+11
-5
FileLock.java
h2/src/main/org/h2/store/FileLock.java
+0
-1
MetaTable.java
h2/src/main/org/h2/table/MetaTable.java
+1
-0
TableView.java
h2/src/main/org/h2/table/TableView.java
+0
-2
FileUtils.java
h2/src/main/org/h2/util/FileUtils.java
+0
-3
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+3
-2
test.in.txt
h2/src/test/org/h2/test/test.in.txt
+3
-0
没有找到文件。
h2/src/docsrc/html/history.html
浏览文件 @
9bc3308f
...
...
@@ -37,7 +37,8 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch.
<h3>
Version 1.0 (Current)
</h3>
<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>
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.
...
...
@@ -1181,7 +1182,8 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch.
<h3>
In Version 1.1
</h3>
<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>
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)
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/command/Parser.java
浏览文件 @
9bc3308f
...
...
@@ -8,6 +8,7 @@ import java.math.BigDecimal;
import
java.math.BigInteger
;
import
java.sql.SQLException
;
import
java.text.Collator
;
import
java.util.HashSet
;
import
org.h2.command.ddl.AlterIndexRename
;
import
org.h2.command.ddl.AlterSequence
;
...
...
@@ -406,7 +407,6 @@ public class Parser {
}
}
if
(
c
==
null
)
{
//return new ParserInt(session).parse(sql);
throw
getSyntaxError
();
}
setSQL
(
c
,
null
,
start
);
...
...
@@ -604,10 +604,12 @@ public class Parser {
do
{
String
columnName
=
readColumnIdentifier
();
columns
.
add
(
columnName
);
if
(
readIf
(
"ASC"
))
{
// ignore
}
else
{
readIf
(
"DESC"
);
if
(
ascDesc
)
{
if
(
readIf
(
"ASC"
))
{
// ignore
}
else
{
readIf
(
"DESC"
);
}
}
}
while
(
readIf
(
","
));
read
(
")"
);
...
...
@@ -618,9 +620,13 @@ public class Parser {
private
Column
[]
parseColumnList
(
Table
table
)
throws
SQLException
{
ObjectArray
columns
=
new
ObjectArray
();
HashSet
set
=
new
HashSet
();
if
(!
readIf
(
")"
))
{
do
{
Column
column
=
table
.
getColumn
(
readColumnIdentifier
());
if
(!
set
.
add
(
column
))
{
throw
Message
.
getSQLException
(
Message
.
DUPLICATE_COLUMN_NAME_1
,
column
.
getSQL
());
}
columns
.
add
(
column
);
}
while
(
readIf
(
","
));
read
(
")"
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/store/FileLock.java
浏览文件 @
9bc3308f
...
...
@@ -158,7 +158,6 @@ public class FileLock {
method
=
FILE
;
properties
=
new
Properties
();
byte
[]
bytes
=
RandomUtils
.
getSecureBytes
(
RANDOM_BYTES
);
System
.
out
.
println
(
"lockFile 2b"
+
fileName
);
String
random
=
ByteUtils
.
convertBytesToString
(
bytes
);
properties
.
setProperty
(
"id"
,
Long
.
toHexString
(
System
.
currentTimeMillis
())+
random
);
if
(!
FileUtils
.
createNewFile
(
fileName
))
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/table/MetaTable.java
浏览文件 @
9bc3308f
...
...
@@ -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.clientTraceDirectory"
,
Constants
.
CLIENT_TRACE_DIRECTORY
});
add
(
rows
,
new
String
[]{
"h2.scriptDirectory"
,
Constants
.
SCRIPT_DIRECTORY
});
add
(
rows
,
new
String
[]{
"h2.maxFileRetry"
,
""
+
Constants
.
MAX_FILE_RETRY
});
break
;
}
case
TYPE_INFO:
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/table/TableView.java
浏览文件 @
9bc3308f
...
...
@@ -8,7 +8,6 @@ import java.sql.SQLException;
import
org.h2.command.Prepared
;
import
org.h2.command.dml.Query
;
import
org.h2.engine.Constants
;
import
org.h2.engine.Session
;
import
org.h2.expression.Expression
;
import
org.h2.index.Index
;
...
...
@@ -18,7 +17,6 @@ import org.h2.message.Message;
import
org.h2.result.Row
;
import
org.h2.schema.Schema
;
import
org.h2.util.ObjectArray
;
import
org.h2.util.SmallLRUCache
;
import
org.h2.util.StringUtils
;
import
org.h2.value.Value
;
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/util/FileUtils.java
浏览文件 @
9bc3308f
...
...
@@ -399,9 +399,6 @@ public class FileUtils {
}
public
static
void
copy
(
String
original
,
String
copy
)
throws
SQLException
{
int
todoTestDidNotClose
;
//System.out.println("###COPY### " + original + " " + copy);
//new Error("").printStackTrace();
FileOutputStream
out
=
null
;
FileInputStream
in
=
null
;
try
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
9bc3308f
...
...
@@ -8,7 +8,6 @@ import java.sql.SQLException;
import
java.util.Properties
;
import
org.h2.engine.Constants
;
import
org.h2.message.Message
;
import
org.h2.server.TcpServer
;
import
org.h2.test.jdbc.*
;
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
test
.
printSystem
();
int
testing
;
Constants
.
MAX_FILE_RETRY
=
1
;
/*
MAX_FILE_RETRY to information.schema.settings
Before you ask support:
Query is slow
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/test.in.txt
浏览文件 @
9bc3308f
...
...
@@ -2,6 +2,9 @@
create table d(d double, r real);
> ok
insert into d(d, d, r) values(1.1234567890123456789, 1.1234567890123456789, 3);
> exception
insert into d values(1.1234567890123456789, 1.1234567890123456789);
> update count: 1
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论