# Change Log ## Next Version (unreleased) PR #806: Implement setBytes() and setString() with offset and len PR #805: Improve support of TIMESTAMP WITH TIME ZONE PR #803: Use new ArrayList(Collection) and assertThrows() PR #802: Use Arrays.copyOf() and Arrays.copyOfRange() PR #801: Fix NULL support in PgServer for primitive types too PR #800: More fixes in date-time types for ODBC drivers PR #798: Add partial support of DATE, TIME, and TIMESTAMP data types to PgServer PR #799: Use result of ArrayList.remove() PR #797: Add ceilingKey() and floorKey() to TransactionMap (version 2) PR #796: Add MDY to DateStyle in PgServerThread PR #794: Sort files in generated jars PR #793: Change return type of Value.getBoolean() to boolean (unwrapped) PR #792: Inherit classpath from parent process PR #791: Switch to JaCoCo code coverage PR #788: Update lists of keywords PR #789: Map DATE in Oracle mode to ValueTimestamp PR #787: Assorted changes PR #785: Optimize NULL handling in MVSecondaryIndex.add() PR #783: Add Bits implementation for Java 9 and later versions PR #784: Hardcoded port numbers should not be used in unit tests PR #780: Close JavaFileManager after use. PR #782: Leftover shared lock after release PR #781: Locks left behind after commit PR #778: Reduce code duplication PR #775: Fix building of documentation and zip PR #774: Assorted changes PR #773: Better checks for arguments of partial LOB reading methods PR #772: getBinaryStream() and getCharacterStream() with pos and length Issue #754: Make NUMERIC type read as NUMERIC PR #768: Add DataUtils.parseChecksummedMap() PR #769: Do not copy result of DataUtils.parseMap() to a new maps PR #766: Minor clean up of DateTimeUtils PR #764: Make use of try-with-resources statement Issue #406: Return from ResultSet.getObject not in line with JDBC specification Issue #710: Misleading exception message when INSERT has no value for self referential 'AS' column PR #763: Add DataUtils.getMapName() PR #762: Add row deletion confirmation to web console PR #760: Assorted minor optimizations PR #759: Improve the look of error messages in web console PR #758: Allocate less amount of garbage PR #757: Fix handling of UUID in Datatype.readValue() PR #753: Optimize StringUtils.trim() and remove StringUtils.equals() PR #752: Use predefined charsets instead of names where possible PR #750: Use AtomicIntegerArray and StandardCharsets PR #749: Fix some build checks in sources Issue #740: TestWeb hangups if webSSL=true specified in configuration Issue #736: Copyright years in sources Issue #744: TestFile failure on Java 9 and Java 10 PR #741: More cleanups in LocalDateTimeUtils and other minor changes PR #743: Change REGEXP_REPLACE mode for MariaDB and PostgreSQL Issue#646 NPE in CREATE VIEW WITH RECURSIVE & NON_RECURSIVE CTE PR #738: Copy javadoc to *BackwardsCompat to fix building of documentation PR #735: Add support of java.time.Instant V2 PR #733: Remove JPA/ORM configuration txt files as they're already integrated PR #732: Fix == PR #730: Implement enquoteIdentifier() and isSimpleIdentifier() from JDBC 4.3 PR #729: Grammar documentation change PR #727: Integer/Long.compare(x, y) can be used to compare primitive values PR #726: Fixes in tests Issue #725: FilePathMem.tryLock() fails since Java 9 PR #723: Clean up LocalDateTimeUtils PR #724: Use StringBuilder instead of StringBuffer PR #720: DROP TABLE RESTRICT shouldn't drop foreign keys in other tables PR #722: Assorted minor changes Issue #638: Oracle mode: incompatible regexp back-reference syntax Make ALL a reserved keyword Issue #311: Avoid calling list.toArray(new X[list.size()]) for performance PR #715: Better getObject error message PR #714: SecureRandom is already synchronized PR #712: Return properly encoded UUID from SimpleResultSet.getBytes() PR #711: TestFunctions less english dependent Issue #644: Year changing from negative -509 to a positive 510. PR #706: SIGNAL function PR #704: added Javascript support for Triggers' source Issue #694: Oracle syntax for adding NOT NULL constraint not supported. Issue #699: When using an index for sorting, the index is ignored when also using NULLS LAST/FIRST Issue #697: FilePathDisk.newInputStream fails for contextual class loading Issue #695: jdbc:postgresql protocol connection issue in H2 Console Application in case of redshift driver in classpath Fix 'file not closed' when using FILE_READ Fix bug in LinkSchema tool when object exists with same name in different schemas Issue #675: Fix date operations on Locales with non-Gregorian calendars Fix removal of LOB when rolling back transaction on a table containing more than one LOB column. Issue #654: List ENUM type values in INFORMATION_SCHEMA.COLUMNS Issue #650: Simple nested SELECT causes error for table with TIMESTAMP WITH TIMEZONE column Issue #654: List ENUM type values in INFORMATION_SCHEMA.COLUMNS Issue #668: Fail of an update command on large table with ENUM column Issue #662: column called CONSTRAINT is not properly escaped when storing to metadata Issue #660: Outdated java version mentioned on http://h2database.com/html/build.html#providing_patches Issue #643: H2 doesn't use index when I use IN and EQUAL in one query Reset transaction start timestamp on ROLLBACK Issue #632: CREATE OR REPLACE VIEW creates incorrect columns names Issue #630: Integer overflow in CacheLRU can cause unrestricted cache growth Issue #497: Fix TO_DATE in cases of 'inline' text. E.g. the "T" and "Z" in to_date('2017-04-21T00:00:00Z', 'YYYY-MM-DD"T"HH24:MI:SS"Z"') Fix bug in MySQL/ORACLE-syntax silently corrupting the modified column in cases of setting the 'NULL'- or 'NOT NULL'-constraint. E.g. alter table T modify C NULL; Issue #570: MySQL compatibility for ALTER TABLE .. DROP INDEX Issue #537: Include the COLUMN name in message "Numeric value out of range" Issue #600: ROW_NUMBER() behaviour change in H2 1.4.195 Fix a bunch of race conditions found by vmlens.com, thank you to vmlens for giving us a license. PR #597: Support more types in getObject Issue #591: Generated SQL from WITH-CTEs does not include a table identifier PR #593: Make it possible to create a cluster without using temporary files. PR #592: "Connection is broken: "unexpected status 16777216" [90067-192]" message when using older h2 releases as client Issue #585: MySQL mode DELETE statements compatibility PR #586: remove extra tx preparation PR #568: Implement MetaData.getColumns() for synonyms. Issue #581: org.h2.tools.RunScript assumes -script parameter is part of protocol Fix a deadlock in the TransactionStore PR #579: Disallow BLOB type in PostgreSQL mode Issue #576: Common Table Expression (CTE): WITH supports INSERT, UPDATE, MERGE, DELETE, CREATE TABLE ... Issue #493: Query with distinct/limit/offset subquery returns unexpected rows Issue #575: Support for full text search in multithreaded mode Issue #569: ClassCastException when filtering on ENUM value in WHERE clause Issue #539: Allow override of builtin functions/aliases Issue #535: Allow explicit paths on Windows without drive letter Issue #549: Removed UNION ALL requirements for CTE Issue #548: Table synonym support Issue #531: Rollback and delayed meta save. Issue #515: "Unique index or primary key violation" in TestMvccMultiThreaded Issue #458: TIMESTAMPDIFF() test failing. Handling of timestamp literals. PR #546: Fixes the missing file tree.js in the web console Issue #543: Prepare statement with regexp will not refresh parameter after metadata change PR #536: Support TIMESTAMP_WITH_TIMEZONE 2014 JDBC type Fix bug in parsing ANALYZE TABLE xxx SAMPLE_SIZE yyy Add padding for CHAR(N) values in PostgreSQL mode Issue #89: Add DB2 timestamp format compatibility ## Version 1.4.196 (2017-06-10) Issue#479 Allow non-recursive CTEs (WITH statements), patch from stumc Fix startup issue when using "CHECK" as a column name. Issue #423: ANALYZE performed multiple times on one table during execution of the same statement. Issue #426: Support ANALYZE TABLE statement Issue #438: Fix slow logging via SLF4J (TRACE_LEVEL_FILE=4). Issue #472: Support CREATE SEQUENCE ... ORDER as a NOOP for Oracle compatibility Issue #479: Allow non-recursive Common Table Expressions (CTE) On Mac OS X, with IPv6 and no network connection, the Console tool was not working as expected. ## Version 1.4.195 (2017-04-23) Lazy query execution support. Added API for handling custom data types (System property "h2.customDataTypesHandler", API org.h2.api.CustomDataTypesHandler). Added support for invisible columns. Added an ENUM data type, with syntax similar to that of MySQL. MVStore: for object data types, the cache size memory estimation was sometimes far off in a read-only scenario. This could result in inefficient cache usage. ## Version 1.4.194 (2017-03-10) Issue #453: MVStore setCacheSize() should also limit the cacheChunkRef. Issue #448: Newly added TO_DATE and TO_TIMESTAMP functions have wrong datatype. The "nioMemLZF" filesystem now supports an extra option "nioMemLZF:12:" to tweak the size of the compress later cache. Various multi-threading fixes and optimisations to the "nioMemLZF" filesystem. [API CHANGE] #439: the JDBC type of TIMESTAMP WITH TIME ZONE changed from Types.OTHER (1111) to Types.TIMESTAMP_WITH_TIMEZONE (2014) #430: Subquery not cached if number of rows exceeds MAX_MEMORY_ROWS. #411: "TIMEZONE" should be "TIME ZONE" in type "TIMESTAMP WITH TIMEZONE". PR #418, Implement Connection#createArrayOf and PreparedStatement#setArray. PR #427, Add MySQL compatibility functions UNIX_TIMESTAMP, FROM_UNIXTIME and DATE. #429: Tables not found : Fix some Turkish locale bugs around uppercasing. Fixed bug in metadata locking, obscure combination of DDL and SELECT SEQUENCE.NEXTVAL required. Added index hints: SELECT * FROM TEST USE INDEX (idx1, idx2). Add a test case to ensure that spatial index is used with and order by command by Fortin N. Fix multi-threaded mode update exception "NullPointerException", test case by Anatolii K. Fix multi-threaded mode insert exception "Unique index or primary key violation", test case by Anatolii K. Implement ILIKE operator for case-insensitive matching. Optimise LIKE queries for the common cases of '%Foo' and '%Foo%'. Issue #387: H2 MSSQL Compatibility Mode - Support uniqueidentifier. Issue #401: NPE in "SELECT DISTINCT * ORDER BY". Added BITGET function. Fixed bug in FilePathRetryOnInterrupt that caused infinite loop. PR #389, Handle LocalTime with nanosecond resolution, patch by katzyn. PR #382, Recover for "page store" H2 breaks LOBs consistency, patch by vitalus. PR #393, Run tests on Travis, patch by marschall. Fix bug in REGEX_REPLACE, not parsing the mode parameter. ResultSet.getObject(..., Class) threw a ClassNotFoundException if the JTS suite was not in the classpath. File systems: the "cache:" file system, and the compressed in-memory file systems memLZF and nioMemLZF did not correctly support concurrent reading and writing. TIMESTAMP WITH TIMEZONE: serialization for the PageStore was broken. ## Version 1.4.193 (2016-10-31) PR #386: Add JSR-310 Support (introduces JTS dependency fixed in 1.4.194) WARNING: THE MERGE BELOW WILL AFFECT ANY 'TIMESTAMP WITH TIMEZONE' INDEXES. You will need to drop and recreate any such indexes. PR #364: fix compare TIMESTAMP WITH TIMEZONE Fix bug in picking the right index for INSERT..ON DUPLICATE KEY UPDATE when there are both UNIQUE and PRIMARY KEY constraints. Issue #380: Error Analyzer doesn't show source code Remove the "TIMESTAMP UTC" datatype, an experiment that was never finished. PR #363: Added support to define last IDENTIFIER on a Trigger. PR #366: Tests for timestamps PR #361: Improve TimestampWithTimeZone javadoc PR #360: Change getters in TimestampWithTimeZone to int PR #359: Added missing source encoding. Assuming UTF-8. PR #353: Add support for converting JAVA_OBJECT to UUID PR #358: Add support for getObject(int|String, Class) PR #357: Server: use xdg-open to open the WebConsole in the user's preferred browser on Linux PR #356: Support for BEFORE and AFTER clauses when using multiple columns in ALTER TABLE ADD PR #351: Respect format codes from Bind message when sending results ignore summary line when compiling stored procedure PR #348: pg: send RowDescription in response to Describe (statement variant), patch by kostya-sh PR #337: Update russian translation, patch by avp1983 PR #329: Update to servlet API version 3.1.0 from 3.0.1, patch by Mat Booth PR #331: ChangeFileEncryption progress logging ignores -quiet flag, patch by Stefan Bodewig PR #325: Make Row an interface PR #323: Regular expression functions (REGEXP_REPLACE, REGEXP_LIKE) enhancement, patch by Akkuzin Use System.nanoTime for measuring query statistics Issue #324: Deadlock when sending BLOBs over TCP Fix for creating and accessing views in MULTITHREADED mode, test-case courtesy of Daniel Rosenbaum Issue #266: Spatial index not updating, fixed by merging PR #267 PR #302: add support for "with"-subqueries into "join" & "sub-query" statements Issue #299: Nested derived tables did not always work as expected. Use interfaces to replace the java version templating, idea from Lukas Eder. Issue #295: JdbcResultSet.getObject(int, Class) returns null instead of throwing. Mac OS X: Console tool process did not stop on exit. MVStoreTool: add "repair" feature. Garbage collection of unused chunks should be faster still. MVStore / transaction store: opening a store in read-only mode does no longer loop. MVStore: disabled the file system cache by default, because it limits concurrency when using larger databases and many threads. To re-enable, use the file name prefix "cache:". MVStore: add feature to set the cache concurrency. File system nioMemFS: support concurrent reads. File systems: the compressed in-memory file systems now compress better. LIRS cache: improved hit rate because now added entries get hot if they were in the non-resident part of the cache before. ## Version 1.4.192 Beta (2016-05-26) Java 6 is no longer supported (the jar files are compiled for Java 7). Garbage collection of unused chunks should now be faster. Prevent people using unsupported combination of auto-increment columns and clustering mode. Support for DB2 time format, patch by Niklas Mehner Added support for Connection.setClientInfo() in compatibility modes for DB2, Postgresql, Oracle and MySQL. Issue #249: Clarify license declaration in Maven POM xml Fix NullPointerException in querying spatial data through a sub-select. Fix bug where a lock on the SYS table was not released when closing a session that contained a temp table with an LOB column. Issue #255: ConcurrentModificationException with multiple threads in embedded mode and temporary LOBs Issue #235: Anonymous SSL connections fail in many situations Fix race condition in FILE_LOCK=SOCKET, which could result in the watchdog thread not running Experimental support for datatype TIMESTAMP WITH TIMEZONE Add support for ALTER TABLE ... RENAME CONSTRAINT .. TO ... Add support for PostgreSQL ALTER TABLE ... RENAME COLUMN .. TO ... Add support for ALTER SCHEMA [ IF EXISTS ] Add support for ALTER TABLE [ IF EXISTS ] Add support for ALTER VIEW [ IF EXISTS ] Add support for ALTER INDEX [ IF EXISTS ] Add support for ALTER SEQUENCE [ IF EXISTS ] Improve performance of cleaning up temp tables - patch from Eric Faulhaber. Fix bug where table locks were not dropped when the connection closed Fix extra CPU usage caused by query planner enhancement in 1.4.191 improve performance of queries that use LIKE 'foo%' - 10x in the case of one of my queries The function IFNULL did not always return the result in the right data type. Issue #231: Possible infinite loop when initializing the ObjectDataType class when concurrently writing into MVStore. ## Version 1.4.191 Beta (2016-01-21) TO_DATE and TO_TIMESTAMP functions. Thanks a lot to Sam Blume for the patch! Issue #229: DATEDIFF does not work for 'WEEK'. Issue #156: Add support for getGeneratedKeys() when executing commands via PreparedStatement#executeBatch. Issue #195: The new Maven uses a .cmd file instead of a .bat file. Issue #212: EXPLAIN PLAN for UPDATE statement did not display LIMIT expression. Support OFFSET without LIMIT in SELECT. Improve error message for METHOD_NOT_FOUND_1/90087. CLOB and BLOB objects of removed rows were sometimes kept in the database file. Server mode: executing "shutdown" left a thread on the server. The condition "in(select...)" did not work correctly in some cases if the subquery had an "order by". Issue #184: The Platform-independent zip had Windows line endings in Linux scripts. Issue #186: The "script" command did not include sequences of temporary tables. Issue #115: to_char fails with pattern FM0D099. ## Version 1.4.190 Beta (2015-10-11) Pull request #183: optimizer hints (so far without special SQL syntax). Issue #180: In MVCC mode, executing UPDATE and SELECT ... FOR UPDATE simultaneously silently can drop rows. PageStore storage: the cooperative file locking mechanism did not always work as expected (with very slow computers). Temporary CLOB and BLOB objects are now removed while the database is open (and not just when closing the database). MVStore CLOB and BLOB larger than about 25 MB: An exception could be thrown when using the MVStore storage. Add FILE_WRITE function. Patch provided by Nicolas Fortin (Lab-STICC - CNRS UMR 6285 and Ecole Centrale de Nantes)