H2 Database Engine Changelog

What's new in H2 Database Engine 1.4.188 Beta

Aug 19, 2015
  • Server mode: CLOB processing for texts larger than about 1 MB sometimes did not work.
  • Server mode: BLOB processing for binaries larger than 2 GB did not work.
  • Multi-threaded processing: concurrent deleting the same row could throw the exception "Row not found when trying to delete".
  • MVStore transactions: a thread could see a change of a different thread within a different map. Pull request #153.
  • H2 Console: improved IBM DB2 compatibility.
  • A thread deadlock detector (disabled by default) can help detect and analyze Java level deadlocks. To enable, set the system property "h2.threadDeadlockDetector" to true.
  • Performance improvement for metadata queries that join against the COLUMNS metadata table.
  • MVStore: power failure could corrupt the store, if writes were re-ordered.
  • For compatibility with other databases, support for (double and float) -0.0 has been removed. 0.0 is used instead.
  • Fix for #134, Column name with a # character. Patch by bradmesserle.
  • In version 1.4.186, "order by" was broken in some cases due to the change "Make the planner use indexes for sorting when doing a GROUP BY". The change was reverted.
  • Pull request #146: Improved CompareMode.
  • Fix for #144, JdbcResultSet.setFetchDirection() throws "Feature not supported".
  • Fix for issue #143, deadlock between two sessions hitting the same sequence on a column.
  • Pull request #137: SourceCompiler should not throw a syntax error on javac warning.
  • MVStore: out of memory while storing could corrupt the store (theoretically, a rollback would be possible, but this case is not yet implemented).
  • The compressed in-memory file systems (memLZF:) could not be used in the MVStore.
  • The in-memory file systems (memFS: and memLZF:) did not support files larger than 2 GB due to an integer overflow.
  • Pull request #138: Added the simple Oracle function: ORA_HASH (+ tests) #138
  • Timestamps in the trace log follow the format (yyyy-MM-dd HH:mm:ss) instead of the old format (MM-dd HH:mm:ss). Patch by Richard Bull.
  • Pull request #125: Improved Oracle compatibility with "truncate" with timestamps and dates.
  • Pull request #127: Linked tables now support geometry columns.
  • ABS(CAST(0.0 AS DOUBLE)) returned -0.0 instead of 0.0.
  • BNF auto-completion failed with unquoted identifiers.
  • Oracle compatibility: empty strings were not converted to NULL when using prepared statements.
  • PostgreSQL compatibility: new syntax "create index ... using ...".
  • There was a bug in DataType.convertToValue when reading a ResultSet from a ResultSet.
  • Pull request #116: Improved concurrency in the trace system.
  • Issue 609: the spatial index did not support NULL.
  • Granting a schema is now supported.
  • Linked tables did not work when a function-based index is present (Oracle).
  • Creating a user with a null password, salt, or hash threw a NullPointerException.
  • Foreign key: don't add a single column index if column is leading key of existing index.
  • Pull request #4: Creating and removing temporary tables was getting slower and slower over time, because an internal object id was allocated but never de-allocated.
  • Issue 609: the spatial index did not support NULL with update and delete operations.
  • Pull request #2: Add external metadata type support (table type "external")
  • MS SQL Server: the CONVERT method did not work in views and derived tables.
  • Java 8 compatibility for "regexp_replace".
  • When in cluster mode, and one of the nodes goes down, we need to log the problem with priority "error", not "debug"

