Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
3ab5f276
提交
3ab5f276
authored
1月 15, 2008
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
a49fa5aa
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
109 行增加
和
37 行删除
+109
-37
Call.java
h2/src/main/org/h2/command/dml/Call.java
+18
-1
ScriptCommand.java
h2/src/main/org/h2/command/dml/ScriptCommand.java
+4
-0
Set.java
h2/src/main/org/h2/command/dml/Set.java
+10
-0
SetTypes.java
h2/src/main/org/h2/command/dml/SetTypes.java
+2
-0
Database.java
h2/src/main/org/h2/engine/Database.java
+5
-4
BaseIndex.java
h2/src/main/org/h2/index/BaseIndex.java
+6
-8
_text_uk.properties
h2/src/main/org/h2/server/web/res/_text_uk.properties
+7
-7
NetUtils.java
h2/src/main/org/h2/util/NetUtils.java
+1
-1
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+12
-16
TestOptimizations.java
h2/src/test/org/h2/test/db/TestOptimizations.java
+17
-0
TestBatchUpdates.java
h2/src/test/org/h2/test/jdbc/TestBatchUpdates.java
+27
-0
没有找到文件。
h2/src/main/org/h2/command/dml/Call.java
浏览文件 @
3ab5f276
...
...
@@ -21,7 +21,7 @@ import org.h2.value.ValueResultSet;
/**
* This class represents the statement
* CALL
* CALL
.
*/
public
class
Call
extends
Prepared
{
private
Expression
value
;
...
...
@@ -37,6 +37,23 @@ public class Call extends Prepared {
return
result
;
}
public
int
update
()
throws
SQLException
{
Value
v
=
value
.
getValue
(
session
);
int
type
=
v
.
getType
();
switch
(
type
)
{
case
Value
.
RESULT_SET
:
case
Value
.
ARRAY
:
// this will throw an exception
// methods returning a result set may not be called like this.
return
super
.
update
();
case
Value
.
UNKNOWN
:
case
Value
.
NULL
:
return
0
;
default
:
return
v
.
getInt
();
}
}
public
LocalResult
query
(
int
maxrows
)
throws
SQLException
{
setCurrentRowNumber
(
1
);
Value
v
=
value
.
getValue
(
session
);
...
...
h2/src/main/org/h2/command/dml/ScriptCommand.java
浏览文件 @
3ab5f276
...
...
@@ -132,6 +132,10 @@ public class ScriptCommand extends ScriptBase {
ObjectArray
settings
=
db
.
getAllSettings
();
for
(
int
i
=
0
;
i
<
settings
.
size
();
i
++)
{
Setting
setting
=
(
Setting
)
settings
.
get
(
i
);
if
(
setting
.
getName
().
equals
(
SetTypes
.
getTypeName
(
SetTypes
.
CREATE_BUILD
)))
{
// don't add CREATE_BUILD to the script (it is only set when creating the database)
continue
;
}
add
(
setting
.
getCreateSQL
(),
false
);
}
}
...
...
h2/src/main/org/h2/command/dml/Set.java
浏览文件 @
3ab5f276
...
...
@@ -280,6 +280,16 @@ public class Set extends Prepared {
database
.
setExclusiveSession
(
value
==
1
?
session
:
null
);
break
;
}
case
SetTypes
.
CREATE_BUILD
:
{
session
.
getUser
().
checkAdmin
();
if
(
database
.
isStarting
())
{
// just ignore the command if not starting
// this avoids problems when running recovery scripts
int
value
=
getIntValue
();
addOrUpdateSetting
(
name
,
null
,
value
);
}
break
;
}
default
:
throw
Message
.
getInternalError
(
"type="
+
type
);
}
...
...
h2/src/main/org/h2/command/dml/SetTypes.java
浏览文件 @
3ab5f276
...
...
@@ -21,6 +21,7 @@ public class SetTypes {
public
static
final
int
COMPRESS_LOB
=
23
,
ALLOW_LITERALS
=
24
,
MULTI_THREADED
=
25
,
SCHEMA
=
26
;
public
static
final
int
OPTIMIZE_REUSE_RESULTS
=
27
,
SCHEMA_SEARCH_PATH
=
28
,
UNDO_LOG
=
29
;
public
static
final
int
REFERENTIAL_INTEGRITY
=
30
,
MVCC
=
31
,
MAX_OPERATION_MEMORY
=
32
,
EXCLUSIVE
=
33
;
public
static
final
int
CREATE_BUILD
=
34
;
private
static
ObjectArray
types
=
new
ObjectArray
();
...
...
@@ -58,6 +59,7 @@ public class SetTypes {
setType
(
MVCC
,
"MVCC"
);
setType
(
MAX_OPERATION_MEMORY
,
"MAX_OPERATION_MEMORY"
);
setType
(
EXCLUSIVE
,
"EXCLUSIVE"
);
setType
(
CREATE_BUILD
,
"CREATE_BUILD"
);
}
private
static
void
setType
(
int
type
,
String
name
)
{
...
...
h2/src/main/org/h2/engine/Database.java
浏览文件 @
3ab5f276
...
...
@@ -63,12 +63,12 @@ import org.h2.value.ValueInt;
/**
* There is one database object per open database.
*
* The format of the meta data table is:
* id int, headPos int (for indexes), objectType int, sql varchar
*
* @since 2004-04-15 22:49
*/
/*
* MetaData format: int id int headPos (for indexes) int objectType String sql
*/
public
class
Database
implements
DataHandler
{
private
final
boolean
persistent
;
...
...
@@ -539,6 +539,7 @@ public class Database implements DataHandler {
addDefaultSetting
(
systemSession
,
SetTypes
.
CACHE_SIZE
,
null
,
SysProperties
.
CACHE_SIZE_DEFAULT
);
addDefaultSetting
(
systemSession
,
SetTypes
.
CLUSTER
,
Constants
.
CLUSTERING_DISABLED
,
0
);
addDefaultSetting
(
systemSession
,
SetTypes
.
WRITE_DELAY
,
null
,
Constants
.
DEFAULT_WRITE_DELAY
);
addDefaultSetting
(
systemSession
,
SetTypes
.
CREATE_BUILD
,
null
,
Constants
.
BUILD_ID
);
if
(!
readOnly
)
{
removeUnusedStorages
(
systemSession
);
}
...
...
h2/src/main/org/h2/index/BaseIndex.java
浏览文件 @
3ab5f276
...
...
@@ -172,6 +172,7 @@ public abstract class BaseIndex extends SchemaObjectBase implements Index {
public
long
getCostRangeIndex
(
int
[]
masks
,
long
rowCount
)
throws
SQLException
{
rowCount
+=
Constants
.
COST_ROW_OFFSET
;
long
cost
=
rowCount
;
long
rows
=
rowCount
;
int
totalSelectivity
=
0
;
for
(
int
i
=
0
;
masks
!=
null
&&
i
<
columns
.
length
;
i
++)
{
Column
column
=
columns
[
i
];
...
...
@@ -187,19 +188,16 @@ public abstract class BaseIndex extends SchemaObjectBase implements Index {
if
(
distinctRows
<=
0
)
{
distinctRows
=
1
;
}
long
rowsSelected
=
rowCount
/
distinctRows
;
if
(
rowsSelected
<
1
)
{
rowsSelected
=
1
;
}
cost
=
getLookupCost
(
rowCount
)
+
rowsSelected
;
rows
=
Math
.
max
(
rowCount
/
distinctRows
,
1
);
cost
=
getLookupCost
(
rowCount
)
+
rows
;
}
else
if
((
mask
&
IndexCondition
.
RANGE
)
==
IndexCondition
.
RANGE
)
{
cost
=
getLookupCost
(
rowCount
)
+
row
Count
/
4
;
cost
=
getLookupCost
(
rowCount
)
+
row
s
/
4
;
break
;
}
else
if
((
mask
&
IndexCondition
.
START
)
==
IndexCondition
.
START
)
{
cost
=
getLookupCost
(
rowCount
)
+
row
Count
/
3
;
cost
=
getLookupCost
(
rowCount
)
+
row
s
/
3
;
break
;
}
else
if
((
mask
&
IndexCondition
.
END
)
==
IndexCondition
.
END
)
{
cost
=
row
Count
/
3
;
cost
=
row
s
/
3
;
break
;
}
else
{
break
;
...
...
h2/src/main/org/h2/server/web/res/_text_uk.properties
浏览文件 @
3ab5f276
...
...
@@ -5,7 +5,7 @@ a.lynxNotSupported=&\#x0412;&\#x0438;&\#x0431;&\#x0430;&\#x0447;&\#x0442;&\#x043
a.password
=
&
\#
x041F;&
\#
x0430;&
\#
x0440;&
\#
x043E;&
\#
x043B;&
\#
x044C;
a.remoteConnectionsDisabled
=
&
\#
x0412;&
\#
x0438;&
\#
x0431;&
\#
x0430;&
\#
x0447;&
\#
x0442;&
\#
x0435;, &
\#
x0432;&
\#
x0456;&
\#
x0434;&
\#
x0434;&
\#
x0430;&
\#
x043B;&
\#
x0435;&
\#
x043D;&
\#
x0456; &
\#
x043F;&
\#
x0456;&
\#
x0434;&
\#
x043A;&
\#
x043B;&
\#
x044E;&
\#
x0447;&
\#
x0435;&
\#
x043D;&
\#
x043D;&
\#
x044F; ('webAllowOthers') &
\#
x043D;&
\#
x0430; &
\#
x0446;&
\#
x044C;&
\#
x043E;&
\#
x043C;&
\#
x0443; &
\#
x0441;&
\#
x0435;&
\#
x0440;&
\#
x0432;&
\#
x0435;&
\#
x0440;&
\#
x0456; &
\#
x0437;&
\#
x0430;&
\#
x0431;&
\#
x043E;&
\#
x0440;&
\#
x043E;&
\#
x043D;&
\#
x0435;&
\#
x043D;&
\#
x0456;.
a.title
=
&
\#
x041A;&
\#
x043E;&
\#
x043D;&
\#
x0441;&
\#
x043E;&
\#
x043B;&
\#
x044C; H2
a.user
=
&
\#
x04
6
;&
\#
x043C;'&
\#
x044F; &
\#
x043A;&
\#
x043E;&
\#
x0440;&
\#
x0438;&
\#
x0441;&
\#
x0442;&
\#
x0443;&
\#
x0432;&
\#
x0430;&
\#
x0447;&
\#
x0430;
a.user
=
&
\#
x04
9
;&
\#
x043C;'&
\#
x044F; &
\#
x043A;&
\#
x043E;&
\#
x0440;&
\#
x0438;&
\#
x0441;&
\#
x0442;&
\#
x0443;&
\#
x0432;&
\#
x0430;&
\#
x0447;&
\#
x0430;
admin.executing
=
&
\#
x0412;&
\#
x0438;&
\#
x043A;&
\#
x043E;&
\#
x043D;&
\#
x0443;&
\#
x0454;&
\#
x0442;&
\#
x044C;&
\#
x0441;&
\#
x044F;
admin.ip
=
IP
admin.lastAccess
=
&
\#
x041E;&
\#
x0441;&
\#
x0442;&
\#
x0430;&
\#
x043D;&
\#
x043D;&
\#
x0456;&
\#
x0439; &
\#
x0434;&
\#
x043E;&
\#
x0441;&
\#
x0442;&
\#
x0443;&
\#
x043F;
...
...
@@ -30,7 +30,7 @@ adminShutdown=&\#x0412;&\#x0438;&\#x043A;&\#x043B;&\#x044E;&\#x0447;&\#x0438;&\#
adminTitle
=
&
\#
x041D;&
\#
x0430;&
\#
x0441;&
\#
x0442;&
\#
x0440;&
\#
x043E;&
\#
x0439;&
\#
x043A;&
\#
x0438; &
\#
x043A;&
\#
x043E;&
\#
x043D;&
\#
x0441;&
\#
x043E;&
\#
x043B;&
\#
x0456; H2
helpAction
=
&
\#
x0414;&
\#
x0456;&
\#
x044F;
helpAddAnotherRow
=
&
\#
x0414;&
\#
x043E;&
\#
x0434;&
\#
x0430;&
\#
x0442;&
\#
x0438; &
\#
x043D;&
\#
x043E;&
\#
x0432;&
\#
x0438;&
\#
x0439; &
\#
x0440;&
\#
x044F;&
\#
x0434;&
\#
x043E;&
\#
x043A;
helpAddDrivers
=
&
\#
x0414;&
\#
x043E;&
\#
x0434;&
\#
x0430;&
\#
x04
54;&
\#
x0442;&
\#
x044C;&
\#
x0441;&
\#
x044F
; &
\#
x0434;&
\#
x0440;&
\#
x0430;&
\#
x0439;&
\#
x0432;&
\#
x0435;&
\#
x0440; &
\#
x0431;&
\#
x0430;&
\#
x0437;&
\#
x0438; &
\#
x0434;&
\#
x0430;&
\#
x043D;&
\#
x0438;&
\#
x0445;
helpAddDrivers
=
&
\#
x0414;&
\#
x043E;&
\#
x0434;&
\#
x0430;&
\#
x04
42;&
\#
x0438
; &
\#
x0434;&
\#
x0440;&
\#
x0430;&
\#
x0439;&
\#
x0432;&
\#
x0435;&
\#
x0440; &
\#
x0431;&
\#
x0430;&
\#
x0437;&
\#
x0438; &
\#
x0434;&
\#
x0430;&
\#
x043D;&
\#
x0438;&
\#
x0445;
helpAddDriversOnlyJava
=
&
\#
x041B;&
\#
x0438;&
\#
x0448;&
\#
x0435; Java &
\#
x0432;&
\#
x0435;&
\#
x0440;&
\#
x0441;&
\#
x0456;&
\#
x044F; &
\#
x043F;&
\#
x0456;&
\#
x0434;&
\#
x0442;&
\#
x0440;&
\#
x0438;&
\#
x043C;&
\#
x0443;&
\#
x0454; &
\#
x0434;&
\#
x043E;&
\#
x0434;&
\#
x0430;&
\#
x0442;&
\#
x043A;&
\#
x043E;&
\#
x0432;&
\#
x0456; &
\#
x0434;&
\#
x0440;&
\#
x0430;&
\#
x0439;&
\#
x0432;&
\#
x0435;&
\#
x0440;&
\#
x0438; (&
\#
x0446;&
\#
x044F; &
\#
x043C;&
\#
x043E;&
\#
x0436;&
\#
x043B;&
\#
x0438;&
\#
x0432;&
\#
x0456;&
\#
x0441;&
\#
x0442;&
\#
x044C; &
\#
x043D;&
\#
x0435; &
\#
x043F;&
\#
x0456;&
\#
x0434;&
\#
x0442;&
\#
x0440;&
\#
x0438;&
\#
x043C;&
\#
x0443;&
\#
x0454;&
\#
x0442;&
\#
x044C;&
\#
x0441;&
\#
x044F; &
\#
x0440;&
\#
x0456;&
\#
x0434;&
\#
x043D;&
\#
x043E;&
\#
x044E; &
\#
x0432;&
\#
x0435;&
\#
x0440;&
\#
x0441;&
\#
x0456;&
\#
x0454;&
\#
x044E;).
helpAddDriversText
=
&
\#
x041D;&
\#
x043E;&
\#
x0432;&
\#
x0456; &
\#
x0434;&
\#
x0440;&
\#
x0430;&
\#
x0439;&
\#
x0432;&
\#
x0435;&
\#
x0440;&
\#
x0438; &
\#
x0431;&
\#
x0430;&
\#
x0437; &
\#
x0434;&
\#
x0430;&
\#
x043D;&
\#
x0438;&
\#
x0445; &
\#
x043C;&
\#
x043E;&
\#
x0436;&
\#
x0443;&
\#
x0442;&
\#
x044C; &
\#
x0431;&
\#
x0443;&
\#
x0442;&
\#
x0438; &
\#
x0437;&
\#
x0430;&
\#
x0440;&
\#
x0435;&
\#
x0454;&
\#
x0441;&
\#
x0442;&
\#
x0440;&
\#
x043E;&
\#
x0432;&
\#
x0430;&
\#
x043D;&
\#
x0456; &
\#
x0434;&
\#
x043E;&
\#
x0434;&
\#
x0430;&
\#
x0432;&
\#
x0430;&
\#
x043D;&
\#
x043D;&
\#
x044F;&
\#
x043C; &
\#
x0448;&
\#
x043B;&
\#
x044F;&
\#
x0445;&
\#
x0443; &
\#
x0434;&
\#
x043E; Jar-&
\#
x0444;&
\#
x0430;&
\#
x0439;&
\#
x043B;&
\#
x0443; &
\#
x0437; &
\#
x0434;&
\#
x0440;&
\#
x0430;&
\#
x0439;&
\#
x0432;&
\#
x0435;&
\#
x0440;&
\#
x043E;&
\#
x043C; &
\#
x0434;&
\#
x043E; &
\#
x0437;&
\#
x043C;&
\#
x0456;&
\#
x043D;&
\#
x043D;&
\#
x043E;&
\#
x0457; &
\#
x043E;&
\#
x0442;&
\#
x043E;&
\#
x0447;&
\#
x0435;&
\#
x043D;&
\#
x043D;&
\#
x044F; H2DRIVERS &
\#
x0430;&
\#
x0431;&
\#
x043E; CLASSPATH. &
\#
x041D;&
\#
x0430;&
\#
x043F;&
\#
x0440;&
\#
x0438;&
\#
x043A;&
\#
x043B;&
\#
x0430;&
\#
x0434; (Windows)
\:
&
\#
x0429;&
\#
x043E;&
\#
x0431; &
\#
x0434;&
\#
x043E;&
\#
x0434;&
\#
x0430;&
\#
x0442;&
\#
x0438; &
\#
x0434;&
\#
x0440;&
\#
x0430;&
\#
x0439;&
\#
x0432;&
\#
x0435;&
\#
x0440; &
\#
x0431;&
\#
x0430;&
\#
x0437;&
\#
x0438; &
\#
x0434;&
\#
x0430;&
\#
x043D;&
\#
x0438;&
\#
x0445; C
\:\\
Programs
\\
hsqldb
\\
lib
\\
hsqldb.jar, &
\#
x0432;&
\#
x0441;&
\#
x0442;&
\#
x0430;&
\#
x043D;&
\#
x043E;&
\#
x0432;&
\#
x0456;&
\#
x0442;&
\#
x044C; &
\#
x0437;&
\#
x043C;&
\#
x0456;&
\#
x043D;&
\#
x043D;&
\#
x0443; &
\#
x043E;&
\#
x0442;&
\#
x043E;&
\#
x0447;&
\#
x0435;&
\#
x043D;&
\#
x043D;&
\#
x044F; H2DRIVERS &
\#
x0440;&
\#
x0456;&
\#
x0432;&
\#
x043D;&
\#
x043E;&
\#
x044E; C
\:\\
Programs
\\
hsqldb
\\
lib
\\
hsqldb.jar.
helpAddRow
=
&
\#
x0414;&
\#
x043E;&
\#
x0434;&
\#
x0430;&
\#
x0442;&
\#
x0438; &
\#
x043D;&
\#
x043E;&
\#
x0432;&
\#
x0438;&
\#
x0439; &
\#
x0440;&
\#
x044F;&
\#
x0434;&
\#
x043E;&
\#
x043A;
...
...
@@ -41,14 +41,14 @@ helpDisconnect=&\#x0412;&\#x0456;&\#x0434;'&\#x0454;&\#x0434;&\#x043D;&\#x0443;&
helpDisplayThis
=
&
\#
x041F;&
\#
x043E;&
\#
x043A;&
\#
x0430;&
\#
x0437;&
\#
x0443;&
\#
x0454; &
\#
x0446;&
\#
x044E; &
\#
x0441;&
\#
x0442;&
\#
x043E;&
\#
x0440;&
\#
x0456;&
\#
x043D;&
\#
x043A;&
\#
x0443; &
\#
x0434;&
\#
x043E;&
\#
x043F;&
\#
x043E;&
\#
x043C;&
\#
x043E;&
\#
x0433;&
\#
x0438;
helpDropTable
=
&
\#
x0412;&
\#
x0438;&
\#
x0434;&
\#
x0430;&
\#
x043B;&
\#
x0438;&
\#
x0442;&
\#
x0438; &
\#
x0442;&
\#
x0430;&
\#
x0431;&
\#
x043B;&
\#
x0438;&
\#
x0446;&
\#
x044E;, &
\#
x044F;&
\#
x043A;&
\#
x0449;&
\#
x043E; &
\#
x0432;&
\#
x043E;&
\#
x043D;&
\#
x0430; &
\#
x0456;&
\#
x0441;&
\#
x043D;&
\#
x0443;&
\#
x0454;
helpExecuteCurrent
=
&
\#
x0412;&
\#
x0438;&
\#
x043A;&
\#
x043E;&
\#
x043D;&
\#
x0443;&
\#
x0454; &
\#
x043F;&
\#
x043E;&
\#
x0442;&
\#
x043E;&
\#
x0447;&
\#
x043D;&
\#
x0438;&
\#
x0439; SQL &
\#
x0437;&
\#
x0430;&
\#
x043F;&
\#
x0438;&
\#
x0442;
helpIcon
=
&
\#
x04
6
;&
\#
x043A;&
\#
x043E;&
\#
x043D;&
\#
x043A;&
\#
x0430;
helpIcon
=
&
\#
x04
9
;&
\#
x043A;&
\#
x043E;&
\#
x043D;&
\#
x043A;&
\#
x0430;
helpImportantCommands
=
&
\#
x0412;&
\#
x0430;&
\#
x0436;&
\#
x043B;&
\#
x0438;&
\#
x0432;&
\#
x0456; &
\#
x043A;&
\#
x043E;&
\#
x043C;&
\#
x0430;&
\#
x043D;&
\#
x0434;&
\#
x0438;
helpOperations
=
&
\#
x041E;&
\#
x043F;&
\#
x0435;&
\#
x0440;&
\#
x0430;&
\#
x0446;&
\#
x0456;&
\#
x0457;
helpQuery
=
&
\#
x0417;&
\#
x0430;&
\#
x043F;&
\#
x0438;&
\#
x0442; &
\#
x0434;&
\#
x043E; &
\#
x0442;&
\#
x0430;&
\#
x0431;&
\#
x043B;&
\#
x0438;&
\#
x0446;&
\#
x0456;
helpSampleSQL
=
&
\#
x041F;&
\#
x0440;&
\#
x0438;&
\#
x043A;&
\#
x043B;&
\#
x0430;&
\#
x0434; SQL &
\#
x0437;&
\#
x0430;&
\#
x043F;&
\#
x0438;&
\#
x0442;&
\#
x0443;
helpStatements
=
SQL &
\#
x0437;&
\#
x0430;&
\#
x043F;&
\#
x0438;&
\#
x0442;&
\#
x0438;
helpUpdate
=
&
\#
x0417;&
\#
x043C;&
\#
x0456;&
\#
x043D;&
\#
x0438;&
\#
x0442;&
\#
x0438; &
\#
x0434;&
\#
x0430;&
\#
x043D;&
\#
x0456; &
\#
x0432; &
\#
x0440;&
\#
x044F;&
\#
x0434;&
\#
x043A;&
\#
x0443;
helpWithColumnsIdName
=
&
\#
x0437;
ID &
\#
x0456; NAME &
\#
x043A;&
\#
x043E;&
\#
x043B;&
\#
x043E;&
\#
x043D;&
\#
x043A;&
\#
x0430;&
\#
x043C;&
\#
x0438;
helpWithColumnsIdName
=
&
\#
x0437;
&
\#
x043A;&
\#
x043E;&
\#
x043B;&
\#
x043E;&
\#
x043D;&
\#
x043A;&
\#
x0430;&
\#
x043C;&
\#
x0438; ID &
\#
x0456; NAME
login.connect
=
&
\#
x041F;&
\#
x0456;&
\#
x0434;'&
\#
x0454;&
\#
x0434;&
\#
x043D;&
\#
x0430;&
\#
x0442;&
\#
x0438;&
\#
x0441;&
\#
x044C;
login.driverClass
=
Driver Class
login.driverNotFound
=
&
\#
x0414;&
\#
x0440;&
\#
x0430;&
\#
x0432;&
\#
x0435;&
\#
x0440; &
\#
x0431;&
\#
x0430;&
\#
x0437;&
\#
x0438; &
\#
x0434;&
\#
x0430;&
\#
x043D;&
\#
x0438;&
\#
x0445; &
\#
x043D;&
\#
x0435; &
\#
x0437;&
\#
x043D;&
\#
x0430;&
\#
x0439;&
\#
x0434;&
\#
x0435;&
\#
x043D;&
\#
x043E;<br />&
\#
x041F;&
\#
x043E;&
\#
x0434;&
\#
x0438;&
\#
x0432;&
\#
x0456;&
\#
x0442;&
\#
x044C;&
\#
x0441;&
\#
x044F; &
\#
x0432; &
\#
x0434;&
\#
x043E;&
\#
x043F;&
\#
x043E;&
\#
x043C;&
\#
x043E;&
\#
x0437;&
\#
x0456; &
\#
x044F;&
\#
x043A; &
\#
x0434;&
\#
x043E;&
\#
x0434;&
\#
x0430;&
\#
x0442;&
\#
x0438; &
\#
x043D;&
\#
x043E;&
\#
x0432;&
\#
x0456; &
\#
x0434;&
\#
x0440;&
\#
x0430;&
\#
x0439;&
\#
x0432;&
\#
x0435;&
\#
x0440;&
\#
x0438;
...
...
@@ -59,7 +59,7 @@ login.login=&\#x041B;&\#x043E;&\#x0433;&\#x0456;&\#x043D;
login.remove
=
&
\#
x0412;&
\#
x0438;&
\#
x0434;&
\#
x0430;&
\#
x043B;&
\#
x0438;&
\#
x0442;&
\#
x0438;
login.save
=
&
\#
x0417;&
\#
x0431;&
\#
x0435;&
\#
x0440;&
\#
x0435;&
\#
x0433;&
\#
x0442;&
\#
x0438;
login.savedSetting
=
&
\#
x0417;&
\#
x0431;&
\#
x0435;&
\#
x0440;&
\#
x0435;&
\#
x0436;&
\#
x0435;&
\#
x043D;&
\#
x0456; &
\#
x043D;&
\#
x0430;&
\#
x043B;&
\#
x0430;&
\#
x0448;&
\#
x0442;&
\#
x0443;&
\#
x0432;&
\#
x0430;&
\#
x043D;&
\#
x043D;&
\#
x044F;
login.settingName
=
&
\#
x04
6
;&
\#
x043C;'&
\#
x044F; &
\#
x043D;&
\#
x0430;&
\#
x043B;&
\#
x0430;&
\#
x0448;&
\#
x0442;&
\#
x0443;&
\#
x0432;&
\#
x0430;&
\#
x043D;&
\#
x043D;&
\#
x044F;
login.settingName
=
&
\#
x04
9
;&
\#
x043C;'&
\#
x044F; &
\#
x043D;&
\#
x0430;&
\#
x043B;&
\#
x0430;&
\#
x0448;&
\#
x0442;&
\#
x0443;&
\#
x0432;&
\#
x0430;&
\#
x043D;&
\#
x043D;&
\#
x044F;
login.testConnection
=
&
\#
x0422;&
\#
x0435;&
\#
x0441;&
\#
x0442;&
\#
x043E;&
\#
x0432;&
\#
x0435; &
\#
x043F;&
\#
x0456;&
\#
x0434;'&
\#
x0454;&
\#
x0434;&
\#
x043D;&
\#
x0430;&
\#
x043D;&
\#
x043D;&
\#
x044F;
login.testSuccessful
=
&
\#
x0422;&
\#
x0435;&
\#
x0441;&
\#
x0442; &
\#
x043F;&
\#
x0440;&
\#
x043E;&
\#
x0439;&
\#
x0434;&
\#
x0435;&
\#
x043D;&
\#
x043E; &
\#
x0443;&
\#
x0441;&
\#
x043F;&
\#
x0456;&
\#
x0448;&
\#
x043D;&
\#
x043E;
login.welcome
=
&
\#
x041A;&
\#
x043E;&
\#
x043D;&
\#
x0441;&
\#
x043E;&
\#
x043B;&
\#
x044C; H2
...
...
@@ -88,7 +88,7 @@ toolbar.cancelStatement=&\#x0412;&\#x0456;&\#x0434;&\#x043C;&\#x0456;&\#x043D;&\
toolbar.clear
=
&
\#
x041E;&
\#
x0447;&
\#
x0438;&
\#
x0441;&
\#
x0442;&
\#
x0438;&
\#
x0442;&
\#
x0438;
toolbar.commit
=
&
\#
x041F;&
\#
x0456;&
\#
x0434;&
\#
x0442;&
\#
x0432;&
\#
x0435;&
\#
x0440;&
\#
x0434;&
\#
x0438;&
\#
x0442;&
\#
x0438; &
\#
x0437;&
\#
x043C;&
\#
x0456;&
\#
x043D;&
\#
x0438;
toolbar.disconnect
=
&
\#
x0412;&
\#
x0456;&
\#
x0434;'&
\#
x0454;&
\#
x0434;&
\#
x043D;&
\#
x0430;&
\#
x0442;&
\#
x0438;&
\#
x0441;&
\#
x044C;
toolbar.history
=
&
\#
x04
6
;&
\#
x0441;&
\#
x0442;&
\#
x043E;&
\#
x0440;&
\#
x0456;&
\#
x044F; &
\#
x043A;&
\#
x043E;&
\#
x043C;&
\#
x0430;&
\#
x043D;&
\#
x0434;
toolbar.history
=
&
\#
x04
9
;&
\#
x0441;&
\#
x0442;&
\#
x043E;&
\#
x0440;&
\#
x0456;&
\#
x044F; &
\#
x043A;&
\#
x043E;&
\#
x043C;&
\#
x0430;&
\#
x043D;&
\#
x0434;
toolbar.maxRows
=
&
\#
x041C;&
\#
x0430;&
\#
x043A;&
\#
x0441;&
\#
x0438;&
\#
x043C;&
\#
x0430;&
\#
x043B;&
\#
x044C;&
\#
x043D;&
\#
x0430; &
\#
x043A;&
\#
x0456;&
\#
x043B;&
\#
x044C;&
\#
x043A;&
\#
x0456;&
\#
x0441;&
\#
x0442;&
\#
x044C; &
\#
x0440;&
\#
x044F;&
\#
x0434;&
\#
x043A;&
\#
x0456;&
\#
x0432;
toolbar.refresh
=
&
\#
x041E;&
\#
x043D;&
\#
x043E;&
\#
x0432;&
\#
x0438;&
\#
x0442;&
\#
x0438;
toolbar.rollback
=
&
\#
x0412;&
\#
x0435;&
\#
x0440;&
\#
x043D;&
\#
x0443;&
\#
x0442;&
\#
x0438; &
\#
x043D;&
\#
x0430;&
\#
x0437;&
\#
x0430;&
\#
x0434;
...
...
@@ -98,7 +98,7 @@ tree.admin=&\#x0410;&\#x0434;&\#x043C;&\#x0456;&\#x043D;
tree.current
=
&
\#
x041F;&
\#
x043E;&
\#
x0442;&
\#
x043E;&
\#
x0447;&
\#
x043D;&
\#
x0435; &
\#
x0437;&
\#
x043D;&
\#
x0430;&
\#
x0447;&
\#
x0435;&
\#
x043D;&
\#
x043D;&
\#
x044F;
tree.hashed
=
&
\#
x0425;&
\#
x0435;&
\#
x0448;&
\#
x043E;&
\#
x0432;&
\#
x0430;&
\#
x043D;&
\#
x0438;&
\#
x0439;
tree.increment
=
&
\#
x0417;&
\#
x0431;&
\#
x0456;&
\#
x043B;&
\#
x044C;&
\#
x0448;&
\#
x0438;&
\#
x0442;&
\#
x0438;
tree.indexes
=
&
\#
x04
6
;&
\#
x043D;&
\#
x0434;&
\#
x0435;&
\#
x043A;&
\#
x0441;&
\#
x0438;
tree.indexes
=
&
\#
x04
9
;&
\#
x043D;&
\#
x0434;&
\#
x0435;&
\#
x043A;&
\#
x0441;&
\#
x0438;
tree.nonUnique
=
&
\#
x041D;&
\#
x0435;&
\#
x0443;&
\#
x043D;&
\#
x0456;&
\#
x043A;&
\#
x0430;&
\#
x043B;&
\#
x044C;&
\#
x043D;&
\#
x0435;
tree.sequences
=
&
\#
x041F;&
\#
x043E;&
\#
x0441;&
\#
x043B;&
\#
x0456;&
\#
x0434;&
\#
x043E;&
\#
x0432;&
\#
x043D;&
\#
x043E;&
\#
x0441;&
\#
x0442;&
\#
x0456;
tree.unique
=
&
\#
x0423;&
\#
x043D;&
\#
x0456;&
\#
x043A;&
\#
x0430;&
\#
x043B;&
\#
x044C;&
\#
x043D;&
\#
x0435;
...
...
h2/src/main/org/h2/util/NetUtils.java
浏览文件 @
3ab5f276
...
...
@@ -75,7 +75,7 @@ public class NetUtils {
}
synchronized
(
NetUtils
.
class
)
{
if
(
bindAddress
==
null
)
{
bindAddress
=
InetAddress
.
getBy
Name
(
host
);
bindAddress
=
InetAddress
.
getBy
Address
(
InetAddress
.
getByName
(
host
).
getAddress
()
);
}
}
return
bindAddress
;
...
...
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
3ab5f276
...
...
@@ -150,29 +150,25 @@ java org.h2.test.TestAll timer
/*
h2CallableStatementBatchTest.zip
h2-2007-12-27_test.zip
Roadmap:
History:
Roadmap:
Automatically switch source code before compiling
staging.trace.db.gz
There is a problem with the h2.bindAddress build. When it is binding to 127.0.0.1,
the bind function works perfectly and I could confirm it no longer
listen to the ports of other IP addresses. However, when it is binding to normal IP
addresses, it always got the following exception.
Caused by: org.h2.jdbc.JdbcSQLException: Connection is broken [90067-64]
at org.h2.message.Message.getSQLException(Message.java:89)
Remarks: I build with JDK 1.6
drop table logs;
CREATE TABLE Logs(id INT PRIMARY KEY, procid INT);
CREATE unique INDEX procIdx ON Logs(procid, id);
@LOOP 1000 INSERT INTO Logs VALUES(?, MOD(?, 100000));
ANALYZE SAMPLE_SIZE 0;
script nodata;
EXPLAIN SELECT id FROM Logs WHERE procid=2 AND id<100;
Test Recovery with MAX_LOG_FILE_SIZE=1; test with various log file sizes
allow queries as well in batch updates
CALL syntax should probably work for regular executeUpdate as well.
http://java.sun.com/j2se/1.4.2/docs/guide/jdbc/getstart/callablestatement.html#1000220
Test H2 on OS X (result are here: h2-2007-12-27_test.zip)
write to the db file what version was used to create a database
Docs:
H2 can emulate PostgreSQL server.
Web site:
link to history page, bug page
...
...
h2/src/test/org/h2/test/db/TestOptimizations.java
浏览文件 @
3ab5f276
...
...
@@ -24,6 +24,7 @@ public class TestOptimizations extends TestBase {
if
(
config
.
networked
)
{
return
;
}
testMultiColumnRangeQuery
();
testDistinctOptimization
();
testQueryCacheTimestamp
();
testQueryCacheSpeed
();
...
...
@@ -34,6 +35,22 @@ public class TestOptimizations extends TestBase {
testMinMaxCountOptimization
(
false
);
}
private
void
testMultiColumnRangeQuery
()
throws
Exception
{
deleteDb
(
"optimizations"
);
Connection
conn
=
getConnection
(
"optimizations"
);
Statement
stat
=
conn
.
createStatement
();
stat
.
execute
(
"CREATE TABLE Logs(id INT PRIMARY KEY, type INT)"
);
stat
.
execute
(
"CREATE unique INDEX type_index ON Logs(type, id)"
);
stat
.
execute
(
"INSERT INTO Logs SELECT X, MOD(X, 3) FROM SYSTEM_RANGE(1, 1000)"
);
stat
.
execute
(
"ANALYZE SAMPLE_SIZE 0"
);
ResultSet
rs
;
rs
=
stat
.
executeQuery
(
"EXPLAIN SELECT id FROM Logs WHERE id < 100 and type=2 AND id<100"
);
rs
.
next
();
String
plan
=
rs
.
getString
(
1
);
check
(
plan
.
indexOf
(
"TYPE_INDEX"
)
>
0
);
conn
.
close
();
}
private
void
testDistinctOptimization
()
throws
Exception
{
deleteDb
(
"optimizations"
);
Connection
conn
=
getConnection
(
"optimizations"
);
...
...
h2/src/test/org/h2/test/jdbc/TestBatchUpdates.java
浏览文件 @
3ab5f276
...
...
@@ -7,6 +7,7 @@ package org.h2.test.jdbc;
import
java.io.ByteArrayOutputStream
;
import
java.io.PrintStream
;
import
java.sql.BatchUpdateException
;
import
java.sql.CallableStatement
;
import
java.sql.Connection
;
import
java.sql.DatabaseMetaData
;
import
java.sql.PreparedStatement
;
...
...
@@ -38,10 +39,36 @@ public class TestBatchUpdates extends TestBase {
PreparedStatement
prep
;
public
void
test
()
throws
Exception
{
testExecuteCall
();
testException
();
testCoffee
();
}
private
void
testExecuteCall
()
throws
Exception
{
deleteDb
(
"batchUpdates"
);
Connection
conn
=
getConnection
(
"batchUpdates"
);
Statement
stat
=
conn
.
createStatement
();
stat
.
execute
(
"CREATE ALIAS updatePrices FOR \""
+
getClass
().
getName
()
+
".updatePrices\""
);
CallableStatement
call
=
conn
.
prepareCall
(
"{call updatePrices(?, ?)}"
);
call
.
setString
(
1
,
"Hello"
);
call
.
setFloat
(
2
,
1.4f
);
call
.
addBatch
();
call
.
setString
(
1
,
"World"
);
call
.
setFloat
(
2
,
3.2f
);
call
.
addBatch
();
int
[]
updateCounts
=
call
.
executeBatch
();
int
total
=
0
;
for
(
int
i
=
0
;
i
<
updateCounts
.
length
;
i
++)
{
total
+=
updateCounts
[
i
];
}
check
(
4
,
total
);
conn
.
close
();
}
public
static
int
updatePrices
(
String
s
,
double
f
)
{
return
(
int
)
f
;
}
private
void
testException
()
throws
Exception
{
deleteDb
(
"batchUpdates"
);
Connection
conn
=
getConnection
(
"batchUpdates"
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论