Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
56c1cf96
提交
56c1cf96
authored
4月 30, 2009
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
46464f46
全部展开
显示空白字符变更
内嵌
并排
正在显示
19 个修改的文件
包含
1393 行增加
和
1167 行删除
+1393
-1167
changelog.html
h2/src/docsrc/html/changelog.html
+3
-1
quickstart.html
h2/src/docsrc/html/quickstart.html
+1
-1
roadmap.html
h2/src/docsrc/html/roadmap.html
+8
-4
_docs_en.utf8.txt
h2/src/docsrc/text/_docs_en.utf8.txt
+377
-356
_docs_ja.utf8.txt
h2/src/docsrc/text/_docs_ja.utf8.txt
+377
-356
_docs_en.properties
h2/src/docsrc/textbase/_docs_en.properties
+363
-356
buildRelease.sh
h2/src/installer/buildRelease.sh
+2
-4
cheatSheet.html
h2/src/installer/cheatSheet.html
+175
-0
AlterTableAlterColumn.java
h2/src/main/org/h2/command/ddl/AlterTableAlterColumn.java
+2
-1
Set.java
h2/src/main/org/h2/command/dml/Set.java
+2
-1
Session.java
h2/src/main/org/h2/engine/Session.java
+10
-0
help.csv
h2/src/main/org/h2/res/help.csv
+19
-12
PageParser.java
h2/src/main/org/h2/server/web/PageParser.java
+2
-1
WebThread.java
h2/src/main/org/h2/server/web/WebThread.java
+7
-14
StringUtils.java
h2/src/main/org/h2/util/StringUtils.java
+0
-2
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+4
-55
todo.txt
h2/src/test/org/h2/test/todo/todo.txt
+37
-1
SpellChecker.java
h2/src/tools/org/h2/build/doc/SpellChecker.java
+2
-1
dictionary.txt
h2/src/tools/org/h2/build/doc/dictionary.txt
+2
-1
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
56c1cf96
...
...
@@ -18,7 +18,9 @@ Change Log
<h1>
Change Log
</h1>
<h2>
Next Version (unreleased)
</h2>
<ul><li>
Connection pool: the default login timeout is now 5 minutes.
<ul><li>
JdbcPreparedStatement.toString() could throw a NullPointerException.
</li><li>
EclipseLink: Added H2Platform.supportsIdentity().
</li><li>
Connection pool: the default login timeout is now 5 minutes.
</li><li>
After truncating tables, opening large databases could become slow
because indexes were always re-built unnecessarily when opening.
</li><li>
More bugs in the server-less multi-connection mode have been fixed:
...
...
h2/src/docsrc/html/quickstart.html
浏览文件 @
56c1cf96
...
...
@@ -27,7 +27,7 @@ Quickstart
This database can be used in embedded mode, or in server mode. To use it in embedded mode, you need to:
</p>
<ul>
<li>
Add the
<code>
h2*.jar
</code>
to the classpath
<li>
Add the
<code>
h2*.jar
</code>
to the classpath
(H2 does not have any dependencies)
</li><li>
Use the JDBC driver class:
<code>
org.h2.Driver
</code>
</li><li>
The database URL
<code>
jdbc:h2:~/test
</code>
opens the database 'test' in your user home directory
</li><li>
A new database is automatically created
...
...
h2/src/docsrc/html/roadmap.html
浏览文件 @
56c1cf96
...
...
@@ -28,6 +28,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>
Page store: new storage mechanism
</li><li>
[Requires page store] Support large updates (use the transaction log to undo).
</li><li>
[Requires page store] Shutdown compact
</li><li>
Optimize IN(...) for SELECT, DELETE, and UPDATE.
</li><li>
More tests with MULTI_THREADED=1
</li><li>
RECOVER=1 should automatically recover, =2 should run the recovery tool if required
</li><li>
Optimization: result set caching (like MySQL)
...
...
@@ -37,7 +38,6 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
<h2>
Priority 2
</h2>
<ul>
<li>
Improve test code coverage
</li><li>
Optimize IN(...) for DELETE and UPDATE.
</li><li>
Procedural language / script language (Java, Javascript)
</li><li>
Fulltext search: support streaming CLOB data.
</li><li>
Optimize .. OR .. to IN(..) or UNION if the cost is lower
...
...
@@ -180,8 +180,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>
Make sure H2 is supported by Execute Query: http://executequery.org/
</li><li>
Read InputStream when executing, as late as possible (maybe only embedded mode). Problem with re-execute.
</li><li>
Native fulltext search: min word length; store word positions
</li><li>
FTP Server: Implement a client to send / receive files to server (dir, get, put)
</li><li>
FTP Server: Implement SFTP / FTPS
</li><li>
Recursive Queries (see details)
</li><li>
Add an option to the SCRIPT command to generate only portable / standard SQL
</li><li>
Test Dezign for Databases (http://www.datanamic.com)
</li><li>
Fast library for parsing / formatting: http://javolution.org/
...
...
@@ -208,7 +207,6 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>
Support Sequoia (Continuent.org)
</li><li>
Dynamic length numbers / special methods for DataPage.writeByte / writeShort / Ronni Nielsen
</li><li>
Pluggable ThreadPool, (AvalonDB / deebee / Paul Hammant)
</li><li>
Recursive Queries (see details)
</li><li>
Release locks (shared or exclusive) on demand
</li><li>
Support OUTER UNION
</li><li>
Support parameterized views (similar to CSVREAD, but using just SQL for the definition)
...
...
@@ -270,6 +268,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>
Optimization: don't lock when the database is read-only
</li><li>
Integrate spatial functions from http://geosysin.iict.ch/irstv-trac/wiki/H2spatial/Download
</li><li>
Support COSH, SINH, and TANH functions
</li><li>
FTP Server: Implement SFTP / FTPS
</li><li>
Native search: support "phrase search", wildcard search (* and ?), case-insensitive search, boolean operators, and grouping
</li><li>
Improve documentation of access rights
</li><li>
Support ENUM data type (see MySQL, PostgreSQL, MS SQL Server, maybe others)
...
...
@@ -411,6 +410,11 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>
Java Service Wrapper: try http://yajsw.sourceforge.net/
</li><li>
Batch parameter for INSERT, UPDATE, and DELETE, and commit after each batch. See also MySQL DELETE.
</li><li>
MySQL compatibility: support ALTER TABLE .. MODIFY COLUMN.
</li><li>
Use a lazy and auto-close input stream (open resource when reading, close on eof).
</li><li>
PostgreSQL compatibility: generate_series.
</li><li>
Connection pool: 'reset session' command (delete temp tables, rollback, autocommit true).
</li><li>
Improve SQL documentation, see http://www.w3schools.com/sql/
</li><li>
MySQL compatibility: DatabaseMetaData.stores*() methods should return the same values. Test with SquirrelSQL.
</li></ul>
<h2>
Not Planned
</h2>
...
...
h2/src/docsrc/text/_docs_en.utf8.txt
浏览文件 @
56c1cf96
差异被折叠。
点击展开。
h2/src/docsrc/text/_docs_ja.utf8.txt
浏览文件 @
56c1cf96
差异被折叠。
点击展开。
h2/src/docsrc/textbase/_docs_en.properties
浏览文件 @
56c1cf96
差异被折叠。
点击展开。
h2/src/installer/buildRelease.sh
浏览文件 @
56c1cf96
#!/bin/sh
echo
$(
date
"+%H:%M:%S"
)
Start
cd
../..
TODAY
=
$(
date
"+%Y-%m-%d"
)
rm
-rf
../h2web_
$TODAY
rm
-rf
../h2web
mkdir
../h2web
...
...
@@ -24,11 +22,11 @@ PATH=$JAVA14/bin:$PATH
./build.sh
-quiet
installer mavenDeployCentral
# ./build.sh -quiet compile benchmark
# == Copy the benchmark results and update the performance page and diagram
# == Copy the benchmark results
# == and update the performance page and diagram
JAVA_HOME
=
$JAVA15
PATH
=
$JAVA15
/bin:
$PATH
./build.sh
-quiet
switchSource
mv
../h2web ../h2web_
$TODAY
echo
$(
date
"+%H:%M:%S"
)
Done
h2/src/installer/cheatSheet.html
0 → 100644
浏览文件 @
56c1cf96
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2009 H2 Group. Multiple-Licensed under the H2 License, Version 1.0,
and under the Eclipse Public License, Version 1.0
(http://h2database.com/html/license.html).
Initial Developer: H2 Group
-->
<html
xmlns=
"http://www.w3.org/1999/xhtml"
lang=
"en"
xml:lang=
"en"
>
<head><meta
http-equiv=
"Content-Type"
content=
"text/html;charset=utf-8"
/><title>
H2 Database Engine
</title>
<style
type=
"text/css"
>
td
,
input
,
select
,
textarea
,
body
,
code
,
pre
,
td
,
th
{
font
:
9pt
/
130%
Tahoma
,
Arial
,
Helvetica
,
sans-serif
;
font-weight
:
normal
;
}
h1
,
h2
,
h3
,
h4
,
h5
{
font
:
9pt
Tahoma
,
Arial
,
Helvetica
,
sans-serif
;
font-weight
:
bold
;
}
td
,
input
,
select
,
textarea
,
body
,
code
,
pre
{
font-size
:
9pt
;
}
pre
{
background-color
:
#ece9d8
;
border
:
1px
solid
rgb
(
172
,
168
,
153
);
padding
:
4px
;
}
code
{
background-color
:
#ece9d8
;
padding
:
0px
2px
;
}
h1
{
background-color
:
#0000bb
;
padding
:
2px
4px
2px
4px
;
color
:
#fff
;
font-size
:
15pt
;
line-height
:
normal
;
}
h2
{
font-size
:
13pt
;
}
h3
{
font-size
:
10pt
;
}
h4
{
font-size
:
9pt
;
}
table
{
background-color
:
#ffffff
;
border-collapse
:
collapse
;
border
:
1px
solid
#aca899
;
}
th
{
text-align
:
left
;
background-color
:
#ece9d8
;
border
:
1px
solid
#aca899
;
padding
:
2px
;
}
td
{
background-color
:
#ffffff
;
text-align
:
left
;
vertical-align
:
top
;
border
:
1px
solid
#aca899
;
padding
:
2px
;
}
</style>
</head><body>
<h1>
H2 Database Engine Cheat Sheet
</h1>
<h2>
Downloads
</h2>
<a
href=
"http://www.h2database.com/h2-setup-2009-04-10.exe"
>
Windows Installer
</a>
-
<a
href=
"http://www.h2database.com/h2-2009-04-10.zip"
>
Zip
</a>
-
<a
href=
"http://repo1.maven.org/maven2/com/h2database/h2/1.1.111/h2-1.1.111.jar"
>
Jar
</a>
<h2>
Using H2
</h2>
<ul><li>
Add h2*.jar to the classpath (the only dependency is Java 1.4 or newer)
</li><li>
JDBC driver class:
<code>
org.h2.Driver
</code>
</li><li>
Database URL:
<code>
jdbc:h2:~/test
</code>
</li><li>
A new database is automatically created if it does not exist
</li><li>
Closing the last connection closes a database
</li><li>
H2 is open source, free to use and distribute. See also license.
</li></ul>
<h2>
Database URL Shortlist
</h2>
<table>
<tr><td
rowspan=
"3"
>
Embedded
</td>
<td>
jdbc:h2:~/test
</td><td>
'test' in the current user home directory
</td></tr>
<tr><td>
jdbc:h2:/data/test
</td><td>
'test' in the directory /data/
</td></tr>
<tr><td>
jdbc:h2:test
</td><td>
'test' in the current working directory
</td></tr>
<tr><td
rowspan=
"2"
>
In-Memory
</td>
<td>
jdbc:h2:mem:test
</td><td>
named; multiple connections within the same process
</td></tr>
<tr><td>
jdbc:h2:mem:
</td><td>
unnamed private database; only one connections
</td></tr>
<tr><td
rowspan=
"2"
>
Server Mode
</td>
<td>
jdbc:h2:tcp://localhost/~/test
</td><td>
'test' in the current user home directory
</td></tr>
<tr><td>
jdbc:h2:tcp://localhost//data/test
</td><td>
'test' in the directory /data/
</td></tr>
<tr><td>
Compatibility
</td>
<td>
jdbc:h2:...;MODE=MySQL
</td><td>
or DB2, Derby, HSQLDB, MSSQLServer, Oracle, PostgreSQL
</td></tr>
<tr><td>
Debug
</td>
<td>
jdbc:...;TRACE_LEVEL_FILE=3
</td><td>
logs JDBC calls to test.trace.db
</td></tr>
</table>
<h2>
H2 Console Tool
</h2>
Start: double click the h2*.jar file, or run
<code>
java -jar h2*.jar
</code>
,
<code>
h2.bat
</code>
or
<code>
h2.sh
</code>
.
<h2>
Maven
</h2>
<pre>
<
dependency
>
<
groupId
>
com.h2database
<
/groupId
>
<
artifactId
>
h2
<
/artifactId
>
<
version
>
${version}
<
/version
>
<
/dependency
>
</pre>
<h2>
Hibernate
</h2>
Use the H2 or the HSQLDB dialect.
<h2>
TopLink and Glassfish
</h2>
Datasource Classname: org.h2.jdbcx.JdbcDataSource
<br
/>
toplink.target-database: oracle.toplink.essentials.platform.database.H2Platform
<h2>
Connect using JDBC
</h2>
<pre>
Class.forName("org.h2.Driver");
Connection conn = DriverManager.getConnection("jdbc:h2:~/test", "sa", "");
conn.close();
</pre>
<h2>
Connection Pool
</h2>
<pre>
JdbcConnectionPool cp = JdbcConnectionPool.create("jdbc:h2:~/test", "sa", "");
Connection conn = cp.getConnection(); ... conn.close();
cp.dispose();
</pre>
<h2>
Start a Server
</h2>
<pre>
java -cp h2*.jar org.h2.tools.Server
</pre>
<h2>
Reference
</h2>
<a
href=
"http://www.h2database.com/html/grammar.html"
>
SQL Grammar
</a>
(or run 'HELP
<
command
>
' in the H2 Console) -
<a
href=
"http://www.h2database.com/html/functions.html"
>
Functions
</a>
-
<a
href=
"http://www.h2database.com/html/datatypes.html"
>
Data Types
</a>
<h2>
Other Features
</h2>
Fulltext search -
Database Files Encryption -
Read Only Databases -
Read Only Databases in Zip or Jar File
<h2>
Command Line Tools
</h2>
Backup - ChangeFileEncryption - Console - ConvertTraceFile - CreateCluster -
DeleteDbFiles - Recover - Restore - RunScript - Script - Server - Shell
<h2>
Reading CSV files
</h2>
SELECT * FROM CSVREAD('test.csv');
</body></html>
\ No newline at end of file
h2/src/main/org/h2/command/ddl/AlterTableAlterColumn.java
浏览文件 @
56c1cf96
...
...
@@ -242,7 +242,8 @@ public class AlterTableAlterColumn extends SchemaCommand {
int
id
=
db
.
allocateObjectId
(
true
,
true
);
TableData
newTable
=
getSchema
().
createTable
(
tempName
,
id
,
newColumns
,
table
.
isPersistIndexes
(),
table
.
isPersistData
(),
false
,
Index
.
EMPTY_HEAD
);
newTable
.
setComment
(
table
.
getComment
());
StringBuffer
buff
=
new
StringBuffer
(
newTable
.
getCreateSQL
());
StringBuffer
buff
=
new
StringBuffer
();
buff
.
append
(
newTable
.
getCreateSQL
());
StringBuffer
columnList
=
new
StringBuffer
();
for
(
int
i
=
0
;
i
<
newColumns
.
size
();
i
++)
{
Column
nc
=
(
Column
)
newColumns
.
get
(
i
);
...
...
h2/src/main/org/h2/command/dml/Set.java
浏览文件 @
56c1cf96
...
...
@@ -96,7 +96,8 @@ public class Set extends Prepared {
throw
Message
.
getSQLException
(
ErrorCode
.
COLLATION_CHANGE_WITH_DATA_TABLE_1
,
table
.
getSQL
());
}
CompareMode
compareMode
;
StringBuffer
buff
=
new
StringBuffer
(
stringValue
);
StringBuffer
buff
=
new
StringBuffer
();
buff
.
append
(
stringValue
);
if
(
stringValue
.
equals
(
CompareMode
.
OFF
))
{
compareMode
=
new
CompareMode
(
null
,
null
,
0
);
}
else
{
...
...
h2/src/main/org/h2/engine/Session.java
浏览文件 @
56c1cf96
...
...
@@ -100,6 +100,7 @@ public class Session extends SessionWithState {
private
Table
waitForLock
;
private
int
modificationId
;
private
int
modificationIdState
;
private
int
objectId
;
Session
(
Database
database
,
User
user
,
int
id
)
{
this
.
database
=
database
;
...
...
@@ -1147,4 +1148,13 @@ public class Session extends SessionWithState {
return
ValueString
.
get
(
firstUncommittedLog
+
"-"
+
firstUncommittedPos
+
"-"
+
id
);
}
/**
* Get the next object id.
*
* @return the next object id
*/
public
int
nextObjectId
()
{
return
objectId
++;
}
}
h2/src/main/org/h2/res/help.csv
浏览文件 @
56c1cf96
...
...
@@ -16,7 +16,10 @@ LIMIT limits the number of rows returned by the query, OFFSET specified how many
rows to skip. SAMPLE_SIZE limits the number of rows read for aggregate queries.
If FOR UPDATE is specified, the tables are locked for writing.
","
SELECT * FROM TEST
SELECT * FROM TEST;
SELECT * FROM (SELECT ID, COUNT(*) FROM TEST
GROUP BY ID UNION SELECT NULL, COUNT(*) FROM TEST)
ORDER BY 1 NULLS LAST;
"
"Commands (DML)","INSERT","
...
...
@@ -921,19 +924,23 @@ SET IGNORECASE TRUE
"Commands (Other)","SET LOCK_MODE","
SET LOCK_MODE int
","
Sets the lock mode. The values 0, 1, 2, and 3 are supported.
Sets the lock mode. The values 0, 1, 2, and 3 are supported. The default is 3
(READ_COMMITTED).
The value 0 means no locking (should only be used for testing; also known as
READ_UNCOMMITTED). The value 1 means table level locking (also known as
SERIALIZABLE). The value 2 means table level locking with garbage collection (if
the application does not close all connections). The value 3 means table level
locking, but read locks are released immediately (default; also known as
READ_COMMITTED).
This setting is not persistent. Please note that using SET LOCK_MODE 0 while at
the same time using multiple connections may result in inconsistent
transactions. Admin rights are required to execute this command. This setting
can be appended to the database URL: jdbc:h2:test;LOCK_MODE=3
READ_UNCOMMITTED). Please note that using SET LOCK_MODE 0 while at the same time
using multiple connections may result in inconsistent transactions.
The value 1 means table level locking (also known as SERIALIZABLE).
The value 2 means table level locking with garbage collection (if the
application does not close all connections).
The value 3 means table level locking, but read locks are released immediately
(default; also known as READ_COMMITTED).
This setting is persistent. Admin rights are required to execute this command.
This setting can be appended to the database URL: jdbc:h2:test;LOCK_MODE=3
","
SET LOCK_MODE 1
"
...
...
h2/src/main/org/h2/server/web/PageParser.java
浏览文件 @
56c1cf96
...
...
@@ -45,7 +45,8 @@ public class PageParser {
private
void
setError
(
int
i
)
{
String
s
=
page
.
substring
(
0
,
i
)
+
"####BUG####"
+
page
.
substring
(
i
);
s
=
PageParser
.
escapeHtml
(
s
);
result
=
new
StringBuffer
(
s
);
result
=
new
StringBuffer
();
result
.
append
(
s
);
}
private
String
parseBlockUntil
(
String
end
)
throws
ParseException
{
...
...
h2/src/main/org/h2/server/web/WebThread.java
浏览文件 @
56c1cf96
...
...
@@ -1508,10 +1508,8 @@ class WebThread extends Thread implements DatabaseEventListener {
rs
.
addRow
(
new
String
[]
{
"meta.isReadOnly"
,
""
+
meta
.
isReadOnly
()
});
rs
.
addRow
(
new
String
[]
{
"meta.allProceduresAreCallable"
,
""
+
meta
.
allProceduresAreCallable
()
});
rs
.
addRow
(
new
String
[]
{
"meta.allTablesAreSelectable"
,
""
+
meta
.
allTablesAreSelectable
()
});
rs
.
addRow
(
new
String
[]
{
"meta.dataDefinitionCausesTransactionCommit"
,
""
+
meta
.
dataDefinitionCausesTransactionCommit
()
});
rs
.
addRow
(
new
String
[]
{
"meta.dataDefinitionIgnoredInTransactions"
,
""
+
meta
.
dataDefinitionIgnoredInTransactions
()
});
rs
.
addRow
(
new
String
[]
{
"meta.dataDefinitionCausesTransactionCommit"
,
""
+
meta
.
dataDefinitionCausesTransactionCommit
()
});
rs
.
addRow
(
new
String
[]
{
"meta.dataDefinitionIgnoredInTransactions"
,
""
+
meta
.
dataDefinitionIgnoredInTransactions
()
});
rs
.
addRow
(
new
String
[]
{
"meta.doesMaxRowSizeIncludeBlobs"
,
""
+
meta
.
doesMaxRowSizeIncludeBlobs
()
});
rs
.
addRow
(
new
String
[]
{
"meta.nullPlusNonNullIsNull"
,
""
+
meta
.
nullPlusNonNullIsNull
()
});
rs
.
addRow
(
new
String
[]
{
"meta.nullsAreSortedAtEnd"
,
""
+
meta
.
nullsAreSortedAtEnd
()
});
...
...
@@ -1519,18 +1517,13 @@ class WebThread extends Thread implements DatabaseEventListener {
rs
.
addRow
(
new
String
[]
{
"meta.nullsAreSortedHigh"
,
""
+
meta
.
nullsAreSortedHigh
()
});
rs
.
addRow
(
new
String
[]
{
"meta.nullsAreSortedLow"
,
""
+
meta
.
nullsAreSortedLow
()
});
rs
.
addRow
(
new
String
[]
{
"meta.storesLowerCaseIdentifiers"
,
""
+
meta
.
storesLowerCaseIdentifiers
()
});
rs
.
addRow
(
new
String
[]
{
"meta.storesLowerCaseQuotedIdentifiers"
,
""
+
meta
.
storesLowerCaseQuotedIdentifiers
()
});
rs
.
addRow
(
new
String
[]
{
"meta.storesLowerCaseQuotedIdentifiers"
,
""
+
meta
.
storesLowerCaseQuotedIdentifiers
()
});
rs
.
addRow
(
new
String
[]
{
"meta.storesMixedCaseIdentifiers"
,
""
+
meta
.
storesMixedCaseIdentifiers
()
});
rs
.
addRow
(
new
String
[]
{
"meta.storesMixedCaseQuotedIdentifiers"
,
""
+
meta
.
storesMixedCaseQuotedIdentifiers
()
});
rs
.
addRow
(
new
String
[]
{
"meta.storesMixedCaseQuotedIdentifiers"
,
""
+
meta
.
storesMixedCaseQuotedIdentifiers
()
});
rs
.
addRow
(
new
String
[]
{
"meta.storesUpperCaseIdentifiers"
,
""
+
meta
.
storesUpperCaseIdentifiers
()
});
rs
.
addRow
(
new
String
[]
{
"meta.storesUpperCaseQuotedIdentifiers"
,
""
+
meta
.
storesUpperCaseQuotedIdentifiers
()
});
rs
.
addRow
(
new
String
[]
{
"meta.supportsAlterTableWithAddColumn"
,
""
+
meta
.
supportsAlterTableWithAddColumn
()
});
rs
.
addRow
(
new
String
[]
{
"meta.supportsAlterTableWithDropColumn"
,
""
+
meta
.
supportsAlterTableWithDropColumn
()
});
rs
.
addRow
(
new
String
[]
{
"meta.storesUpperCaseQuotedIdentifiers"
,
""
+
meta
.
storesUpperCaseQuotedIdentifiers
()
});
rs
.
addRow
(
new
String
[]
{
"meta.supportsAlterTableWithAddColumn"
,
""
+
meta
.
supportsAlterTableWithAddColumn
()
});
rs
.
addRow
(
new
String
[]
{
"meta.supportsAlterTableWithDropColumn"
,
""
+
meta
.
supportsAlterTableWithDropColumn
()
});
rs
.
addRow
(
new
String
[]
{
"meta.supportsANSI92EntryLevelSQL"
,
""
+
meta
.
supportsANSI92EntryLevelSQL
()
});
rs
.
addRow
(
new
String
[]
{
"meta.supportsANSI92FullSQL"
,
""
+
meta
.
supportsANSI92FullSQL
()
});
rs
.
addRow
(
new
String
[]
{
"meta.supportsANSI92IntermediateSQL"
,
""
+
meta
.
supportsANSI92IntermediateSQL
()
});
...
...
h2/src/main/org/h2/util/StringUtils.java
浏览文件 @
56c1cf96
...
...
@@ -876,8 +876,6 @@ public class StringUtils {
*/
public
static
String
trim
(
String
s
,
boolean
leading
,
boolean
trailing
,
String
sp
)
{
char
space
=
(
sp
==
null
||
sp
.
length
()
<
1
)
?
' '
:
sp
.
charAt
(
0
);
// TODO function trim: HSQLDB says 'tabs are not removed', but they are.
// check what other databases do
if
(
leading
)
{
int
len
=
s
.
length
(),
i
=
0
;
while
(
i
<
len
&&
s
.
charAt
(
i
)
==
space
)
{
...
...
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
56c1cf96
...
...
@@ -290,6 +290,8 @@ java org.h2.test.TestAll timer
/*
test case for running out of disk space (using a special file system)
test shell tool on windows with special characters, try with
java -Dfile.encoding=UTF-8
...
...
@@ -297,74 +299,21 @@ auto-build: prepare release
documentation: rolling review at roadmap.html: done
checksum for downloads
lazy file input stream
auto close input stream
create a short 4 pages documentation
documentation: how can you improve performance (group of settings)
create a short documentation
test performance with log=2
postgresql generate_series?
multithreaded kernel
remove old TODO
Check JBoss and Spring support models
http://wiki.bonita.ow2.org/xwiki/bin/view/Main/BullOffer
- starting 2500 euros / year
- unlimited support requests
- 2 named contacts
- optional half days of technical aid by remote services
auto_reconnect
implemented:
- auto_server includes auto_reconnect
- works with server mode
- works with auto_server mode
- keep temporary linked tables, variables on client
- statements
- prepared statements
- small result sets (up to fetch size)
- throws an error when autocommit is false
- an error is thrown when the connection is lost
while looping over large result sets (larger than fetch size)
not implemented / not tested
- batch updates
- ignored in embedded mode
- keep temporary tables (including data) on client
- keep identity, getGeneratedKeys on client
- throw error when in cluster mode
remove old TODO
TestMVCC:
Concurrent update in table test: another transaction has updated or
deleted the same row when exactly does it occur in other databases
(PostgreSQL, Oracle)?
documentation: use 'server mode' not 'remote mode'.
CREATE FUNCTION? Function interface; HSQLDB compatibility
find quote:
You can't make a system that will not lose data, you can only make
a system that knows the last save point of 100% integrity. There are
too many variables and too much randomness on a cold hard power failure.
not tested:
PreparedProcedure PREPARE <name>(column,...) AS ...
Procedure
DeallocateProcedure DEALLOCATE [PLAN] <name>
ExecuteProcedure EXECUTE <name>[([p[,...])]
optimize where x not in (select):
SELECT c FROM color LEFT OUTER JOIN (SELECT c FROM TABLE(c
VARCHAR= ?)) p ON color.c = p.c WHERE p.c IS NULL;
http://www.w3schools.com/sql/
kill a specific java process:
kill -9 `jps -l | grep "org.h2.test.TestAll" | cut -d " " -f 1`
...
...
h2/src/test/org/h2/test/todo/todo.txt
浏览文件 @
56c1cf96
...
...
@@ -74,3 +74,39 @@ select * from statisticlog where id < 10;
UPDATE statisticlog SET datatext = 'data2'
WHERE id IN (SELECT id FROM statisticlog ORDER BY moment LIMIT 5);
select * from statisticlog where id < 10;
Auto-Reconnect
-----------------
Implemented:
- auto_server includes auto_reconnect
- works with server mode
- works with auto_server mode
- keep temporary linked tables, variables on client
- statements
- prepared statements
- small result sets (up to fetch size)
- throws an error when autocommit is false
- an error is thrown when the connection is lost
while looping over large result sets (larger than fetch size)
Not implemented / not tested:
- batch updates
- ignored in embedded mode
- keep temporary tables (including data) on client
- keep identity, getGeneratedKeys on client
- throw error when in cluster mode
Support Model
-----------------
Check JBoss and Spring support models
http://wiki.bonita.ow2.org/xwiki/bin/view/Main/BullOffer
- starting 2500 euros / year
- unlimited support requests
- 2 named contacts
- optional half days of technical aid by remote services
Durability
-----------------
Improve documentation.
You can't make a system that will not lose data, you can only make
a system that knows the last save point of 100% integrity. There are
too many variables and too much randomness on a cold hard power failure.
h2/src/tools/org/h2/build/doc/SpellChecker.java
浏览文件 @
56c1cf96
...
...
@@ -28,6 +28,7 @@ public class SpellChecker {
"csv"
,
"xml"
,
"js"
,
"Driver"
,
"properties"
,
"task"
,
"MF"
,
"sh"
,
""
};
private
static
final
String
[]
IGNORE
=
new
String
[]
{
"dev"
,
"nsi"
,
"gif"
,
"png"
,
"odg"
,
"ico"
,
"sxd"
,
"zip"
,
"bz2"
,
"rc"
,
"layout"
,
"res"
,
"dll"
,
"jar"
,
"svg"
};
private
static
final
String
DELIMITERS
=
" \n.();-\"=,*/{}_<>+\r:'@[]&\\!#|?$^%~`\t"
;
private
static
final
String
PREFIX_IGNORE
=
"abc"
;
private
static
final
String
IGNORE_FILE
=
"mainWeb.html"
;
...
...
@@ -149,7 +150,7 @@ public class SpellChecker {
private
void
scan
(
String
fileName
,
String
text
)
{
HashSet
notFound
=
new
HashSet
();
text
=
removeLinks
(
fileName
,
text
);
StringTokenizer
tokenizer
=
new
StringTokenizer
(
text
,
"\r\n \t+\"*%&/()='[]{},.-;:_<>\\!?$@#|~^`"
);
StringTokenizer
tokenizer
=
new
StringTokenizer
(
text
,
DELIMITERS
);
while
(
tokenizer
.
hasMoreTokens
())
{
String
token
=
tokenizer
.
nextToken
();
char
first
=
token
.
charAt
(
0
);
...
...
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
56c1cf96
...
...
@@ -587,4 +587,5 @@ consistently springfuse grep signatures wrote symbolic parents caches readers
animate scaladoc models disadvantages vladykin sergi trims requesting
handing bonita placed euros embeds reliability singular unregister quotas
overall httpdocs tigris eclemma separates underscore yajsw she her truncating
relocating smtps smtp osde joist catching guesses
\ No newline at end of file
relocating smtps smtp osde joist catching guesses delimiters shortlist sheet
rowspan cheat
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论