New in H2 Database Engine 1.4.186 Beta (Mar 2, 2015)

  • The Servlet API 3.0.1 is now used, instead of 2.4.
  • MVStore: old chunks no longer removed in append-only mode.
  • MVStore: the cache for page references could grow far too big, resulting in out of memory in some cases.
  • MVStore: orphaned lob objects were not correctly removed in some cases, making the database grow unnecessarily.
  • MVStore: the maximum cache size was artificially limited to 2 GB (due to an integer overflow).
  • MVStore / TransactionStore: concurrent updates could result in a "Too many open transactions" exception.
  • StringUtils.toUpperEnglish now has a small cache. This should speed up reading from a ResultSet when using the column name.
  • MVStore: up to 65535 open transactions are now supported. Previously, the limit was at most 65535 transactions between the oldest open and the newest open transaction (which was quite a strange limit).
  • The default limit for in-place LOB objects was changed from 128 to 256 bytes. This is because each read creates a reference to a LOB, and maintaining the references is a big overhead. With the higher limit, less references are needed.
  • Tables without columns didn't work. (The use case for such tables is testing.)
  • The LIRS cache now resizes the table automatically in all cases and no longer needs the averageMemory configuration.
  • Creating a linked table from an MVStore database to a non-MVStore database created a second (non-MVStore) database file.
  • In version 1.4.184, a bug was introduced that broke queries that have both joins and wildcards, for example: select * from dual join(select x from dual) on 1=1
  • Issue 598: parser fails on timestamp "24:00:00.1234" - prevent the creation of out-of-range time values.
  • Allow declaring triggers as source code (like functions). Patch by Sylvain Cuaz.
  • Make the planner use indexes for sorting when doing a GROUP BY where all of the GROUP BY columns are not mentioned in the select. Patch by Frederico (zepfred).
  • PostgreSQL compatibility: generate_series (as an alias for system_range). Patch by litailang.
  • Fix missing "column" type in right-hand parameter in ConditionIn. Patch by Arnaud Thimel.

New in H2 Database Engine 1.4.185 Beta (Jan 16, 2015)

  • In version 1.4.184, "group by" ignored the table name, and could pick a select column by mistake. Example: select 0 as x from system_range(1, 2) d group by d.x;
  • New connection setting "REUSE_SPACE" (default: true). If disabled, all changes are appended to the database file, and existing content is never overwritten. This allows to rollback to a previous state of the database by truncating the database file.
  • Issue 587: MVStore: concurrent compaction and store operations could result in an IllegalStateException.
  • Issue 594: Profiler.copyInThread does not work properly.
  • Script tool: Now, SCRIPT ... TO is always used (for higher speed and lower disk space usage).
  • Script tool: Fix parsing of BLOCKSIZE parameter, original patch by Ken Jorissen.
  • Fix bug in PageStore#commit method - when the ignoreBigLog flag was set, the logic that cleared the flag could never be reached, resulting in performance degradation. Reported by Alexander Nesterov.
  • Issue 552: Implement BIT_AND and BIT_OR aggregate functions.

New in H2 Database Engine 1.4.184 Beta (Dec 19, 2014)

  • In version 1.3.183, indexes were not used if the table contains columns with a default value generated by a sequence. This includes tables with identity and auto-increment columns. This bug was introduced by supporting "rownum" in views and derived tables.
  • MVStore: imported BLOB and CLOB data sometimes disappeared. This was caused by a bug in the ObjectDataType comparison.
  • Reading from a StreamStore now throws an IOException if the underlying data doesn't exist.
  • MVStore: if there is an exception while saving, the store is now in all cases immediately closed.
  • MVStore: the dump tool could go into an endless loop for some files.
  • MVStore: recovery for a database with many CLOB or BLOB entries is now much faster.
  • Group by with a quoted select column name alias didn't work. Example: select 1 "a" from dual group by "a"
  • Auto-server mode: the host name is now stored in the .lock.db file.

