Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
fe62b1dc
提交
fe62b1dc
authored
9月 19, 2008
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
The H2 Console now abbreviates large texts in results.
上级
c3fc6e3e
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
33 行增加
和
21 行删除
+33
-21
changelog.html
h2/src/docsrc/html/changelog.html
+2
-1
SysProperties.java
h2/src/main/org/h2/constant/SysProperties.java
+9
-3
WebThread.java
h2/src/main/org/h2/server/web/WebThread.java
+21
-14
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+1
-3
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
fe62b1dc
...
@@ -18,7 +18,8 @@ Change Log
...
@@ -18,7 +18,8 @@ Change Log
<h1>
Change Log
</h1>
<h1>
Change Log
</h1>
<h2>
Next Version (unreleased)
</h2>
<h2>
Next Version (unreleased)
</h2>
<ul><li>
Multiple UNION queries could not be used in derived tables.
<ul><li>
The H2 Console now abbreviates large texts in results.
</li><li>
Multiple UNION queries could not be used in derived tables.
</li><li>
Linked tables can now be read-only.
</li><li>
Linked tables can now be read-only.
</li><li>
Temporary linked tables are now supported.
</li><li>
Temporary linked tables are now supported.
</li><li>
The optimization for IN(...) is now enabled by default. Use -Dh2.optimizeInJoin=false to disable it.
</li><li>
The optimization for IN(...) is now enabled by default. Use -Dh2.optimizeInJoin=false to disable it.
...
...
h2/src/main/org/h2/constant/SysProperties.java
浏览文件 @
fe62b1dc
...
@@ -210,6 +210,12 @@ public class SysProperties {
...
@@ -210,6 +210,12 @@ public class SysProperties {
*/
*/
public
static
final
int
EMERGENCY_SPACE_MIN
=
getIntSetting
(
"h2.emergencySpaceMin"
,
64
*
1024
);
public
static
final
int
EMERGENCY_SPACE_MIN
=
getIntSetting
(
"h2.emergencySpaceMin"
,
64
*
1024
);
/**
* System property <code>h2.largeResultBufferSize</code> (default: 4096).<br />
* Buffer size for large result sets. Set this value to 0 to disable the buffer.
*/
public
static
final
int
LARGE_RESULT_BUFFER_SIZE
=
getIntSetting
(
"h2.largeResultBufferSize"
,
4
*
1024
);
/**
/**
* System property <code>h2.lobCloseBetweenReads</code> (default: false).<br />
* System property <code>h2.lobCloseBetweenReads</code> (default: false).<br />
* Close LOB files between read operations.
* Close LOB files between read operations.
...
@@ -463,10 +469,10 @@ public class SysProperties {
...
@@ -463,10 +469,10 @@ public class SysProperties {
public
static
final
boolean
TRACE_IO
=
getBooleanSetting
(
"h2.traceIO"
,
false
);
public
static
final
boolean
TRACE_IO
=
getBooleanSetting
(
"h2.traceIO"
,
false
);
/**
/**
* System property <code>h2.
largeResultBufferSize</code> (default: 4096
).<br />
* System property <code>h2.
webMaxValueLength</code> (default: 10000
).<br />
*
Buffer size for large result sets. Set this value to 0 to disable the buffer
.
*
The H2 Console will abbreviate result values larger than this size
.
*/
*/
public
static
final
int
LARGE_RESULT_BUFFER_SIZE
=
getIntSetting
(
"h2.largeResultBufferSize"
,
4
*
1024
);
public
static
final
int
WEB_MAX_VALUE_LENGTH
=
getIntSetting
(
"h2.webMaxValueLength"
,
10000
);
/**
/**
* System property <code>h2.collatorCacheSize</code> (default: 10000).<br />
* System property <code>h2.collatorCacheSize</code> (default: 10000).<br />
...
...
h2/src/main/org/h2/server/web/WebThread.java
浏览文件 @
fe62b1dc
...
@@ -48,6 +48,7 @@ import java.util.Map.Entry;
...
@@ -48,6 +48,7 @@ import java.util.Map.Entry;
import
org.h2.api.DatabaseEventListener
;
import
org.h2.api.DatabaseEventListener
;
import
org.h2.bnf.Bnf
;
import
org.h2.bnf.Bnf
;
import
org.h2.constant.ErrorCode
;
import
org.h2.constant.ErrorCode
;
import
org.h2.constant.SysProperties
;
import
org.h2.engine.Constants
;
import
org.h2.engine.Constants
;
import
org.h2.jdbc.JdbcSQLException
;
import
org.h2.jdbc.JdbcSQLException
;
import
org.h2.message.Message
;
import
org.h2.message.Message
;
...
@@ -1373,7 +1374,7 @@ class WebThread extends Thread implements DatabaseEventListener {
...
@@ -1373,7 +1374,7 @@ class WebThread extends Thread implements DatabaseEventListener {
}
}
for
(
int
i
=
0
;
i
<
rs
.
getMetaData
().
getColumnCount
();
i
++)
{
for
(
int
i
=
0
;
i
<
rs
.
getMetaData
().
getColumnCount
();
i
++)
{
String
x
=
attributes
.
getProperty
(
"r"
+
row
+
"c"
+
(
i
+
1
));
String
x
=
attributes
.
getProperty
(
"r"
+
row
+
"c"
+
(
i
+
1
));
rs
.
updateString
(
i
+
1
,
unescapeData
(
x
)
);
unescapeData
(
x
,
rs
,
i
+
1
);
}
}
if
(
insert
)
{
if
(
insert
)
{
rs
.
insertRow
();
rs
.
insertRow
();
...
@@ -1950,7 +1951,7 @@ class WebThread extends Thread implements DatabaseEventListener {
...
@@ -1950,7 +1951,7 @@ class WebThread extends Thread implements DatabaseEventListener {
buff
.
append
(
PageParser
.
escapeHtml
(
meta
.
getColumnLabel
(
i
+
1
)));
buff
.
append
(
PageParser
.
escapeHtml
(
meta
.
getColumnLabel
(
i
+
1
)));
buff
.
append
(
"</td>"
);
buff
.
append
(
"</td>"
);
buff
.
append
(
"<td>"
);
buff
.
append
(
"<td>"
);
buff
.
append
(
escapeData
(
rs
.
getString
(
i
+
1
)
));
buff
.
append
(
escapeData
(
rs
,
i
+
1
));
buff
.
append
(
"</td></tr>"
);
buff
.
append
(
"</td></tr>"
);
}
}
}
}
...
@@ -1986,7 +1987,7 @@ class WebThread extends Thread implements DatabaseEventListener {
...
@@ -1986,7 +1987,7 @@ class WebThread extends Thread implements DatabaseEventListener {
}
}
for
(
int
i
=
0
;
i
<
columns
;
i
++)
{
for
(
int
i
=
0
;
i
<
columns
;
i
++)
{
buff
.
append
(
"<td>"
);
buff
.
append
(
"<td>"
);
buff
.
append
(
escapeData
(
rs
.
getString
(
i
+
1
)
));
buff
.
append
(
escapeData
(
rs
,
i
+
1
));
buff
.
append
(
"</td>"
);
buff
.
append
(
"</td>"
);
}
}
buff
.
append
(
"</tr>"
);
buff
.
append
(
"</tr>"
);
...
@@ -2059,24 +2060,30 @@ class WebThread extends Thread implements DatabaseEventListener {
...
@@ -2059,24 +2060,30 @@ class WebThread extends Thread implements DatabaseEventListener {
return
"index.do"
;
return
"index.do"
;
}
}
private
String
escapeData
(
String
d
)
{
private
String
escapeData
(
ResultSet
rs
,
int
columnIndex
)
throws
SQLException
{
String
d
=
rs
.
getString
(
columnIndex
);
if
(
d
==
null
)
{
if
(
d
==
null
)
{
return
"<i>null</i>"
;
return
"<i>null</i>"
;
}
else
if
(
d
.
startsWith
(
"null"
))
{
}
else
if
(
d
.
length
()
>
SysProperties
.
WEB_MAX_VALUE_LENGTH
)
{
return
"<div style='display: none'>=</div>"
+
PageParser
.
escapeHtml
(
d
);
return
"<div style='display: none'>=+</div>"
+
PageParser
.
escapeHtml
(
d
.
substring
(
0
,
100
)
+
"... ("
+
d
.
length
()
+
")"
);
}
else
if
(
d
.
equals
(
"null"
)
||
d
.
startsWith
(
"= "
)
||
d
.
startsWith
(
"=+"
))
{
return
"<div style='display: none'>= </div>"
+
PageParser
.
escapeHtml
(
d
);
}
}
return
PageParser
.
escapeHtml
(
d
);
return
PageParser
.
escapeHtml
(
d
);
}
}
private
String
unescapeData
(
String
d
)
{
private
void
unescapeData
(
String
d
,
ResultSet
rs
,
int
columnIndex
)
throws
SQLException
{
if
(
d
.
endsWith
(
"null"
))
{
if
(
d
.
equals
(
"null"
))
{
if
(
d
.
equals
(
"null"
))
{
rs
.
updateNull
(
columnIndex
);
return
null
;
}
else
if
(
d
.
startsWith
(
"=+"
))
{
}
else
if
(
d
.
startsWith
(
"="
))
{
// don't update
return
d
.
substring
(
1
);
}
else
if
(
d
.
startsWith
(
"= "
))
{
}
d
=
d
.
substring
(
2
);
rs
.
updateString
(
columnIndex
,
d
);
}
else
{
rs
.
updateString
(
columnIndex
,
d
);
}
}
return
d
;
}
}
private
String
settingRemove
()
{
private
String
settingRemove
()
{
...
...
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
fe62b1dc
...
@@ -275,9 +275,7 @@ java org.h2.test.TestAll timer
...
@@ -275,9 +275,7 @@ java org.h2.test.TestAll timer
main methods for the tests and make that work
main methods for the tests and make that work
H2 Console: don't display very large blobs; instead show first view bytes and length
TestMVCC:
MVCC:
Concurrent update in table test: another transaction has updated or
Concurrent update in table test: another transaction has updated or
deleted the same row when exactly does it occur in other databases
deleted the same row when exactly does it occur in other databases
(PostgreSQL, Oracle)?
(PostgreSQL, Oracle)?
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论