Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
25d38fde
提交
25d38fde
authored
16 年前
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
checkstyle
上级
d862db41
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
17 行增加
和
18 行删除
+17
-18
Parser.java
h2/src/main/org/h2/command/Parser.java
+2
-3
JavaFunction.java
h2/src/main/org/h2/expression/JavaFunction.java
+2
-3
FullText.java
h2/src/main/org/h2/fulltext/FullText.java
+1
-1
FullTextLucene.java
h2/src/main/org/h2/fulltext/FullTextLucene.java
+5
-5
BtreeNode.java
h2/src/main/org/h2/index/BtreeNode.java
+2
-3
Recover.java
h2/src/main/org/h2/tools/Recover.java
+2
-2
CacheObject.java
h2/src/main/org/h2/util/CacheObject.java
+1
-1
TestFunctions.java
h2/src/test/org/h2/test/db/TestFunctions.java
+2
-0
没有找到文件。
h2/src/main/org/h2/command/Parser.java
浏览文件 @
25d38fde
...
@@ -884,11 +884,10 @@ public class Parser {
...
@@ -884,11 +884,10 @@ public class Parser {
command
.
setQuery
(
parseSelect
());
command
.
setQuery
(
parseSelect
());
read
(
")"
);
read
(
")"
);
return
command
;
return
command
;
}
else
{
}
Column
[]
columns
=
parseColumnList
(
table
);
Column
[]
columns
=
parseColumnList
(
table
);
command
.
setColumns
(
columns
);
command
.
setColumns
(
columns
);
}
}
}
if
(
readIf
(
"DEFAULT"
))
{
if
(
readIf
(
"DEFAULT"
))
{
read
(
"VALUES"
);
read
(
"VALUES"
);
Expression
[]
expr
=
new
Expression
[
0
];
Expression
[]
expr
=
new
Expression
[
0
];
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/expression/JavaFunction.java
浏览文件 @
25d38fde
...
@@ -127,10 +127,9 @@ public class JavaFunction extends Expression implements FunctionCall {
...
@@ -127,10 +127,9 @@ public class JavaFunction extends Expression implements FunctionCall {
case
ExpressionVisitor
.
DETERMINISTIC
:
case
ExpressionVisitor
.
DETERMINISTIC
:
if
(!
isDeterministic
())
{
if
(!
isDeterministic
())
{
return
false
;
return
false
;
}
else
{
}
// only if all parameters are deterministic as well
// only if all parameters are deterministic as well
break
;
break
;
}
case
ExpressionVisitor
.
GET_DEPENDENCIES
:
case
ExpressionVisitor
.
GET_DEPENDENCIES
:
visitor
.
addDependency
(
functionAlias
);
visitor
.
addDependency
(
functionAlias
);
break
;
break
;
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/fulltext/FullText.java
浏览文件 @
25d38fde
...
@@ -596,7 +596,7 @@ public class FullText {
...
@@ -596,7 +596,7 @@ public class FullText {
}
}
}
}
private
static
void
addWords
(
FullTextSettings
setting
,
HashSet
set
,
String
text
)
{
static
void
addWords
(
FullTextSettings
setting
,
HashSet
set
,
String
text
)
{
StringTokenizer
tokenizer
=
new
StringTokenizer
(
text
,
" \t\n\r\f+\"*%&/()=?'!,.;:-_#@|^~`{}[]"
);
StringTokenizer
tokenizer
=
new
StringTokenizer
(
text
,
" \t\n\r\f+\"*%&/()=?'!,.;:-_#@|^~`{}[]"
);
while
(
tokenizer
.
hasMoreTokens
())
{
while
(
tokenizer
.
hasMoreTokens
())
{
String
word
=
tokenizer
.
nextToken
();
String
word
=
tokenizer
.
nextToken
();
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/fulltext/FullTextLucene.java
浏览文件 @
25d38fde
...
@@ -49,10 +49,10 @@ import org.h2.util.StringUtils;
...
@@ -49,10 +49,10 @@ import org.h2.util.StringUtils;
public
class
FullTextLucene
extends
FullText
{
public
class
FullTextLucene
extends
FullText
{
//## Java 1.4 begin ##
//## Java 1.4 begin ##
static
final
HashMap
INDEX_MODIFIERS
=
new
HashMap
();
static
final
boolean
STORE_DOCUMENT_TEXT_IN_INDEX
=
Boolean
.
getBoolean
(
"h2.storeDocumentTextInIndex"
);
private
static
final
String
TRIGGER_PREFIX
=
"FTL_"
;
private
static
final
String
TRIGGER_PREFIX
=
"FTL_"
;
private
static
final
String
SCHEMA
=
"FTL"
;
private
static
final
String
SCHEMA
=
"FTL"
;
private
static
final
boolean
STORE_DOCUMENT_TEXT_IN_INDEX
=
Boolean
.
getBoolean
(
"h2.storeDocumentTextInIndex"
);
private
static
final
HashMap
INDEX_MODIFIERS
=
new
HashMap
();
private
static
final
String
FIELD_DATA
=
"DATA"
;
private
static
final
String
FIELD_DATA
=
"DATA"
;
private
static
final
String
FIELD_COLUMN_PREFIX
=
"_"
;
private
static
final
String
FIELD_COLUMN_PREFIX
=
"_"
;
private
static
final
String
FIELD_QUERY
=
"QUERY"
;
private
static
final
String
FIELD_QUERY
=
"QUERY"
;
...
@@ -201,7 +201,7 @@ public class FullTextLucene extends FullText {
...
@@ -201,7 +201,7 @@ public class FullTextLucene extends FullText {
return
search
(
conn
,
text
,
limit
,
offset
,
true
);
return
search
(
conn
,
text
,
limit
,
offset
,
true
);
}
}
private
static
SQLException
convertException
(
Exception
e
)
{
static
SQLException
convertException
(
Exception
e
)
{
SQLException
e2
=
new
SQLException
(
"FULLTEXT"
,
"Error while indexing document"
);
SQLException
e2
=
new
SQLException
(
"FULLTEXT"
,
"Error while indexing document"
);
e2
.
initCause
(
e
);
e2
.
initCause
(
e
);
return
e2
;
return
e2
;
...
@@ -221,7 +221,7 @@ public class FullTextLucene extends FullText {
...
@@ -221,7 +221,7 @@ public class FullTextLucene extends FullText {
stat
.
execute
(
buff
.
toString
());
stat
.
execute
(
buff
.
toString
());
}
}
private
static
IndexModifier
getIndexModifier
(
Connection
conn
)
throws
SQLException
{
static
IndexModifier
getIndexModifier
(
Connection
conn
)
throws
SQLException
{
String
path
=
getIndexPath
(
conn
);
String
path
=
getIndexPath
(
conn
);
IndexModifier
indexer
;
IndexModifier
indexer
;
synchronized
(
INDEX_MODIFIERS
)
{
synchronized
(
INDEX_MODIFIERS
)
{
...
@@ -240,7 +240,7 @@ public class FullTextLucene extends FullText {
...
@@ -240,7 +240,7 @@ public class FullTextLucene extends FullText {
return
indexer
;
return
indexer
;
}
}
private
static
String
getIndexPath
(
Connection
conn
)
throws
SQLException
{
static
String
getIndexPath
(
Connection
conn
)
throws
SQLException
{
Statement
stat
=
conn
.
createStatement
();
Statement
stat
=
conn
.
createStatement
();
ResultSet
rs
=
stat
.
executeQuery
(
"CALL DATABASE_PATH()"
);
ResultSet
rs
=
stat
.
executeQuery
(
"CALL DATABASE_PATH()"
);
rs
.
next
();
rs
.
next
();
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/index/BtreeNode.java
浏览文件 @
25d38fde
...
@@ -155,11 +155,10 @@ public class BtreeNode extends BtreePage {
...
@@ -155,11 +155,10 @@ public class BtreeNode extends BtreePage {
// root page: save as it (empty)
// root page: save as it (empty)
index
.
updatePage
(
session
,
this
);
index
.
updatePage
(
session
,
this
);
return
first
;
return
first
;
}
else
{
}
// no more children - this page is empty as well
// no more children - this page is empty as well
return
oldRow
;
return
oldRow
;
}
}
}
if
(
at
==
0
)
{
if
(
at
==
0
)
{
// the first child is empty - then the first row of this subtree
// the first child is empty - then the first row of this subtree
// has changed
// has changed
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/tools/Recover.java
浏览文件 @
25d38fde
...
@@ -773,7 +773,7 @@ public class Recover extends Tool implements DataHandler {
...
@@ -773,7 +773,7 @@ public class Recover extends Tool implements DataHandler {
break
;
break
;
case
Page
.
TYPE_LOG
:
case
Page
.
TYPE_LOG
:
writer
.
println
(
"-- page "
+
page
+
": log "
+
(
last
?
"(last)"
:
""
));
writer
.
println
(
"-- page "
+
page
+
": log "
+
(
last
?
"(last)"
:
""
));
dumpPageLog
(
store
,
writer
,
s
,
last
);
dumpPageLog
(
writer
,
s
,
last
);
break
;
break
;
default
:
default
:
writer
.
println
(
"-- page "
+
page
+
": ERROR unknown type "
+
type
);
writer
.
println
(
"-- page "
+
page
+
": ERROR unknown type "
+
type
);
...
@@ -926,7 +926,7 @@ public class Recover extends Tool implements DataHandler {
...
@@ -926,7 +926,7 @@ public class Recover extends Tool implements DataHandler {
}
}
private
void
dumpPageLog
(
FileStore
store
,
PrintWriter
writer
,
DataPage
s
,
boolean
last
)
{
private
void
dumpPageLog
(
PrintWriter
writer
,
DataPage
s
,
boolean
last
)
{
if
(
last
)
{
if
(
last
)
{
int
size
=
s
.
readInt
();
int
size
=
s
.
readInt
();
writer
.
println
(
"-- size:"
+
size
);
writer
.
println
(
"-- size:"
+
size
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/util/CacheObject.java
浏览文件 @
25d38fde
...
@@ -20,7 +20,7 @@ public abstract class CacheObject {
...
@@ -20,7 +20,7 @@ public abstract class CacheObject {
/**
/**
* Compare cache objects by position.
* Compare cache objects by position.
*/
*/
private
static
class
CacheComparator
implements
Comparator
{
static
class
CacheComparator
implements
Comparator
{
public
int
compare
(
Object
a
,
Object
b
)
{
public
int
compare
(
Object
a
,
Object
b
)
{
int
pa
=
((
CacheObject
)
a
).
getPos
();
int
pa
=
((
CacheObject
)
a
).
getPos
();
int
pb
=
((
CacheObject
)
b
).
getPos
();
int
pb
=
((
CacheObject
)
b
).
getPos
();
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/db/TestFunctions.java
浏览文件 @
25d38fde
...
@@ -626,6 +626,7 @@ public class TestFunctions extends TestBase implements AggregateFunction {
...
@@ -626,6 +626,7 @@ public class TestFunctions extends TestBase implements AggregateFunction {
//## Java 1.5 end ##
//## Java 1.5 end ##
public
void
add
(
Object
value
)
throws
SQLException
{
public
void
add
(
Object
value
)
throws
SQLException
{
// ignore
}
}
public
Object
getResult
()
throws
SQLException
{
public
Object
getResult
()
throws
SQLException
{
...
@@ -640,6 +641,7 @@ public class TestFunctions extends TestBase implements AggregateFunction {
...
@@ -640,6 +641,7 @@ public class TestFunctions extends TestBase implements AggregateFunction {
}
}
public
void
init
(
Connection
conn
)
throws
SQLException
{
public
void
init
(
Connection
conn
)
throws
SQLException
{
// ignore
}
}
}
}
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论