New in H2 Database Engine 1.4.183 Beta (Dec 18, 2014)

  • MVStore: the default auto-commit buffer size is now about twice as big. This should reduce the database file size after inserting a lot of data.
  • The built-in functions "power" and "radians" now always return a double.
  • Using "row_number" or "rownum" in views or derived tables had unexpected results if the outer query contained constraints for the given view. Example: select b.nr, b.id from (select row_number() over() as nr, a.id as id from (select id from test order by name) as a) as b where b.id = 1
  • MVStore: the Recover tool can now deal with more types of corruption in the file.
  • MVStore: the TransactionStore now first needs to be initialized before it can be used.
  • Views and derived tables with equality and range conditions on the same columns did not work properly. example: select x from (select x from (select 1 as x) where x > 0 and x < 2) where x = 1
  • The database URL setting PAGE_SIZE setting is now also used for the MVStore.
  • MVStore: the default page split size for persistent stores is now 4096 (it was 16 KB so far). This should reduce the database file size for most situations (in some cases, less than half the size of the previous version).
  • With query literals disabled, auto-analyze of a table with CLOB or BLOB did not work.
  • MVStore: use a mark and sweep GC algorithm instead of reference counting, to ensure used chunks are never overwrite, even if the reference counting algorithm does not work properly.
  • In the multi-threaded mode, updating the column selectivity ("analyze") in the background sometimes did not work.
  • In the multi-threaded mode, database metadata operations did sometimes not work if the schema was changed at the same time (for example, if tables were dropped).
  • Some CLOB and BLOB values could no longer be read when the original row was removed (even when using the MVCC mode).
  • The MVStoreTool could throw an IllegalArgumentException.
  • Improved performance for some date / time / timestamp conversion operations. Thanks to Sergey Evdokimov for reporting the problem.
  • H2 Console: the built-in web server did not work properly if an unknown file was requested.
  • MVStore: the jar file is renamed to "h2-mvstore-*.jar" and is deployed to Maven separately.
  • MVStore: support for concurrent reads and writes is now enabled by default.
  • Server mode: the transfer buffer size has been changed from 16 KB to 64 KB, after it was found that this improves performance on Linux quite a lot.
  • H2 Console and server mode: SSL is now disabled and TLS is used to protect against the Poodle SSLv3 vulnerability. The system property to disable secure anonymous connections is now "h2.enableAnonymousTLS". The default certificate is still self-signed, so you need to manually install another one if you want to avoid man in the middle attacks.
  • MVStore: the R-tree did not correctly measure the memory usage.
  • MVStore: compacting a store with an R-tree did not always work.
  • Issue 581: When running in LOCK_MODE=0, JdbcDatabaseMetaData#supportsTransactionIsolationLevel(TRANSACTION_READ_UNCOMMITTED) should return false
  • Fix bug which could generate deadlocks when multiple connections accessed the same table.
  • Some places in the code were not respecting the value set in the "SET MAX_MEMORY_ROWS x" command
  • Fix bug which could generate a NegativeArraySizeException when performing large (>40M) row union operations
  • Fix "USE schema" command for MySQL compatibility, patch by mfulton
  • Parse and ignore the ROW_FORMAT=DYNAMIC MySQL syntax, patch by mfulton

New in H2 Database Engine 1.4.182 Beta (Nov 18, 2014)

  • MVStore: improved error messages and logging; improved behavior if there is an error when serializing objects.
  • OSGi: the MVStore packages are now exported.
  • With the MVStore option, when using multiple threads that concurrently create indexes or tables, it was relatively easy to get a lock timeout on the "SYS" table.
  • When using the multi-threaded option, the exception "Unexpected code path" could be thrown, specially if the option "analyze_auto" was set to a low value.
  • In the server mode, when reading from a CLOB or BLOB, if the connection was closed, a NullPointerException could be thrown instead of an exception saying the connection is closed.
  • DatabaseMetaData.getProcedures and getProcedureColumns could throw an exception if a user defined class is not available.
  • Issue 584: the error message for a wrong sequence definition was wrong.
  • CSV tool: the rowSeparator option is no longer supported, as the same can be achieved with the lineSeparator.
  • Descending indexes on MVStore tables did not work properly.
  • Issue 579: Conditions on the "_rowid_" pseudo-column didn't use an index when using the MVStore.
  • Fixed documentation that "offset" and "fetch" are also keywords since version 1.4.x.
  • The Long.MIN_VALUE could not be parsed for auto-increment (identity) columns.
  • Issue 573: Add implementation for Methods "isWrapperFor()" and "unwrap()" in other JDBC classes.
  • Issue 572: MySQL compatibility for "order by" in update statements.
  • The change in JDBC escape processing in version 1.4.181 affects both the parser (which is running on the server) and the JDBC API (which is running on the client). If you (or a tool you use) use the syntax "{t 'time}", or "{ts 'timestamp'}", or "{d 'data'}", then both the client and the server need to be upgraded to version 1.4.181 or later.

