Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
04b85386
Unverified
提交
04b85386
authored
8月 18, 2018
作者:
Evgenij Ryazanov
提交者:
GitHub
8月 18, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1386 from katzyn/misc
DISK_SPACE_USED() for MVStore and other minor changes
上级
1393df91
6f0b906b
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
74 行增加
和
7 行删除
+74
-7
changelog.html
h2/src/docsrc/html/changelog.html
+38
-0
Analyze.java
h2/src/main/org/h2/command/ddl/Analyze.java
+1
-1
Session.java
h2/src/main/org/h2/engine/Session.java
+1
-1
Page.java
h2/src/main/org/h2/mvstore/Page.java
+29
-1
MVPrimaryIndex.java
h2/src/main/org/h2/mvstore/db/MVPrimaryIndex.java
+1
-2
ColumnNamerConfiguration.java
h2/src/main/org/h2/util/ColumnNamerConfiguration.java
+3
-2
dictionary.txt
h2/src/tools/org/h2/build/doc/dictionary.txt
+1
-0
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
04b85386
...
@@ -21,6 +21,44 @@ Change Log
...
@@ -21,6 +21,44 @@ Change Log
<h2>
Next Version (unreleased)
</h2>
<h2>
Next Version (unreleased)
</h2>
<ul>
<ul>
<li>
PR #1386: DISK_SPACE_USED() for MVStore and other minor changes
</li>
<li>
PR #1385: split up the rather large convertTo method
</li>
<li>
PR #1384: Throw exception if unknown mode is specified in database URL
</li>
<li>
Issue #1365, PR #1382: Parse more date-time literals for compatibility with other databases
</li>
<li>
PR #1381: Minor fixes for INTERVAL data type
</li>
<li>
PR #1380: Improve documentation of intervals
</li>
<li>
Issue #1189: "Merge into using" parameters aren't found
</li>
<li>
Issue #1377: org.h2.api.Interval and TIME leftovers
</li>
<li>
PR #1376: TestMultiThreadedKernel is back
</li>
<li>
PR #1373: INTERVAL data type
</li>
<li>
Issue #1369: In MSSQL Server Mode generated UUID fields need NEWID() function
</li>
<li>
Issue #756: FunctionsMySql is not in the main jar
</li>
<li>
PR #1368: Parse BINARY VARYING, BINARY LARGE OBJECT, and CHARACTER LARGE OBJECT
</li>
<li>
PR #1367: Assorted changes with SELECT output limitation clauses
</li>
<li>
Issue #1363: Why H2 requires random own packages in OSGi bundle description?
</li>
<li>
Issue #1192: Add an Automatic-Module-Name
</li>
<li>
Issue #1361, PR #1362: Add limited support for MONEY and SMALLMONEY in compatibility modes
</li>
<li>
Issue #1327: mvn build misses some resources
</li>
<li>
PR #1359: Add system property to return OffsetDateTime from ResultSet.getObject()
</li>
<li>
PR #1357: Simplify execution flow in some places
<li>
PR #1357: Simplify execution flow in some places
</li>
</li>
<li>
PR #1356: Fix NPE in Query.initExpression()
<li>
PR #1356: Fix NPE in Query.initExpression()
...
...
h2/src/main/org/h2/command/ddl/Analyze.java
浏览文件 @
04b85386
...
@@ -115,7 +115,7 @@ public class Analyze extends DefineCommand {
...
@@ -115,7 +115,7 @@ public class Analyze extends DefineCommand {
}
}
buff
.
append
(
" FROM "
).
append
(
table
.
getSQL
());
buff
.
append
(
" FROM "
).
append
(
table
.
getSQL
());
if
(
sample
>
0
)
{
if
(
sample
>
0
)
{
buff
.
append
(
" FETCH
NEX
T ROW ONLY SAMPLE_SIZE ? "
);
buff
.
append
(
" FETCH
FIRS
T ROW ONLY SAMPLE_SIZE ? "
);
}
}
String
sql
=
buff
.
toString
();
String
sql
=
buff
.
toString
();
Prepared
command
=
session
.
prepare
(
sql
);
Prepared
command
=
session
.
prepare
(
sql
);
...
...
h2/src/main/org/h2/engine/Session.java
浏览文件 @
04b85386
...
@@ -877,7 +877,7 @@ public class Session extends SessionWithState implements TransactionStore.Rollba
...
@@ -877,7 +877,7 @@ public class Session extends SessionWithState implements TransactionStore.Rollba
removeTemporaryLobs
(
false
);
removeTemporaryLobs
(
false
);
cleanTempTables
(
true
);
cleanTempTables
(
true
);
commit
(
true
);
// temp table rem
p
val may have opened new transaction
commit
(
true
);
// temp table rem
o
val may have opened new transaction
if
(
undoLog
!=
null
)
{
if
(
undoLog
!=
null
)
{
undoLog
.
clear
();
undoLog
.
clear
();
}
}
...
...
h2/src/main/org/h2/mvstore/Page.java
浏览文件 @
04b85386
...
@@ -54,6 +54,11 @@ public abstract class Page implements Cloneable
...
@@ -54,6 +54,11 @@ public abstract class Page implements Cloneable
*/
*/
private
int
memory
;
private
int
memory
;
/**
* Amount of used disk space by this page only in persistent case.
*/
private
int
diskSpaceUsed
;
/**
/**
* The keys.
* The keys.
*/
*/
...
@@ -672,6 +677,7 @@ public abstract class Page implements Cloneable
...
@@ -672,6 +677,7 @@ public abstract class Page implements Cloneable
if
(
isLeaf
())
{
if
(
isLeaf
())
{
readPayLoad
(
buff
);
readPayLoad
(
buff
);
}
}
diskSpaceUsed
=
maxLength
;
recalculateMemory
();
recalculateMemory
();
}
}
...
@@ -748,7 +754,7 @@ public abstract class Page implements Cloneable
...
@@ -748,7 +754,7 @@ public abstract class Page implements Cloneable
// for a longer time
// for a longer time
store
.
cachePage
(
this
);
store
.
cachePage
(
this
);
}
}
long
max
=
DataUtils
.
getPageMaxLength
(
pos
);
int
max
=
DataUtils
.
getPageMaxLength
(
pos
);
chunk
.
maxLen
+=
max
;
chunk
.
maxLen
+=
max
;
chunk
.
maxLenLive
+=
max
;
chunk
.
maxLenLive
+=
max
;
chunk
.
pageCount
++;
chunk
.
pageCount
++;
...
@@ -759,6 +765,7 @@ public abstract class Page implements Cloneable
...
@@ -759,6 +765,7 @@ public abstract class Page implements Cloneable
// when the next chunk is stored
// when the next chunk is stored
map
.
removePage
(
pos
,
memory
);
map
.
removePage
(
pos
,
memory
);
}
}
diskSpaceUsed
=
max
!=
DataUtils
.
PAGE_LARGE
?
max
:
pageLength
;
return
typePos
+
1
;
return
typePos
+
1
;
}
}
...
@@ -805,6 +812,27 @@ public abstract class Page implements Cloneable
...
@@ -805,6 +812,27 @@ public abstract class Page implements Cloneable
return
0
;
return
0
;
}
}
/**
* Amount of used disk space in persistent case including child pages.
*
* @return amount of used disk space in persistent case
*/
public
long
getDiskSpaceUsed
()
{
long
r
=
0
;
if
(
isPersistent
())
{
r
+=
diskSpaceUsed
;
}
if
(!
isLeaf
())
{
for
(
int
i
=
0
;
i
<
getRawChildPageCount
();
i
++)
{
long
pos
=
getChildPagePos
(
i
);
if
(
pos
!=
0
)
{
r
+=
getChildPage
(
i
).
getDiskSpaceUsed
();
}
}
}
return
r
;
}
final
void
addMemory
(
int
mem
)
{
final
void
addMemory
(
int
mem
)
{
memory
+=
mem
;
memory
+=
mem
;
}
}
...
...
h2/src/main/org/h2/mvstore/db/MVPrimaryIndex.java
浏览文件 @
04b85386
...
@@ -358,8 +358,7 @@ public class MVPrimaryIndex extends BaseIndex {
...
@@ -358,8 +358,7 @@ public class MVPrimaryIndex extends BaseIndex {
@Override
@Override
public
long
getDiskSpaceUsed
()
{
public
long
getDiskSpaceUsed
()
{
// TODO estimate disk space usage
return
dataMap
.
map
.
getRootPage
().
getDiskSpaceUsed
();
return
0
;
}
}
public
String
getMapName
()
{
public
String
getMapName
()
{
...
...
h2/src/main/org/h2/util/ColumnNamerConfiguration.java
浏览文件 @
04b85386
...
@@ -195,7 +195,7 @@ public class ColumnNamerConfiguration {
...
@@ -195,7 +195,7 @@ public class ColumnNamerConfiguration {
break
;
break
;
case
PostgreSQL:
case
PostgreSQL:
//
this default can be changed to 128 by postgres config
//
https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html
setMaxIdentiferLength
(
63
);
setMaxIdentiferLength
(
63
);
setRegularExpressionMatchAllowed
(
"(?m)(?s)[A-Za-z0-9_\\$]+"
);
setRegularExpressionMatchAllowed
(
"(?m)(?s)[A-Za-z0-9_\\$]+"
);
setRegularExpressionMatchDisallowed
(
"(?m)(?s)[^A-Za-z0-9_\\$]"
);
setRegularExpressionMatchDisallowed
(
"(?m)(?s)[^A-Za-z0-9_\\$]"
);
...
@@ -204,7 +204,8 @@ public class ColumnNamerConfiguration {
...
@@ -204,7 +204,8 @@ public class ColumnNamerConfiguration {
break
;
break
;
case
MySQL:
case
MySQL:
// https://dev.mysql.com/doc/refman/5.7/en/identifiers.html
// https://dev.mysql.com/doc/refman/8.0/en/identifiers.html
// https://mariadb.com/kb/en/library/identifier-names/
setMaxIdentiferLength
(
64
);
setMaxIdentiferLength
(
64
);
setRegularExpressionMatchAllowed
(
"(?m)(?s)`?[A-Za-z0-9_`\\$]+`?"
);
setRegularExpressionMatchAllowed
(
"(?m)(?s)`?[A-Za-z0-9_`\\$]+`?"
);
setRegularExpressionMatchDisallowed
(
"(?m)(?s)[^A-Za-z0-9_`\\$]"
);
setRegularExpressionMatchDisallowed
(
"(?m)(?s)[^A-Za-z0-9_`\\$]"
);
...
...
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
04b85386
...
@@ -789,3 +789,4 @@ inconsistencies discover eliminated violates tweaks postpone leftovers
...
@@ -789,3 +789,4 @@ inconsistencies discover eliminated violates tweaks postpone leftovers
tied ties
tied ties
launched unavailable smallmoney erroneously multiplier newid pan streamline unmap preview unexpectedly presumably
launched unavailable smallmoney erroneously multiplier newid pan streamline unmap preview unexpectedly presumably
converging smth rng curs casts unmapping unmapper
converging smth rng curs casts unmapping unmapper
immediate hhmmss scheduled hhmm prematurely postponed arranges
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论