Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
f2b7015f
提交
f2b7015f
authored
3月 31, 2007
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
a0f72ec6
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
34 行增加
和
11 行删除
+34
-11
history.html
h2/src/docsrc/html/history.html
+21
-2
Parser.java
h2/src/main/org/h2/command/Parser.java
+13
-9
没有找到文件。
h2/src/docsrc/html/history.html
浏览文件 @
f2b7015f
...
@@ -35,6 +35,21 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch.
...
@@ -35,6 +35,21 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch.
<h2>
Change Log
</h2>
<h2>
Change Log
</h2>
<h3>
Version 1.0 (Current)
</h3>
<h3>
Version 1.0 (Current)
</h3>
<h3>
Version 1.0 / TODO
</h3><ul>
<li>
SQLException.getCause of the now works for JDK 1.4 and higher.
</li><li>
If the index file was deleted, an error was logged in the .trace.db file. This is no longer done.
</li><li>
The Portuguese (Europe) translation is available. Thanks a lot to Antonio Casqueiro!
</li><li>
The error message for invalid views has been improved (the root cause is included in the message now).
</li><li>
IN(SELECT ...) was not working correctly if the subquery returned a NULL value. Fixed.
</li><li>
DROP ALL OBJECTS did not drop constants.
</li><li>
DROP ALL OBJECTS dropped the role PUBLIC, which was wrong. Fixed.
</li><li>
CASE was parsed as a function if the expression was in (). Fixed.
</li><li>
When ORDER BY was used together with DISTINCT, it was required to type the column
name exactly in the select list and the order list exactly in the same way.
This is not required any longer.
</li></ul>
<h3>
Version 1.0 / 2007-03-04
</h3><ul>
<h3>
Version 1.0 / 2007-03-04
</h3><ul>
<li>
System sequences (automatically created sequences for IDENTITY or AUTO_INCREMENT columns) are now
<li>
System sequences (automatically created sequences for IDENTITY or AUTO_INCREMENT columns) are now
random (UUIDs) to avoid clashes when merging databases using RUNSCRIPT.
random (UUIDs) to avoid clashes when merging databases using RUNSCRIPT.
...
@@ -1311,6 +1326,8 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch.
...
@@ -1311,6 +1326,8 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch.
</li><li>
Support SET REFERENTIAL_INTEGRITY {TRUE|FALSE}
</li><li>
Support SET REFERENTIAL_INTEGRITY {TRUE|FALSE}
</li><li>
Support CHAR data type (internally use VARCHAR, but report CHAR for JPox)
</li><li>
Support CHAR data type (internally use VARCHAR, but report CHAR for JPox)
</li><li>
Recovery for BLOB / CLOB: support functions
</li><li>
Recovery for BLOB / CLOB: support functions
</li><li>
Better support large transactions, large updates / deletes: use less memory
</li><li>
Better support large transactions, large updates / deletes: allow tables without primary key
</li></ul>
</li></ul>
<h3>
Priority 2
</h3>
<h3>
Priority 2
</h3>
...
@@ -1429,7 +1446,6 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch.
...
@@ -1429,7 +1446,6 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch.
</li><li>
Max memory rows / max undo log size: use block count / row size not row count
</li><li>
Max memory rows / max undo log size: use block count / row size not row count
</li><li>
Index summary is only written if log=2; maybe write it also when log=1 and everything is fine (and no in doubt transactions)
</li><li>
Index summary is only written if log=2; maybe write it also when log=1 and everything is fine (and no in doubt transactions)
</li><li>
Support 123L syntax as in Java; example: SELECT (2000000000*2)
</li><li>
Support 123L syntax as in Java; example: SELECT (2000000000*2)
</li><li>
Better support large transactions, large updates / deletes: allow tables without primary key
</li><li>
Implement point-in-time recovery
</li><li>
Implement point-in-time recovery
</li><li>
Memory database: add a feature to keep named database open until 'shutdown'
</li><li>
Memory database: add a feature to keep named database open until 'shutdown'
</li><li>
Harden against 'out of memory attacks' (multi-threading, out of memory in the application)
</li><li>
Harden against 'out of memory attacks' (multi-threading, out of memory in the application)
...
@@ -1565,6 +1581,8 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch.
...
@@ -1565,6 +1581,8 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch.
</li><li>
Release locks (shared or exclusive) on demand
</li><li>
Release locks (shared or exclusive) on demand
</li><li>
Support catalog names
</li><li>
Support catalog names
</li><li>
Add object id to metadata tables
</li><li>
Add object id to metadata tables
</li><li>
Support OUTER UNION
</li><li>
Support Parameterized Views (similar to CSVREAD, but using just SQL for the definition)
</li></ul>
</li></ul>
<h3>
Not Planned
</h3>
<h3>
Not Planned
</h3>
...
@@ -1581,7 +1599,8 @@ via PayPal:
...
@@ -1581,7 +1599,8 @@ via PayPal:
<ul>
<ul>
<li>
Florent Ramiere, France
<li>
Florent Ramiere, France
</li><li>
Pete Haidinyak, USA
</li><li>
Pete Haidinyak, USA
</li><li>
Jun Iyama, USA
</li><li>
Jun Iyama, Japan
</li><li>
Antonio Casqueiro, Portugal
</li></ul>
</li></ul>
</div></td></tr></table></body></html>
</div></td></tr></table></body></html>
h2/src/main/org/h2/command/Parser.java
浏览文件 @
f2b7015f
...
@@ -734,7 +734,7 @@ public class Parser {
...
@@ -734,7 +734,7 @@ public class Parser {
if
(
isToken
(
"SELECT"
)
||
isToken
(
"FROM"
))
{
if
(
isToken
(
"SELECT"
)
||
isToken
(
"FROM"
))
{
Query
query
=
parseQueryWithParams
();
Query
query
=
parseQueryWithParams
();
String
querySQL
=
query
.
getSQL
();
String
querySQL
=
query
.
getSQL
();
table
=
new
TableView
(
mainSchema
,
0
,
"TEMP_VIEW"
,
querySQL
,
query
.
getParameters
(),
null
,
session
);
table
=
new
TableView
(
mainSchema
,
0
,
"TEMP_VIEW"
,
querySQL
,
query
.
getParameters
(),
null
,
session
,
false
);
read
(
")"
);
read
(
")"
);
}
else
{
}
else
{
TableFilter
top
=
readTableFilter
(
fromOuter
);
TableFilter
top
=
readTableFilter
(
fromOuter
);
...
@@ -1798,6 +1798,15 @@ public class Parser {
...
@@ -1798,6 +1798,15 @@ public class Parser {
r
=
ValueExpression
.
get
(
ValueBytes
.
getNoCopy
(
buffer
));
r
=
ValueExpression
.
get
(
ValueBytes
.
getNoCopy
(
buffer
));
}
else
if
(
readIf
(
"."
))
{
}
else
if
(
readIf
(
"."
))
{
return
readTermObjectDot
(
name
);
return
readTermObjectDot
(
name
);
}
else
if
(
"CASE"
.
equals
(
name
))
{
// CASE must be processed before (,
// otherwise CASE(3) would be a function call, which it is not
if
(
isToken
(
"WHEN"
))
{
return
readWhen
(
null
);
}
else
{
Expression
left
=
readExpression
();
return
readWhen
(
left
);
}
}
else
if
(
readIf
(
"("
))
{
}
else
if
(
readIf
(
"("
))
{
return
readFunction
(
name
);
return
readFunction
(
name
);
}
else
if
(
"CURRENT"
.
equals
(
name
))
{
}
else
if
(
"CURRENT"
.
equals
(
name
))
{
...
@@ -1827,13 +1836,6 @@ public class Parser {
...
@@ -1827,13 +1836,6 @@ public class Parser {
String
timestamp
=
currentValue
.
getString
();
String
timestamp
=
currentValue
.
getString
();
read
();
read
();
return
ValueExpression
.
get
(
ValueTimestamp
.
getNoCopy
(
ValueTimestamp
.
parseTimestamp
(
timestamp
)));
return
ValueExpression
.
get
(
ValueTimestamp
.
getNoCopy
(
ValueTimestamp
.
parseTimestamp
(
timestamp
)));
}
else
if
(
"CASE"
.
equals
(
name
))
{
if
(
isToken
(
"WHEN"
))
{
return
readWhen
(
null
);
}
else
{
Expression
left
=
readExpression
();
return
readWhen
(
left
);
}
}
else
{
}
else
{
return
new
ExpressionColumn
(
database
,
currentSelect
,
null
,
null
,
name
);
return
new
ExpressionColumn
(
database
,
currentSelect
,
null
,
null
,
name
);
}
}
...
@@ -3183,6 +3185,7 @@ public class Parser {
...
@@ -3183,6 +3185,7 @@ public class Parser {
boolean
ifNotExists
=
readIfNoExists
();
boolean
ifNotExists
=
readIfNoExists
();
String
viewName
=
readIdentifierWithSchema
();
String
viewName
=
readIdentifierWithSchema
();
CreateView
command
=
new
CreateView
(
session
,
getSchema
());
CreateView
command
=
new
CreateView
(
session
,
getSchema
());
command
.
setRecursive
(
recursive
);
command
.
setViewName
(
viewName
);
command
.
setViewName
(
viewName
);
command
.
setIfNotExists
(
ifNotExists
);
command
.
setIfNotExists
(
ifNotExists
);
command
.
setComment
(
readCommentIf
());
command
.
setComment
(
readCommentIf
());
...
@@ -3194,7 +3197,8 @@ public class Parser {
...
@@ -3194,7 +3197,8 @@ public class Parser {
for
(
int
i
=
0
;
i
<
cols
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
cols
.
length
;
i
++)
{
columns
.
add
(
new
Column
(
cols
[
i
],
Value
.
STRING
,
0
,
0
));
columns
.
add
(
new
Column
(
cols
[
i
],
Value
.
STRING
,
0
,
0
));
}
}
recursiveTable
=
new
TableData
(
getSchema
(),
viewName
,
0
,
columns
,
false
);
int
id
=
database
.
allocateObjectId
(
true
,
true
);
recursiveTable
=
new
TableData
(
getSchema
(),
viewName
,
id
,
columns
,
false
);
recursiveTable
.
setTemporary
(
true
);
recursiveTable
.
setTemporary
(
true
);
session
.
addLocalTempTable
(
recursiveTable
);
session
.
addLocalTempTable
(
recursiveTable
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论