New in H2 Database Engine 1.4.181 Beta (Aug 7, 2014)

  • Improved MySQL compatibility by supporting "use schema". Thanks a lot to Karl Pietrzak for the patch!
  • Writing to the trace file is now faster, specially with the debug level.
  • The database option "defrag_always=true" did not work with the MVStore.
  • The JDBC escape syntax {ts 'value'} did not interpret the value as a timestamp. The same for {d 'value'} (for date) and {t 'value'} (for time). Thanks to Lukas Eder for reporting the issue.
  • File system abstraction: support replacing existing files using move (currently not for Windows).
  • The statement "shutdown defrag" now compresses the database (with the MVStore). This command can greatly reduce the file size, and is relatively fast, but is not incremental.
  • The MVStore now automatically compacts the store in the background if there is no read or write activity, which should (after some time; sometimes about one minute) reduce the file size. This is still work in progress, feedback is welcome!
  • Change default value of PAGE_SIZE from 2048 to 4096 to more closely match most file systems block size (PageStore only; the MVStore already used 4096).
  • Auto-scale MAX_MEMORY_ROWS and CACHE_SIZE settings by the amount of available RAM. Gives a better out of box experience for people with more powerful machines.
  • Handle tabs like 4 spaces in web console, patch by Martin Grajcar.
  • Issue 573: Add implementation for Methods "isWrapperFor()" and "unwrap()" in JdbcConnection.java, patch by BigMichi1.

New in H2 Database Engine 1.4.180 Beta (Jul 14, 2014)

  • MVStore: the store is now auto-compacted automatically up to some point, to avoid very large file sizes. This area is still work in progress.
  • Sequences of temporary tables (auto-increment or identity columns) were persisted unnecessarily in the database file, and were not removed when re-opening the database.
  • MVStore: an IndexOutOfBoundsException could sometimes occur MVMap.openVersion when concurrently accessing the store.
  • The LIRS cache now re-sizes the internal hash map if needed.
  • Optionally persist session history in the H2 console. (patch from Martin Grajcar)
  • Add client-info property to get the number of servers currently in the cluster and which servers that are available. (patch from Nikolaj Fogh)
  • Fix bug in changing encrypted DB password that kept the file handle open when the wrong password was supplied. (test case from Jens Hohmuth).
  • Issue 567: H2 hangs for a long time then (sometimes) recovers. Introduce a queue when doing table locking to prevent session starvation.

New in H2 Database Engine 1.3.176 (Jun 23, 2014)

  • The file locking method 'serialized' is no longer documented, as it will not be available in version 1.4.
  • The static method Csv.getInstance() was removed. Use the public constructor instead.
  • The default user name for the Script, RunScript, Shell, and CreateCluster tools are no longer "sa" but an empty string.
  • The stack trace of the exception "The object is already closed" is no longer logged by default.
  • If a value of a result set was itself a result set, the result could only be read once.
  • Column constraints are also visible in views (patch from Nicolas Fortin for H2GIS).
  • Granting a additional right to a role that already had a right for that table was not working.
  • Spatial index: a few bugs have been fixed (using spatial constraints in views, transferring geometry objects over TCP/IP, the returned geometry object is copied when needed).
  • Issue 551: the datatype documentation was incorrect (found by Bernd Eckenfels).
  • Issue 368: ON DUPLICATE KEY UPDATE did not work for multi-row inserts. Test case from Angus Macdonald.
  • OSGi: the package javax.tools is now imported (as an optional).
  • H2 Console: auto-complete is now disabled by default, but there is a hot-key (Ctrl+Space).
  • H2 Console: auto-complete did not work with multi-line statements.
  • CLOB and BLOB data was not immediately removed after a rollback.
  • There is a new Aggregate API that supports the internal H2 data types (GEOMETRY for example). Thanks a lot to Nicolas Fortin for the patch!
  • Referential integrity constraints sometimes used the wrong index, such that updating a row in the referenced table incorrectly failed with a constraint violation.
  • The Polish translation was completed and corrected by Wojtek Jurczyk. Thanks a lot!
  • Issue 545: Unnecessary duplicate code was removed.
  • The profiler tool can now process files with full thread dumps.
  • MVStore: the file format was changed slightly.
  • MVStore mode: the CLOB and BLOB storage was re-implemented and is now much faster than with the PageStore (which is still the default storage).
  • MVStore mode: creating indexes is now much faster (in many cases faster than with the default PageStore).
  • Various bugs in the MVStore storage and have been fixed, including a bug in the R-tree implementation. The database could get corrupt if there were transient IO exceptions while storing.
  • The method org.h2.expression.Function.getCost could throw a NullPointException.
  • Storing LOBs in separate files (outside of the main database file) is no longer supported for new databases.
  • Lucene 2 is no longer supported.
  • Fix bug in calculating default MIN and MAX values for SEQUENCE.
  • Fix bug in performing IN queries with multiple values when IGNORECASE=TRUE
  • Add entry-point to org.h2.tools.Shell so it can be called from inside an application. patch by Thomas Gillet.
  • Fix bug that prevented the PgServer from being stopped and started multiple times.
  • Support some more DDL syntax for MySQL, patch from Peter Jentsch.
  • Issue 548: TO_CHAR does not format MM and DD correctly when the month or day of the month is 1 digit, patch from "the.tucc"
  • Fix bug in varargs support in ALIAS's, patch from Nicolas Fortin

