Skip to content

Commit 34e8cd9

Browse files
committed
2.4.240
1 parent d797994 commit 34e8cd9

187 files changed

Lines changed: 13978 additions & 10997 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

html/advanced.html

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
22
<!--
3-
Copyright 2004-2024 H2 Group. Multiple-Licensed under the MPL 2.0,
3+
Copyright 2004-2025 H2 Group. Multiple-Licensed under the MPL 2.0,
44
and the EPL 1.0 (https://h2database.com/html/license.html).
55
Initial Developer: H2 Group
66
-->
@@ -89,7 +89,7 @@
8989
<a href="grammar.html">SQL Grammar</a><br />
9090
<a href="systemtables.html">System Tables</a><br />
9191
<a href="../javadoc/index.html">Javadoc</a><br />
92-
<a href="https://github.com/h2database/h2database/releases/download/version-2.3.232/h2.pdf">PDF (2 MB)</a><br />
92+
<a href="https://github.com/h2database/h2database/releases/download/version-2.4.240/h2.pdf">PDF (2 MB)</a><br />
9393
<br />
9494
<b>Support</b><br />
9595
<a href="faq.html">FAQ</a><br />
@@ -1124,6 +1124,7 @@ <h3>Running the Durability Test</h3>
11241124
</p>
11251125

11261126
<h2 id="using_recover_tool">Using the Recover Tool</h2>
1127+
<h3>Traditional 2-phase Recover</h3>
11271128
<p>
11281129
The <code class="notranslate">Recover</code> tool can be used to extract the contents of a database file, even if the database is corrupted.
11291130
It also extracts the content of the transaction log and large objects (CLOB or BLOB).
@@ -1133,24 +1134,54 @@ <h2 id="using_recover_tool">Using the Recover Tool</h2>
11331134
java -cp h2*.jar org.h2.tools.Recover
11341135
</pre>
11351136
<p>
1136-
For each database in the current directory, a text file will be created.
1137-
This file contains raw insert statements (for the data) and data definition (DDL) statements to recreate
1137+
For each database in the current directory, a text-dump file (*.mv.txt) and a SQL script file (*.h2.sql) will be created.
1138+
Those uncompressed files are rather large, taking approximately twice the filespace of the database.</p>
1139+
<p>The SQL script file contains raw insert statements (for the data) and data definition (DDL) statements to recreate
11381140
the schema of the database. This file can be executed using the <code class="notranslate">RunScript</code> tool or a
11391141
<a href="https://h2database.com/html/commands.html#runscript"><code class="notranslate">RUNSCRIPT</code></a> SQL statement.
11401142
The script includes at least one
11411143
<code class="notranslate">CREATE USER</code> statement. If you run the script against a database that was created with the same
11421144
user, or if there are conflicting users, running the script will fail. Consider running the script
1143-
against a database that was created with a user name that is not in the script.
1144-
</p>
1145-
<p>
1146-
The <code class="notranslate">Recover</code> tool creates a SQL script from database file. It also processes the transaction log.
1145+
against a database that was created with a username that is not in the script.
11471146
</p>
11481147
<p>
11491148
To verify the database can recover at any time, append <code class="notranslate">;RECOVER_TEST=64</code>
11501149
to the database URL in your test environment. This will simulate an application crash after each 64 writes to the database file.
11511150
A log file named <code class="notranslate">databaseName.h2.db.log</code> is created that lists the operations.
11521151
The recovery is tested using an in-memory file system, that means it may require a larger heap setting.
11531152
</p>
1153+
<h3>Direct Recover</h3>
1154+
<p>Since H2-2.3.239 there is an enhanced <code class="notranslate">DirectRecover</code> tool which features:</p>
1155+
<ul>
1156+
<li>Direct output into SQL-script (using a pipe)</li>
1157+
<li>Compression using ZIP, GZIP, KANZI (when in classpath) or BZip2 (when in classpath)</li>
1158+
</ul>
1159+
<p>Especially KANZI can be useful for very large databases on servers with many CPU cores as it yields in very small SQL script files. Its compression ratio beats BZip2 at a much faster speed.</p>
1160+
<pre class="notranslate">
1161+
# Database: testdb.mv.db (1.7GB)
1162+
1163+
# parallel compression using KANZI from https://github.com/flanglet/kanzi
1164+
java -Xmx8g -cp "h2-2.3.239-SNAPSHOT.jar:kanzi-2.4.0.jar" org.h2.tools.DirectRecover -dir ~/ -db testdb -compress kanzi
1165+
1166+
# serial compression using BZip2 from https://dlcdn.apache.org/commons/compress/binaries/
1167+
java -Xmx8g -cp "h2-2.3.239-SNAPSHOT.jar:commons-compress-1.28.0.jar" org.h2.tools.DirectRecover -dir ~/ -db testdb -compress bzip2
1168+
1169+
# serial compression using GZIP w/o any additional libraries
1170+
java -Xmx8g -cp "h2-2.3.239-SNAPSHOT.jar" org.h2.tools.DirectRecover -dir ~/ -db testdb -compress gzip
1171+
1172+
# resulting SQL script files on a AMD Zen3 Ryzen5:
1173+
# KANZI: testdb.h2.sql.knz ( 99.7 MB in 106 secs)
1174+
# BZip2: testdb.h2.sql.bz2 (153.7 MB in 18 mins)
1175+
# GZip: testdb.h2.sql.gz (207.4 MB in 74 secs)
1176+
</pre>
1177+
<p>Since H2-2.3.239 the <code class="notranslate">RunScript</code> tool can read the KANZI or BZip2 compressed script files directly when the libraries are added to the classpath:</p>
1178+
<pre class="notranslate">
1179+
#KANZI from https://github.com/flanglet/kanzi
1180+
java -Xmx8G -cp "h2-2.3.239-SNAPSHOT.jar:kanzi-2.4.0.jar" org.h2.tools.RunScript -url jdbc:h2:~/testdb -user sa -script ~/testdb.h2.sql.knz -options "COMPRESSION kanzi"
1181+
1182+
#BZIP2 from https://dlcdn.apache.org/commons/compress/binaries/
1183+
java -Xmx8G -cp "h2-2.3.239-SNAPSHOT.jar:commons-compress-1.28.0.jar" org.h2.tools.RunScript -url jdbc:h2:~/testdb -user sa -script ~/testdb.h2.sql.bz2 -options "COMPRESSION bzip2"
1184+
</pre>
11541185

11551186
<h2 id="file_locking_protocols">File Locking Protocols</h2>
11561187
<p>

html/architecture.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
22
<!--
3-
Copyright 2004-2024 H2 Group. Multiple-Licensed under the MPL 2.0,
3+
Copyright 2004-2025 H2 Group. Multiple-Licensed under the MPL 2.0,
44
and the EPL 1.0 (https://h2database.com/html/license.html).
55
Initial Developer: H2 Group
66
-->
@@ -89,7 +89,7 @@
8989
<a href="grammar.html">SQL Grammar</a><br />
9090
<a href="systemtables.html">System Tables</a><br />
9191
<a href="../javadoc/index.html">Javadoc</a><br />
92-
<a href="https://github.com/h2database/h2database/releases/download/version-2.3.232/h2.pdf">PDF (2 MB)</a><br />
92+
<a href="https://github.com/h2database/h2database/releases/download/version-2.4.240/h2.pdf">PDF (2 MB)</a><br />
9393
<br />
9494
<b>Support</b><br />
9595
<a href="faq.html">FAQ</a><br />

html/build.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
22
<!--
3-
Copyright 2004-2024 H2 Group. Multiple-Licensed under the MPL 2.0,
3+
Copyright 2004-2025 H2 Group. Multiple-Licensed under the MPL 2.0,
44
and the EPL 1.0 (https://h2database.com/html/license.html).
55
Initial Developer: H2 Group
66
-->
@@ -89,7 +89,7 @@
8989
<a href="grammar.html">SQL Grammar</a><br />
9090
<a href="systemtables.html">System Tables</a><br />
9191
<a href="../javadoc/index.html">Javadoc</a><br />
92-
<a href="https://github.com/h2database/h2database/releases/download/version-2.3.232/h2.pdf">PDF (2 MB)</a><br />
92+
<a href="https://github.com/h2database/h2database/releases/download/version-2.4.240/h2.pdf">PDF (2 MB)</a><br />
9393
<br />
9494
<b>Support</b><br />
9595
<a href="faq.html">FAQ</a><br />
@@ -192,12 +192,12 @@ <h3>Using a Central Repository</h3>
192192
&lt;dependency&gt;
193193
&lt;groupId&gt;com.h2database&lt;/groupId&gt;
194194
&lt;artifactId&gt;h2&lt;/artifactId&gt;
195-
&lt;version&gt;2.3.232&lt;/version&gt;
195+
&lt;version&gt;2.4.240&lt;/version&gt;
196196
&lt;/dependency&gt;
197197
</pre>
198198
<p>
199199
New versions of this database are first uploaded to http://hsql.sourceforge.net/m2-repo/ and then automatically
200-
synchronized with the main <a href="https://repo1.maven.org/maven2/com/h2database/h2/">Maven repository</a>;
200+
synchronized with the main <a href="https://repo.maven.apache.org/maven2/com/h2database/h2/">Maven repository</a>;
201201
however after a new release it may take a few hours before they are available there.
202202
</p>
203203
<h3>Maven Plugin to Start and Stop the TCP Server</h3>

html/changelog.html

Lines changed: 69 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
22
<!--
3-
Copyright 2004-2024 H2 Group. Multiple-Licensed under the MPL 2.0,
3+
Copyright 2004-2025 H2 Group. Multiple-Licensed under the MPL 2.0,
44
and the EPL 1.0 (https://h2database.com/html/license.html).
55
Initial Developer: H2 Group
66
-->
@@ -88,7 +88,7 @@
8888
<a href="grammar.html">SQL Grammar</a><br />
8989
<a href="systemtables.html">System Tables</a><br />
9090
<a href="../javadoc/index.html">Javadoc</a><br />
91-
<a href="https://github.com/h2database/h2database/releases/download/version-2.3.232/h2.pdf">PDF (2 MB)</a><br />
91+
<a href="https://github.com/h2database/h2database/releases/download/version-2.4.240/h2.pdf">PDF (2 MB)</a><br />
9292
<br />
9393
<b>Support</b><br />
9494
<a href="faq.html">FAQ</a><br />
@@ -118,7 +118,73 @@ <h1>Change Log</h1>
118118

119119
<h2>Next Version (unreleased)</h2>
120120
<ul>
121-
<li>Nothing yet
121+
<li>nothing here yet</li>
122+
</ul>
123+
124+
<h2>Version 2.4.240 (2025-09-22)</h2>
125+
<ul>
126+
<li><a href="https://github.com/h2database/h2database/pull/4273">PR #4273</a>: SHUTDOWN COMPACT: parallel map copy (&frac14; cores default, override with h2.compactThreads)
127+
</li>
128+
<li><a href="https://github.com/h2database/h2database/pull/4258">PR #4258</a>: Fix compaction of encrypted databases
129+
</li>
130+
<li><a href="https://github.com/h2database/h2database/issues/4263">Issue #4263</a>: Documentation: SET TRUNCATE_LARGE_LENGTH is broken
131+
</li>
132+
<li><a href="https://github.com/h2database/h2database/issues/4208">Issue #4208</a>: Lost update when attempting to atomically increment a value using SELECT FOR UPDATE
133+
</li>
134+
<li><a href="https://github.com/h2database/h2database/pull/4133">PR #4133</a>: DROP SYNONYM isn't dropping the synonym right away
135+
</li>
136+
<li><a href="https://github.com/h2database/h2database/pull/4256">PR #4256</a>: Support KANZI and BZIP2 in RunScript
137+
</li>
138+
<li><a href="https://github.com/h2database/h2database/pull/4254">PR #4254</a>: feat: direct recovery into a compressed SQL file using pipes
139+
</li>
140+
<li><a href="https://github.com/h2database/h2database/issues/4247">Issue #4247</a>: Compaction causes missing chunks and data loss
141+
</li>
142+
<li><a href="https://github.com/h2database/h2database/issues/4217">Issue #4217</a>: JdbcPreparedStatement ignores query fetch size
143+
</li>
144+
<li><a href="https://github.com/h2database/h2database/issues/4225">Issue #4225</a>: Incompatibility in FullTextLucene with Lucene version 10.x onward
145+
</li>
146+
<li><a href="https://github.com/h2database/h2database/issues/4198">Issue #4198</a>: NullPointerException when running MERGE statement with correlated subquery in ON clause
147+
</li>
148+
<li><a href="https://github.com/h2database/h2database/issues/4191">Issue #4191</a>: Recover JSON column fail
149+
</li>
150+
<li><a href="https://github.com/h2database/h2database/pull/4184">PR #4184</a>: Code cleanup
151+
</li>
152+
<li><a href="https://github.com/h2database/h2database/pull/4182">PR #4182</a>: GCD, LCM, GCD_AGG, and LCM_AGG functions
153+
</li>
154+
<li><a href="https://github.com/h2database/h2database/issues/4178">Issue #4178</a>: SELECT MIN/MAX(_ROWID_) can be optimized
155+
</li>
156+
<li><a href="https://github.com/h2database/h2database/issues/4179">Issue #4179</a>: Support for SQL Server DATETIMEOFFSET data type
157+
</li>
158+
<li><a href="https://github.com/h2database/h2database/pull/4177">PR #4177</a>: Code cleanup around Table.getConstraints()/getIndexes()
159+
</li>
160+
<li><a href="https://github.com/h2database/h2database/issues/4021">Issue #4021</a>: h2 does not correctly report the name of a violated unique constraint
161+
</li>
162+
<li><a href="https://github.com/h2database/h2database/pull/4168">PR #4168</a>: simplify Store#close
163+
</li>
164+
<li><a href="https://github.com/h2database/h2database/issues/4161">Issue #4161</a>: h2 uses wrong index
165+
</li>
166+
<li><a href="https://github.com/h2database/h2database/issues/4159">Issue #4159</a>: Consider storing NO ACTION in the INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS columns
167+
when this is the declaration
168+
</li>
169+
<li><a href="https://github.com/h2database/h2database/issues/4152">Issue #4152</a>: NPE in convertToTimestampTimeZone on timestamp comparison
170+
</li>
171+
<li><a href="https://github.com/h2database/h2database/pull/4150">PR #4150</a>: fix:Fix some errors in the javadoc
172+
</li>
173+
<li><a href="https://github.com/h2database/h2database/pull/4149">PR #4149</a>: fix:Possible overflow issues with CacheLongKeyLIRS.getMisses()
174+
</li>
175+
<li><a href="https://github.com/h2database/h2database/issues/4144">Issue #4144</a>: [2.3.232] Regression in ORDER BY ... DESC with WHERE ... IN and OR clauses
176+
</li>
177+
<li><a href="https://github.com/h2database/h2database/issues/4139">Issue #4139</a>: Oracle compatibility mode: unexpected Column alias is not specified exception in CTE
178+
</li>
179+
<li><a href="https://github.com/h2database/h2database/issues/4136">Issue #4136</a>: ArrayIndexOutOfBoundsException with compound index
180+
</li>
181+
<li><a href="https://github.com/h2database/h2database/issues/4124">Issue #4124</a>: java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "[0]" is null
182+
</li>
183+
<li><a href="https://github.com/h2database/h2database/issues/4116">Issue #4116</a>: Optimizer chooses wrong execution plan in some cases when index-sorted optimization is possible
184+
</li>
185+
<li><a href="https://github.com/h2database/h2database/issues/4114">Issue #4114</a>: Regression when using CAST expressions in ROW IN predicates
186+
</li>
187+
<li><a href="https://github.com/h2database/h2database/issues/4111">Issue #4111</a>: ALTER TYPE name ADD VALUE new_enum_value is not supported
122188
</li>
123189
</ul>
124190

@@ -551,14 +617,6 @@ <h2>Version 2.1.210 (2022-01-17)</h2>
551617
</li>
552618
</ul>
553619

554-
<h2>Version 2.0.206 (2022-01-04)</h2>
555-
<ul>
556-
<li><a href="https://github.com/h2database/h2database/issues/3322">Issue #3322</a>: Create linked table fails when the table contains a Geometry with a data type specified
557-
</li>
558-
<li><a href="https://github.com/h2database/h2database/issues/3297">Issue #3297</a>: Unexpected GROUP BY results with indexed IGNORECASE column
559-
</li>
560-
</ul>
561-
562620

563621

564622
<!-- [close] { -->

html/cheatSheet.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
22
<!--
3-
Copyright 2004-2024 H2 Group. Multiple-Licensed under the MPL 2.0,
3+
Copyright 2004-2025 H2 Group. Multiple-Licensed under the MPL 2.0,
44
and the EPL 1.0 (https://h2database.com/html/license.html).
55
Initial Developer: H2 Group
66
-->
@@ -112,9 +112,9 @@ <h2>Using H2</h2>
112112
<a href="https://github.com/h2database/h2database">open source</a>,
113113
<a href="license.html">free to use and distribute</a>.
114114
</li><li><a href="https://h2database.com/html/download.html">Download</a>:
115-
<a href="https://repo1.maven.org/maven2/com/h2database/h2/2.3.232/h2-2.3.232.jar" class="link">jar</a>,
116-
<a href="https://github.com/h2database/h2database/releases/download/version-2.3.232/h2-setup-2024-08-11.exe" class="link">installer (Windows)</a>,
117-
<a href="https://github.com/h2database/h2database/releases/download/version-2.3.232/h2-2024-08-11.zip" class="link">zip</a>.
115+
<a href="https://repo.maven.apache.org/maven2/com/h2database/h2/2.4.240/h2-2.4.240.jar" class="link">jar</a>,
116+
<a href="https://github.com/h2database/h2database/releases/download/version-2.4.240/h2-setup-2025-09-22.exe" class="link">installer (Windows)</a>,
117+
<a href="https://github.com/h2database/h2database/releases/download/version-2.4.240/h2-2025-09-22.zip" class="link">zip</a>.
118118
</li><li>To start the
119119
<a href="quickstart.html#h2_console">H2 Console tool</a>, double click the jar file, or
120120
run <code class="notranslate">java -jar h2*.jar</code>, <code class="notranslate">h2.bat</code>, or <code class="notranslate">h2.sh</code>.
@@ -193,7 +193,7 @@ <h2><a href="build.html#maven2">Maven 2</a></h2>
193193
&lt;dependency&gt;
194194
&lt;groupId&gt;com.h2database&lt;/groupId&gt;
195195
&lt;artifactId&gt;h2&lt;/artifactId&gt;
196-
&lt;version&gt;2.3.232&lt;/version&gt;
196+
&lt;version&gt;2.4.240&lt;/version&gt;
197197
&lt;/dependency&gt;
198198
</pre>
199199

0 commit comments

Comments
 (0)