Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
84e4616a
提交
84e4616a
authored
5月 07, 2010
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
The page size for new databases can now be set in the database URL using ;PAGE_SIZE=512.
上级
36c69f54
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
11 行增加
和
2 行删除
+11
-2
ConnectionInfo.java
h2/src/main/org/h2/engine/ConnectionInfo.java
+1
-1
Database.java
h2/src/main/org/h2/engine/Database.java
+10
-1
没有找到文件。
h2/src/main/org/h2/engine/ConnectionInfo.java
浏览文件 @
84e4616a
...
@@ -79,7 +79,7 @@ public class ConnectionInfo implements Cloneable {
...
@@ -79,7 +79,7 @@ public class ConnectionInfo implements Cloneable {
String
[]
connectionTime
=
{
"ACCESS_MODE_DATA"
,
"AUTOCOMMIT"
,
"CIPHER"
,
String
[]
connectionTime
=
{
"ACCESS_MODE_DATA"
,
"AUTOCOMMIT"
,
"CIPHER"
,
"CREATE"
,
"CACHE_TYPE"
,
"DB_CLOSE_ON_EXIT"
,
"FILE_LOCK"
,
"IGNORE_UNKNOWN_SETTINGS"
,
"IFEXISTS"
,
"CREATE"
,
"CACHE_TYPE"
,
"DB_CLOSE_ON_EXIT"
,
"FILE_LOCK"
,
"IGNORE_UNKNOWN_SETTINGS"
,
"IFEXISTS"
,
"INIT"
,
"PASSWORD"
,
"RECOVER"
,
"USER"
,
"AUTO_SERVER"
,
"INIT"
,
"PASSWORD"
,
"RECOVER"
,
"USER"
,
"AUTO_SERVER"
,
"AUTO_RECONNECT"
,
"OPEN_NEW"
};
"AUTO_RECONNECT"
,
"OPEN_NEW"
,
"PAGE_SIZE"
};
for
(
String
key
:
connectionTime
)
{
for
(
String
key
:
connectionTime
)
{
if
(
SysProperties
.
CHECK
&&
set
.
contains
(
key
))
{
if
(
SysProperties
.
CHECK
&&
set
.
contains
(
key
))
{
DbException
.
throwInternalError
(
key
);
DbException
.
throwInternalError
(
key
);
...
...
h2/src/main/org/h2/engine/Database.java
浏览文件 @
84e4616a
...
@@ -165,8 +165,10 @@ public class Database implements DataHandler {
...
@@ -165,8 +165,10 @@ public class Database implements DataHandler {
private
volatile
boolean
metaTablesInitialized
;
private
volatile
boolean
metaTablesInitialized
;
private
boolean
flushOnEachCommit
;
private
boolean
flushOnEachCommit
;
private
LobStorage
lobStorage
;
private
LobStorage
lobStorage
;
private
int
pageSize
=
SysProperties
.
PAGE_SIZE
;
public
Database
(
String
name
,
ConnectionInfo
ci
,
String
cipher
)
{
public
Database
(
ConnectionInfo
ci
,
String
cipher
)
{
String
name
=
ci
.
getName
();
this
.
compareMode
=
CompareMode
.
getInstance
(
null
,
0
);
this
.
compareMode
=
CompareMode
.
getInstance
(
null
,
0
);
this
.
persistent
=
ci
.
isPersistent
();
this
.
persistent
=
ci
.
isPersistent
();
this
.
filePasswordHash
=
ci
.
getFilePasswordHash
();
this
.
filePasswordHash
=
ci
.
getFilePasswordHash
();
...
@@ -179,6 +181,7 @@ public class Database implements DataHandler {
...
@@ -179,6 +181,7 @@ public class Database implements DataHandler {
this
.
accessModeData
=
ci
.
getProperty
(
"ACCESS_MODE_DATA"
,
"rw"
).
toLowerCase
();
this
.
accessModeData
=
ci
.
getProperty
(
"ACCESS_MODE_DATA"
,
"rw"
).
toLowerCase
();
this
.
autoServerMode
=
ci
.
getProperty
(
"AUTO_SERVER"
,
false
);
this
.
autoServerMode
=
ci
.
getProperty
(
"AUTO_SERVER"
,
false
);
this
.
cacheSize
=
ci
.
getProperty
(
"CACHE_SIZE"
,
SysProperties
.
CACHE_SIZE_DEFAULT
);
this
.
cacheSize
=
ci
.
getProperty
(
"CACHE_SIZE"
,
SysProperties
.
CACHE_SIZE_DEFAULT
);
this
.
pageSize
=
ci
.
getProperty
(
"PAGE_SIZE"
,
SysProperties
.
PAGE_SIZE
);
if
(
"r"
.
equals
(
accessModeData
))
{
if
(
"r"
.
equals
(
accessModeData
))
{
readOnly
=
true
;
readOnly
=
true
;
}
}
...
@@ -1922,6 +1925,9 @@ public class Database implements DataHandler {
...
@@ -1922,6 +1925,9 @@ public class Database implements DataHandler {
if
(
eventListener
!=
null
)
{
if
(
eventListener
!=
null
)
{
eventListener
.
opened
();
eventListener
.
opened
();
}
}
if
(
writer
!=
null
)
{
writer
.
startThread
();
}
}
}
public
void
setMode
(
Mode
mode
)
{
public
void
setMode
(
Mode
mode
)
{
...
@@ -2026,6 +2032,9 @@ public class Database implements DataHandler {
...
@@ -2026,6 +2032,9 @@ public class Database implements DataHandler {
public
PageStore
getPageStore
()
{
public
PageStore
getPageStore
()
{
if
(
pageStore
==
null
)
{
if
(
pageStore
==
null
)
{
pageStore
=
new
PageStore
(
this
,
databaseName
+
Constants
.
SUFFIX_PAGE_FILE
,
accessModeData
,
cacheSize
);
pageStore
=
new
PageStore
(
this
,
databaseName
+
Constants
.
SUFFIX_PAGE_FILE
,
accessModeData
,
cacheSize
);
if
(
pageSize
!=
SysProperties
.
PAGE_SIZE
)
{
pageStore
.
setPageSize
(
pageSize
);
}
pageStore
.
open
();
pageStore
.
open
();
}
}
return
pageStore
;
return
pageStore
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论