New in H2 Database Engine 1.4.179 Beta (Jun 23, 2014)

  • The license was changed to MPL 2.0 (from 1.0) and EPL 1.0.
  • Issue 565: MVStore: concurrently adding LOB objects (with MULTI_THREADED option) resulted in a NullPointerException.
  • MVStore: reduced dependencies to other H2 classes.
  • There was a way to prevent a database from being re-opened, by creating a column constraint that references a table with a higher id. This is now detected, and creating the table is prohibited. In future versions of H2, most likely creating references to other tables will no longer be supported because of such problems.
  • MVStore: descending indexes with "nulls first" did not work as expected (null was ordered last).
  • Large result sets now always create temporary tables instead of temporary files.
  • When using the PageStore, opening a database failed in some cases with a NullPointerException if temporary tables were used (explicitly, or implicitly when using large result sets).
  • If a database file in the PageStore file format exists, this file and this mode is now used, even if the database URL does not contain "MV_STORE=FALSE". If a MVStore file exists, it is used.
  • Databases created with version 1.3.175 and earlier that contained foreign keys in combination with multi-column indexes could not be opened in some cases. This was due to a bugfix in version 1.3.176: Referential integrity constraints sometimes used the wrong index.
  • MVStore: the ObjectDataType comparison method was incorrect if one key was Serializable and the other was of a common class.
  • Recursive queries with many result rows (more than the setting "max_memory_rows") did not work correctly.
  • The license has changed to MPL 2.0 + EPL 1.0.
  • MVStore: temporary tables from result sets could survive re-opening a database, which could result in a ClassCastException.
  • Issue 566: MVStore: unique indexes that were created later on did not work correctly if there were over 5000 rows in the table.
  • MVStore: creating secondary indexes on large tables results in missing rows in the index.
  • Metadata: the password of linked tables is now only visible for admin users.
  • For Windows, database URLs of the form "jdbc:h2:/test" where considered relative and did not work unless the system property "h2.implicitRelativePath" was used.
  • Windows: using a base directory of "C:/" and similar did not work as expected.
  • Follow JDBC specification on Procedures MetaData, use P0 as return type of procedure.
  • Issue 531: IDENTITY ignored for added column.
  • FileSystem: improve exception throwing compatibility with JDK
  • Spatial Index: adjust costs so we do not use the spatial index if the query does not contain an intersects operator.
  • Fix multi-threaded deadlock when using a View that includes a TableFunction.
  • Fix bug in dividing very-small BigDecimal numbers.

New in H2 Database Engine 1.3.148 Beta (Dec 29, 2010)

  • The built-in connection pool was simplified a bit. The dispose() method no longer throws an exception (it only logs it).
  • The database upgrade (to upgrade from H2 version 1.1.x) has been simplified.
  • The feature to log all errors (system properties h2.logAllErrors and h2.logAllErrorsFile) has been removed.
  • When starting the H2 Console, the properties file can now be completely disabled.
  • Server.openBrowser no longer writes to System.out directly if opening the URL failed.
  • The INSERT optimizations (INSERT ... DIRECT SORTED SELECT) were not parsed correctly when using a column list.
  • H2 Console: the tables and columns are now listed for SQLite as well.
  • H2 Console: improved autocomplete feature (also simplified the source code for this feature).
  • The DbStarter servlet context listener now starts the server before opening a connection, so that connecting using the server mode works.
  • The Shell tool can now enable, disable, and display the current autocommit mode.
  • There is a limitation in the cluster mode: The SQL statement SET AUTOCOMMIT FALSE doesn't work. To disable autocommit, the method Connection.setAutoCommit(false) needs to be called. This is now documented. See also issue 259.
  • Connection pool / DataSource: a NullPointerException was thrown when using a database URL that doesn't start with "jdbc:h2:".
  • Using the java.sql.Blob or java.sql.Clob interfaces could throw the wrong exception after the object was closed.
  • LOB: in server mode, if the feature "LOBs in database" is disabled, the temporary files are now created in the temp directory (the same as when "LOBs in database" is enabled).

