Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
1f473b7c
提交
1f473b7c
authored
2月 05, 2008
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
0ea548f0
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
415 行增加
和
13 行删除
+415
-13
Parser.java
h2/src/main/org/h2/command/Parser.java
+1
-0
AlterTableAlterColumn.java
h2/src/main/org/h2/command/ddl/AlterTableAlterColumn.java
+0
-1
Select.java
h2/src/main/org/h2/command/dml/Select.java
+3
-1
ErrorCode.java
h2/src/main/org/h2/constant/ErrorCode.java
+325
-1
SysProperties.java
h2/src/main/org/h2/constant/SysProperties.java
+3
-0
Aggregate.java
h2/src/main/org/h2/expression/Aggregate.java
+6
-3
ExpressionColumn.java
h2/src/main/org/h2/expression/ExpressionColumn.java
+1
-0
_text_en.properties
h2/src/main/org/h2/server/web/res/_text_en.properties
+1
-0
login.jsp
h2/src/main/org/h2/server/web/res/login.jsp
+7
-4
tools.jsp
h2/src/main/org/h2/server/web/res/tools.jsp
+34
-0
Recover.java
h2/src/main/org/h2/tools/Recover.java
+1
-0
StringUtils.java
h2/src/main/org/h2/util/StringUtils.java
+2
-2
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+10
-1
TestFullText.java
h2/src/test/org/h2/test/db/TestFullText.java
+3
-0
test.in.txt
h2/src/test/org/h2/test/test.in.txt
+18
-0
没有找到文件。
h2/src/main/org/h2/command/Parser.java
浏览文件 @
1f473b7c
...
...
@@ -4458,6 +4458,7 @@ public class Parser {
}
public
Expression
parseExpression
(
String
sql
)
throws
SQLException
{
parameters
=
new
ObjectArray
();
initialize
(
sql
);
read
();
return
readExpression
();
...
...
h2/src/main/org/h2/command/ddl/AlterTableAlterColumn.java
浏览文件 @
1f473b7c
...
...
@@ -135,7 +135,6 @@ public class AlterTableAlterColumn extends SchemaCommand {
case
DROP:
{
checkNoViews
();
if
(
table
.
getColumns
().
length
==
1
)
{
// TODO test each sql exception
throw
Message
.
getSQLException
(
ErrorCode
.
CANNOT_DROP_LAST_COLUMN
,
oldColumn
.
getSQL
());
}
table
.
checkColumnIsNotReferenced
(
oldColumn
);
...
...
h2/src/main/org/h2/command/dml/Select.java
浏览文件 @
1f473b7c
...
...
@@ -840,7 +840,9 @@ public class Select extends Query {
case
ExpressionVisitor
.
GET_DEPENDENCIES
:
{
for
(
int
i
=
0
;
i
<
filters
.
size
();
i
++)
{
TableFilter
filter
=
(
TableFilter
)
filters
.
get
(
i
);
filter
.
getTable
().
addDependencies
(
visitor
.
getDependencies
());
Table
table
=
filter
.
getTable
();
visitor
.
addDependency
(
table
);
table
.
addDependencies
(
visitor
.
getDependencies
());
}
break
;
}
...
...
h2/src/main/org/h2/constant/ErrorCode.java
浏览文件 @
1f473b7c
差异被折叠。
点击展开。
h2/src/main/org/h2/constant/SysProperties.java
浏览文件 @
1f473b7c
...
...
@@ -346,6 +346,9 @@ public class SysProperties {
return
s
==
null
?
defaultValue
:
s
;
}
/**
* INTERNAL
*/
public
static
int
getIntSetting
(
String
name
,
int
defaultValue
)
{
String
s
=
getProperty
(
name
);
if
(
s
!=
null
)
{
...
...
h2/src/main/org/h2/expression/Aggregate.java
浏览文件 @
1f473b7c
...
...
@@ -431,9 +431,12 @@ public class Aggregate extends Expression {
if
(
on
instanceof
ExpressionColumn
)
{
ExpressionColumn
col
=
(
ExpressionColumn
)
on
;
Column
column
=
col
.
getColumn
();
Table
table
=
col
.
getTableFilter
().
getTable
();
Index
index
=
table
.
getIndexForColumn
(
column
,
first
);
return
index
;
TableFilter
filter
=
col
.
getTableFilter
();
if
(
filter
!=
null
)
{
Table
table
=
filter
.
getTable
();
Index
index
=
table
.
getIndexForColumn
(
column
,
first
);
return
index
;
}
}
return
null
;
}
...
...
h2/src/main/org/h2/expression/ExpressionColumn.java
浏览文件 @
1f473b7c
...
...
@@ -247,6 +247,7 @@ public class ExpressionColumn extends Expression {
case
ExpressionVisitor
.
NOT_FROM_RESOLVER
:
return
resolver
!=
visitor
.
getResolver
();
case
ExpressionVisitor
.
GET_DEPENDENCIES
:
visitor
.
addDependency
(
column
.
getTable
());
return
true
;
default
:
throw
Message
.
getInternalError
(
"type="
+
visitor
.
type
);
...
...
h2/src/main/org/h2/server/web/res/_text_en.properties
浏览文件 @
1f473b7c
...
...
@@ -53,6 +53,7 @@ login.connect=Connect
login.driverClass
=
Driver Class
login.driverNotFound
=
Database driver not found<br />See in the Help for how to add drivers
login.goAdmin
=
Preferences
login.goTools
=
Tools
login.jdbcUrl
=
JDBC URL
login.language
=
Language
login.login
=
Login
...
...
h2/src/main/org/h2/server/web/res/login.jsp
浏览文件 @
1f473b7c
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
Copyright 2004-2008 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
<!--
Copyright 2004-2008 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
Initial Developer: H2 Group
-->
<html><head>
...
...
@@ -20,9 +20,12 @@ Initial Developer: H2 Group
>
${languageCombo}
</select>
<a
href=
"admin.do?jsessionid=${sessionId}"
>
${text.login.goAdmin}
</a>
<a
href=
"admin.do?jsessionid=${sessionId}"
>
${text.login.goAdmin}
</a>
<!--
<a href="tools.jsp?jsessionid=${sessionId}">${text.login.goTools}</a>
-->
<a
href=
"help.jsp?jsessionid=${sessionId}"
>
${text.a.help}
</a>
</p>
</p>
<table
class=
"login"
cellspacing=
"0"
cellpadding=
"0"
>
<tr
class=
"login"
>
<th
class=
"login"
>
${text.login.login}
</th>
...
...
h2/src/main/org/h2/server/web/res/tools.jsp
0 → 100644
浏览文件 @
1f473b7c
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
Copyright 2004-2008 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
Initial Developer: H2 Group
-->
<html>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html;charset=utf-8"
/>
<title>
${text.a.title}
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"stylesheet.css"
/>
</head>
<body
class=
"result"
>
<div
id=
"output"
>
<h3>
Tools
</h3>
<p>
<a
href=
"javascript:go('Backup')"
>
Backup
</a>
<a
href=
"javascript:go('Restore')"
>
Restore
</a>
<a
href=
"javascript:go('ChangePassword')"
>
ChangePassword
</a>
<a
href=
"javascript:go('ConvertTraceFile')"
>
ConvertTraceFile
</a>
<a
href=
"javascript:go('CreateCluster')"
>
CreateCluster
</a>
<a
href=
"javascript:go('DeleteDbFiles')"
>
DeleteDbFiles
</a>
<a
href=
"javascript:go('Recover')"
>
Recover
</a>
<a
href=
"javascript:go('RunScript')"
>
RunScript
</a>
<a
href=
"javascript:go('Script')"
>
Script
</a>
<a
href=
"javascript:go('Server')"
>
Server
</a>
</p>
</div>
<table
id=
"h2auto"
class=
"autoComp"
><tbody></tbody></table>
</body></html>
\ No newline at end of file
h2/src/main/org/h2/tools/Recover.java
浏览文件 @
1f473b7c
...
...
@@ -68,6 +68,7 @@ public class Recover implements DataHandler {
private
void
showUsage
()
{
System
.
out
.
println
(
"java "
+
getClass
().
getName
()+
" [-dir <dir>] [-db <database>] [-log true]"
);
System
.
out
.
println
(
"For details, see http://h2database.com/javadoc/org/h2/tools/Recover.html"
);
}
/**
...
...
h2/src/main/org/h2/util/StringUtils.java
浏览文件 @
1f473b7c
...
...
@@ -394,7 +394,7 @@ public class StringUtils {
return
dateFormat
.
parse
(
date
);
}
}
catch
(
ParseException
e
)
{
throw
Message
.
getSQLException
(
ErrorCode
.
PARSE_ERROR_1
,
dat
e
);
throw
Message
.
getSQLException
(
ErrorCode
.
PARSE_ERROR_1
,
new
String
[]{
date
},
e
);
}
}
...
...
@@ -421,7 +421,7 @@ public class StringUtils {
}
return
df
;
}
catch
(
Exception
e
)
{
throw
Message
.
getSQLException
(
ErrorCode
.
PARSE_ERROR_1
,
format
+
"/"
+
locale
+
"/"
+
timezon
e
);
throw
Message
.
getSQLException
(
ErrorCode
.
PARSE_ERROR_1
,
new
String
[]{
format
+
"/"
+
locale
+
"/"
+
timezone
},
e
);
}
}
...
...
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
1f473b7c
...
...
@@ -151,10 +151,19 @@ java org.h2.test.TestAll timer
/*
integrate tools in H2 Console
for all tools: add link to javadoc (like Recover)
DbStarter: server.start();
add test case!
C:\temp\crash_db
recovery tool: bad blocks should be converted to INSERT INTO SYSTEM_ERRORS(...),
and things should go into the .trace.db file
RECOVER=2
should
backup the database, run recovery, open the database
RECOVER=2
to
backup the database, run recovery, open the database
Recovery should work with encrypted databases
...
...
h2/src/test/org/h2/test/db/TestFullText.java
浏览文件 @
1f473b7c
...
...
@@ -31,6 +31,9 @@ public class TestFullText extends TestBase {
}
catch
(
ClassNotFoundException
e
)
{
println
(
"Class not found, not tested: "
+
luceneFullTextClassName
);
// ok
}
catch
(
NoClassDefFoundError
e
)
{
println
(
"Class not found, not tested: "
+
luceneFullTextClassName
);
// ok
}
}
...
...
h2/src/test/org/h2/test/test.in.txt
浏览文件 @
1f473b7c
--- special grammar and test cases ---------------------------------------------------------------------------------------------
CREATE TABLE COUNT(X INT);
> ok
CREATE TABLE ITEMS(ID INT CHECK ID < SELECT MAX(ID) FROM COUNT);
> ok
insert into items values(DEFAULT);
> update count: 1
DROP TABLE COUNT;
> exception
insert into items values(DEFAULT);
> update count: 1
drop table items, count;
> ok
CREATE TABLE TEST(ID INT PRIMARY KEY, LABEL CHAR(20), LOOKUP CHAR(30));
> ok
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论