New in H2 Database Engine 1.2.147 (Dec 29, 2010)

  • H2 Console: the server properties directory can now be set on the command line using java ... -properties . Issue 159.
  • New feature INSERT INTO ... DIRECT SELECT, mainly to speed up loading tables from a CSV file. When using DIRECT, then the results from the query are directly applied in the target table without any intermediate step (without temporary file).
  • Converting binary data to UUID was incorrect when the converting more than 31 bytes. Now always the first 16 bytes are used.
  • Improved date / time arithmetics. Now supported are multiplying and dividing a time with / by a number, adding and subtracting a time to / from a time or date, subtracting a time or timestamp from a timestamp.
  • The Ant build script has been removed because it is no longer up to date.
  • Nested outer joins without brackets were not working as expected. Example: select * from a inner join b inner join c on c.id = b.id on b.id = a.id;
  • JMX (the Java management extension) is now supported. Issue 253.
  • Creating a comment on a column didn't work if the schema name was equal the database name.
  • When using multi-version concurrency, re-running a prepared statement with the same parameters would sometimes give the same result even if another connection committed a change (the previous result was sometimes re-used incorrectly).
  • When using SELECT_FOR_UPDATE_MVCC (lock only the selected rows when using MVCC), the selected rows were sometimes not locked correctly.
  • When using Lucene 3, the index files were not always closed when the database was closed.
  • Concurrently preparing a statement and altering a table could throw a table not found exception.
  • When concurrently preparing many statements with a subquery, in some cases the query didn't run (Column "..." must be in the GROUP BY list).
  • CallableStatement: now the syntax "{? = CALL...}" is supported as well.
  • Lob in databases: two small BLOB or CLOB values were always considered equal. This also affected unique indexes.
  • The shutdown hook is (re-) enabled by default even for H2 version 1.3.x.
  • When creating a database from a recovery script, the same user can now be used (CREATE USER now always includes IF EXISTS).
  • The H2 Console now prints a status message if started with parameters.

New in H2 Database Engine 1.1.140 (Aug 5, 2010)

  • The default MAX_LOG_SIZE is now 16 MB instead of 2 MB. Some uses cases are 3 times faster now.
  • Improved cache memory usage calculation.
  • Only resources that are actually used are loaded in memory. This can reduce the memory usage by about 400 KB.
  • Profiling: the jar file can now be installed as an agent using java -javaagent:h2*.jar - this was be used to more accurately calculate the memory footprint of the cache. It has no effect when using H2 (using this feature in an application is not needed and not recommended).
  • The cache was not used efficiently when reading (behaving like a FIFO cache instead of an LRU cache).
  • Storing lobs in the database has been changed. It is now faster. Unfortunately, the change is not backward compatible; if you have used h2.lobInDatabase before you will need to re-build the database.
  • SHUTDOWN COMPACT is now faster.
  • H2 Console: requesting the status did not always show the window on top of others.
  • H2 Console: on some system, the browser windows got opened when requesting a new one.
  • The built-in profiling tool now uses a default stack depth of 32 elements and a default interval of 10 ms.
  • Database files now grows in 1 MB blocks (and at least 20% at a time), instead of always 256 KB. This speeds up loading a new database.
  • H2 Console: new built-in command @sleep to help profile another session.
  • For improved performance, LOG=0 and LOG=1 are again supported. LOG=0 means the transaction log is disabled completely (fastest; for loading a database). LOG=1 means the transaction log is enabled, but FileDescriptor.sync is disabled (if no protection against power failure is required). LOG=2 is the default (transaction log is enabled, FileDescriptor.sync for each checkpoint).
  • After deleting a lot of data (for example by dropping or altering tables, or indexes, or after a large transaction), opening a large database was very slow. Fixed.
  • When killing the process after creating and dropping many tables (specially temporary tables), the database could not be opened sometimes.
  • CAST(NULL AS ...) doesn't forget the data type, precision, and scale any longer.
  • Experimental support for recursive queries (see 'Advanced' - 'Recursive Queries' for details).
  • Problems with JDK 1.6.0_18 have been reports in the class StringUtils.quoteRemarkSQL. This method is now changed.
  • The "small jar" distribution did not include the CompressTool, which was required for some operations. Fixed.
  • The build tool now supports (minimalistic) shell mode, started using ./build.sh -
  • IS NULL comparison with nested queries and linked tables did not work. Example: select * from (select x from test) where x is null.
  • Support for null-safe equals. This includes the ANSI SQL standard syntax A IS [NOT] DISTINCT FROM B as well as the shorter A IS [NOT] B.
  • Primary key violations threw a strange exception message when using a single column INT or BIGINT key.
  • EXPLAIN ANALYZE now also lists the number of pages read from the file.
  • Memory mapped files: There was a bug in version 1.2.139 so that memory mapped files could only be used together with split, for example: split:nioMapped: - the problem is now solved. It is still a good idea to use split:nioMapped: to work around the 2 GB limitation of memory mapped files.
  • Memory mapped files: the system property h2.nioCleanerHack is now disabled by default because it was not always working as expected. Now System.gc() is used in a loop until the buffer is garbage collected. This of course is also not a nice solution, but the only one known to work. See also http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4724038
  • Bugfixes for the automatic 1.1 db migration.
  • If an old 1.1 database file version is found on connect, it is now possible to let the old h2 classes (v 1.2.128) connect to the database. The automatic upgrade .jar file must be present, and the url must contain NO_UPGRADE=TRUE
  • The automatic upgrade temporary script file is now encrypted.

New in H2 Database Engine 1.1.113 (May 21, 2009)

  • Shell tool: the built-in commands EXIT, HELP, ?, LIST, and so on didn't work with a semicolon at the end.
  • JDK 1.5 is now required to build the jar file. However it is still possible to create a jar file for Java 1.4. For details, see buildRelease.sh and buildRelease.bat. As an alternative, compile using JDK 1.5 or 1.6 and use Retrotranslator to create a Java 1.4 version http://retrotranslator.sourceforge.net/).
  • When deleting or updating many rows in a table, the space in the index file was not re-used in the default mode (persistent database, b-tree index, LOG=1). This caused the index file to grow over time. Workarounds were to delete and re-created the index file, alter the table (add a remove a column), or append ;LOG=2 to the database URL. To disable the change, set the system property h2.reuseSpaceBtreeIndex to false.
  • Identifiers with a digit and then a dollar sign didn't work. Example: A1$B.
  • MS SQL Server compatibility: support for linked tables with NVARCHAR, NCHAR, NCLOB, and LONGNVARCHAR.
  • Android: Workaround for a problem when using read-only databases in zip files (skip seems to be implemented incorrectly on the Android system).
  • Calling execute() or prepareStatement() with null as the SQL statement now throws an exception.
  • Benchmark: the number of executed statements was incorrect. The H2 database was loaded at the beginning of the test to collect results, now it is loaded at the very end. Thanks to Fred Toussi from HSQLDB for reporting those problems. However the changed do not affect the relative performance.
  • H2 Console: command line settings are no longer stored in the properties file. They are now only used for the current process, except if they are explicitly saved.
  • Cache: support for a second level soft-references cache. To enable it, append ;CACHE_TYPE=SOFT_LRU (or SOFT_TQ) to the database URL, or set the system property h2.cacheTypeDefault to "SOFT_LRU" / "SOFT_TQ". Enabling the second level cache reduces performance for small databases, but speeds up large databases. It makes sense to use it if the available memory size is unknown. Thanks a lot to Jan Kotek!

New in H2 Database Engine 1.1.111 (Apr 11, 2009)

  • In-memory databases can now run inside the Google App Engine.
  • Queries that are ordered by an indexed column returned no rows in certain cases (if all rows were deleted from the table previously, and there is a low number of rows in the table, and when not using other conditions, and when using the default b tree index).
  • The wrong exception was thrown when using unquoted text for the SQL statements COMMENT, ALTER USER, and SET PASSWORD.
  • The built-in connection pool did not roll back transactions and enable autocommit enabled after closing a connection.
  • Sometimes a StackOverflow occurred when checking for deadlock. See also http://code.google.com/p/h2database/issues/detail?id=61
  • The Shell tool no longer truncates results with only one column, and displays a message if data was truncated.