Issue 467: OSGi Class Loader (ability to create reference to class in other ClassLoader, for example in another OSGi bundle).
@changelog_1004_h2
Version 1.3.173 (2013-07-28)
@changelog_1004_li
@changelog_1005_li
Support empty statements that just contains a comment.
@changelog_1005_li
@changelog_1006_li
Server mode: if there was an error while reading from a LOB, the session was closed in some cases.
@changelog_1006_li
@changelog_1007_li
Issue 463: Driver name and version are now the same in OsgiDataSourceFactory and JdbcDatabaseMetaData.
@changelog_1007_li
@changelog_1008_li
JaQu: The data type VARCHAR is now (again) used for Strings (no longer TEXT, except when explicitly set).
@changelog_1008_li
@changelog_1009_li
For in-memory databases, creating an index on a CLOB or BLOB column is no longer supported. This is to simplify the MVTableEngine.
@changelog_1009_li
@changelog_1010_li
New column "information_schema.tables.row_count_estimate".
@changelog_1010_li
@changelog_1011_li
Issue 468: trunc(timestamp) could return the wrong value (+12 hours), and trunc(number) throw a NullPointerException.
@changelog_1011_li
@changelog_1012_li
The expression trunc(number) threw a NullPointerException.
@changelog_1012_li
@changelog_1013_li
Fixed a deadlock when updating LOB's concurrently. See TestLob.testDeadlock2().
@changelog_1013_li
@changelog_1014_li
Fixed a deadlock related to very large temporary result sets.
@changelog_1014_li
@changelog_1015_li
Add "-list" command line option to Shell tool so that result-list-mode can be triggered when reading from a file.
@changelog_1015_li
@changelog_1016_li
Issue 474: H2 MySQL Compatibility code fails to ignore "COMMENT" in CREATE TABLE, patch from Aaron Azeckoski.
@changelog_1016_li
@changelog_1017_li
Issue 476: Broken link in jaqu.html
@changelog_1017_li
@changelog_1018_li
Fix potential UTF8 encoding issue in org.h2.store.FileStore, reported by Juerg Spiess.
@changelog_1018_li
@changelog_1019_li
Improve error message when check constraint is broken, test case from Gili (cowwoc).
@changelog_1019_li
@changelog_1020_li
Improve error message when we have a unique constraint violation, displays the offending key in the error message.
@changelog_1020_li
@changelog_1021_li
Issue 478: Support for "SHOW TRANSACTION ISOLATION LEVEL", patch from Andrew Franklin.
@changelog_1021_li
@changelog_1022_li
Issue 475: PgServer: add support for CancelRequest, patch from Andrew Franklin.
@changelog_1022_li
@changelog_1023_li
Issue 473: PgServer missing -key option, patch from Andrew Franklin.
@changelog_1023_li
@changelog_1024_li
Issue 471: CREATE VIEW does not check user rights, patch from Andrew Franklin.
@changelog_1024_li
@changelog_1025_li
Issue 477: PgServer binary transmission of query params is unimplemented, patch from Andrew Franklin.
@changelog_1025_li
@changelog_1026_li
Issue 479: Support for SUBSTRING without a FROM condition, patch from Andrew Franklin.
@changelog_1026_li
@changelog_1027_li
Issue 472: PgServer does not work with any recent Postgres JDBC driver, patch from Andrew Franklin.
@changelog_1027_li
@changelog_1028_li
Add syntax for passing additional parameters into custom TableEngine implementations.
@changelog_1028_li
@changelog_1029_li
Issue 480: Bugfix post issue 475, 477, patch from Andrew Franklin.
@changelog_1029_li
@changelog_1030_li
Issue 481: Further extensions to PgServer to support better support PG JDBC, patch from Andrew Franklin.
@changelog_1030_li
@changelog_1031_li
Add support for spatial datatype GEOMETRY.
@changelog_1031_li
@changelog_1032_li
Add support for in-memory spatial index.
@changelog_1032_li
@changelog_1033_li
change the PageStore#changeCount field from an int to a long, to cope with databases with very high transaction rates.
@changelog_1033_li
@changelog_1034_li
Fix a NullPointerException when attempting to add foreign key reference to a view.
@changelog_1034_li
@changelog_1035_li
Add sufficient ClientInfo support to our javax.sql.Connection implementation to make WebSphere happy.
@changelog_1035_li
@changelog_1036_li
Issue 482: class LobStorageBackend$LobInputStream does not override the method InputStream.available().
@changelog_1036_li
@changelog_1037_li
Fix corruption resulting from a mix of the "WRITE_DELAY=0" option and "SELECT DISTINCT" queries that don't fit in memory.
@changelog_1037_li
@changelog_1038_li
Fix the combination of updating a table which contains an LOB, and reading from the LOB at the same time. Previously it would throw an exception, now it works.
@changelog_1038_li
@changelog_1039_li
Issue 484: In the H2 Console tool, all schemas starting with "INFO" where hidden. Now they are hidden only if the database is not H2. Patch from "mgcodeact"/"cumer d"
@changelog_1039_li
@changelog_1040_li
MySQL compatibility, support the "AUTO_INCREMENT=3" part of the CREATE TABLE statement.
@changelog_1040_li
@changelog_1041_li
Issue 486: MySQL compatibility, support the "DEFAULT CHARSET" part of the CREATE TABLE statement.
@changelog_1041_li
@changelog_1042_li
Issue 487: support the MySQL "SET foreign_key_checks = 0" command
@changelog_1042_li
@changelog_1043_li
Issue 490: support MySQL "USING BTREE" index declaration
@changelog_1043_li
@changelog_1044_li
Issue 485: Database get corrupted when column is renamed for which check constraint was defined inside create table statement.
@changelog_1044_li
@changelog_1045_li
Issue 499: support MySQL "UNIQUE KEY (ID) USING BTREE" constraint syntax
@changelog_1045_li
@changelog_1046_li
Issue 501: "CREATE TABLE .. WITH" not serialized, patch from nico.devel
@changelog_1046_li
@changelog_1047_li
Avoid problems with runtime-compiled ALIAS methods when people have set the JAVA_TOOL_OPTIONS environment variable.
@changelog_1047_h2
@changelog_1048_h2
Version 1.3.172 (2013-05-25)
@changelog_1048_li
@changelog_1049_li
Referential integrity: when adding a referential integrity constraint failed, and if creating the constraint automatically created an index, this index was not removed.
@changelog_1049_li
@changelog_1050_li
The auto-analyze feature now only reads 1000 rows per table instead of 10000.
@changelog_1050_li
@changelog_1051_li
The optimization for IN(...) queries combined with OR could result in a strange exception of the type "column x must be included in the group by list".
@changelog_1051_li
@changelog_1052_li
Issue 454: Use Charset for type-safety.
@changelog_1052_li
@changelog_1053_li
Queries with both LIMIT and OFFSET could throw an IllegalArgumentException.
@changelog_1053_li
@changelog_1054_li
MVStore: multiple issues were fixed: 460, 461, 462, 464, 466.
@changelog_1054_li
@changelog_1055_li
MVStore: larger stores (multiple GB) are now much faster.
@changelog_1055_li
@changelog_1056_li
When using local temporary tables and not dropping them manually before closing the session, and then killing the process could result in a database that couldn't be opened (except when using the recover tool).
@changelog_1056_li
@changelog_1057_li
Support TRUNC(timestamp) for improved Oracle compatibility.
@changelog_1057_li
@changelog_1058_li
Add support for CREATE TABLE TEST (ID BIGSERIAL) for PostgreSQL compatibility. Patch from Jesse Long.
@changelog_1058_li
@changelog_1059_li
Add new collation command SET BINARY_COLLATION UNSIGNED, helps with people testing BINARY columns in MySQL mode.
@changelog_1059_li
@changelog_1060_li
Issue 453: ABBA race conditions in TABLE LINK connection sharing.
@changelog_1060_li
@changelog_1061_li
Issue 449: Postgres Serial data type should not automatically be marked as primary key
@changelog_1061_li
@changelog_1062_li
Issue 406: Support "select h2version()"
@changelog_1062_li
@changelog_1063_li
Issue 389: When there is a multi-column primary key, H2 does not seem to always pick the right index
@changelog_1063_li
@changelog_1064_li
Issue 305: Implement SELECT ... FOR FETCH ONLY
@changelog_1064_li
@changelog_1065_li
Issue 274: Sybase/MSSQLServer compatibility - Add GETDATE and CHARINDEX system functions
@changelog_1065_li
@changelog_1066_li
Issue 274: Sybase/MSSQLServer compatibility - swap parameters of CONVERT function.
@changelog_1066_li
@changelog_1067_li
Issue 274: Sybase/MSSQLServer compatibility - support index clause e.g. "select * from test (index table1_index)"
@changelog_1067_li
@changelog_1068_li
Fix bug in Optimizing SELECT * FROM A WHERE X=1 OR X=2 OR X=3 into SELECT * FROM A WHERE X IN (1,2,3)
@changelog_1068_li
@changelog_1069_li
Issue 442: Groovy patch for SourceCompiler (function ALIAS)
@changelog_1069_li
@changelog_1070_li
Issue 459: Improve LOB documentation
@changelog_1070_h2
@changelog_1071_h2
Version 1.3.171 (2013-03-17)
@changelog_1071_li
@changelog_1072_li
Security: the TCP server did not correctly restrict access rights of clients in some cases. This was specially a problem when using the flag "tcpAllowOthers".
@changelog_1072_li
@changelog_1073_li
H2 Console: the session timeout can now be configured using the system property "h2.consoleTimeout".
@changelog_1073_li
@changelog_1074_li
Issue 431: Improved compatibility with MySQL: support for "ENGINE=InnoDB charset=UTF8" when creating a table.
@changelog_1074_li
@changelog_1075_li
Issue 249: Improved compatibility with MySQL in the MySQL mode: now the methods DatabaseMetaData methods stores*Case*Identifiers return the same as MySQL when using the MySQL mode.
@changelog_1075_li
@changelog_1076_li
Issue 434: H2 Console didn't work in the Chrome browser due to a wrong viewport argument.
@changelog_1076_li
@changelog_1077_li
There was a possibility that the .lock.db file was not deleted when the database was closed, which could slow down opening the database.
@changelog_1077_li
@changelog_1078_li
The SQL script generated by the "script" command contained inconsistent newlines on Windows.
@changelog_1078_li
@changelog_1079_li
When using trace level 4 (SLF4J) in the server mode, a directory "trace.db" and an empty file was created on the client side. This is no longer made.
@changelog_1079_li
@changelog_1080_li
Optimize IN(...) queries: there was a bug in version 1.3.170 if the type of the left hand side didn't match the type of the right hand side. Fixed.
@changelog_1080_li
@changelog_1081_li
Optimize IN(...) queries: there was a bug in version 1.3.170 for comparison of the type "X IN(NULL, NULL)". Fixed.
@changelog_1081_li
@changelog_1082_li
Timestamps with timezone that were passed as a string were not always converted correctly. For example "2012-11-06T23:00:00.000Z" was converted to "2012-11-06" instead of to "2012-11-07" in the timezone CET. Thanks a lot to Steve Hruda for reporting the problem!
@changelog_1082_li
@changelog_1083_li
New table engine "org.h2.mvstore.db.MVTableEngine" that internally uses the MVStore to persist data. To try it out, append ";DEFAULT_TABLE_ENGINE=org.h2.mvstore.db.MVTableEngine" to the database URL. This is still very experimental, and many features are not supported yet. The data is stored in a file with the suffix ".mv.db".
@changelog_1083_li
@changelog_1084_li
New connection setting "DEFAULT_TABLE_ENGINE" to use a specific table engine if none is set explicitly. This is to simplify testing the MVStore table engine.
@changelog_1084_li
@changelog_1085_li
MVStore: encrypted stores are now supported. Only standardized algorithms are used: PBKDF2, SHA-256, XTS-AES, AES-128.
@changelog_1085_li
@changelog_1086_li
MVStore: improved API thanks to Simo Tripodi.
@changelog_1086_li
@changelog_1087_li
MVStore: maps can now be renamed.
@changelog_1087_li
@changelog_1088_li
MVStore: store the file header also at the end of each chunk, which results in a further reduced number of write operations.
@changelog_1088_li
@changelog_1089_li
MVStore: a map implementation that supports concurrent operations.
@changelog_1089_li
@changelog_1090_li
MVStore: unified exception handling; the version is included in the messages.
@changelog_1090_li
@changelog_1091_li
MVStore: old data is now retained for 45 seconds by default.
@changelog_1091_li
@changelog_1092_li
MVStore: compress is now disabled by default, and can be enabled on request.
@changelog_1092_li
@changelog_1093_li
Support ALTER TABLE ADD ... AFTER. Patch from Andrew Gaul (argaul at gmail.com). Fixes issue 401.
@changelog_1093_li
@changelog_1094_li
Improved OSGi support. H2 now registers itself as a DataSourceFactory service. Fixes issue 365.
@changelog_1094_li
@changelog_1095_li
Add a DISK_SPACE_USED system function. Fixes issue 270.
@changelog_1095_li
@changelog_1096_li
Fix a compile-time ambiguity when compiling with JDK7, thanks to a patch from Lukas Eder.
@changelog_1096_li
@changelog_1097_li
Supporting dropping an index for Lucene full-text indexes.
@changelog_1097_li
@changelog_1098_li
Optimized performance for SELECT ... ORDER BY X LIMIT Y OFFSET Z queries for in-memory databases using partial sort (by Sergi Vladykin).
@changelog_1098_li
@changelog_1099_li
Experimental off-heap memory storage engine "nioMemFS:" and "nioMemLZF:", suggestion from Mark Addleman.
@changelog_1099_li
@changelog_1100_li
Issue 438: JdbcDatabaseMetaData.getSchemas() is no longer supported as of 1.3.169.
@changelog_1100_li
@changelog_1101_li
MySQL compatibility: support for ALTER TABLE tableName MODIFY [COLUMN] columnName columnDef. Patch from Ville Koskela.
@changelog_1101_li
@changelog_1102_li
Issue 404: SHOW COLUMNS FROM tableName does not work with ALLOW_LITERALS=NUMBERS.
@changelog_1102_li
@changelog_1103_li
Throw an explicit error to make it clear we don't support the TRIGGER combination of SELECT and FOR EACH ROW.
@changelog_1103_li
@changelog_1104_li
Issue 439: Utils.sortTopN does not handle single-element arrays.
@changelog_1104_h2
@changelog_1105_h2
Version 1.3.170 (2012-11-30)
@changelog_1105_li
@changelog_1106_li
Issue 407: The TriggerAdapter didn't work with CLOB and BLOB columns.
@changelog_1106_li
@changelog_1107_li
PostgreSQL compatibility: support for data types BIGSERIAL and SERIAL as an alias for AUTO_INCREMENT.
@changelog_1107_li
@changelog_1108_li
Issue 417: H2 Console: the web session timeout didn't work, resulting in a memory leak. This was only a problem if the H2 Console was run for a long time and many sessions were opened.
@changelog_1108_li
@changelog_1109_li
Issue 412: Running the Server tool with just the option "-browser" will now log a warning.
@changelog_1109_li
@changelog_1110_li
Issue 411: CloseWatcher registration was not concurrency-safe.
@changelog_1110_li
@changelog_1111_li
MySQL compatibility: support for CONCAT_WS. Thanks a lot to litailang for the patch!
@changelog_1111_li
@changelog_1112_li
PostgreSQL compatibility: support for EXTRACT(WEEK FROM dateColumn). Thanks to Prashant Bhat for the patch!
@changelog_1112_li
@changelog_1113_li
Fix for a bug where we would sometimes use the wrong unique constraint to validate foreign key constraints.
@changelog_1113_li
@changelog_1114_li
Support BOM at the beginning of files for the RUNSCRIPT command
@changelog_1114_li
@changelog_1115_li
Fix in calling SET @X = IDENTITY() where it would return NULL incorrectly
@changelog_1115_li
@changelog_1116_li
Fix ABBA deadlock between adding a constraint and the H2-Log-Writer thread.
@changelog_1116_li
@changelog_1117_li
Optimize IN(...) queries where the values are constant and of the same type.
@changelog_1117_li
@changelog_1118_li
Restore tool: the parameter "quiet" was not used and is now removed.
@changelog_1118_li
@changelog_1119_li
Fix ConcurrentModificationException when creating tables and executing SHOW TABLES in parallel. Reported by Viktor Voytovych.
@changelog_1119_li
@changelog_1120_li
Serialization is now pluggable using the system property "h2.javaObjectSerializer". Thanks to Sergi Vladykin for the patch!
@changelog_1120_h2
@changelog_1121_h2
Version 1.3.169 (2012-09-09)
@changelog_1121_li
@changelog_1122_li
The default jar file is now compiled for Java 6.
@changelog_1122_li
@changelog_1123_li
The new jar file will probably not end up in the central Maven repository in the next few weeks because Sonatype has disabled automatic synchronization from SourceForge (which they call 'legacy sync' now). It will probably take some time until this is sorted out. The H2 jar files are deployed to http://h2database.com/m2-repo/com/h2database/h2/maven-metadata.xml and http://hsql.sourceforge.net/m2-repo/com/h2database/h2/maven-metadata.xml as usual.
@changelog_1123_li
@changelog_1124_li
A part of the documentation and the H2 Console has been changed to support the Apple retina display.
@changelog_1124_li
@changelog_1125_li
The CreateCluster tool could not be used if the source database contained a CLOB or BLOB. The root cause was that the TCP server did not synchronize on the session, which caused a problem when using the exclusive mode.
@changelog_1125_li
@changelog_1126_li
Statement.getQueryTimeout(): only the first call to this method will query the database. If the query timeout was changed in another way than calling setQueryTimeout, this method will always return the last value. This was changed because Hibernate calls getQueryTimeout() a lot.
@changelog_1126_li
@changelog_1127_li
Issue 416: PreparedStatement.setNString throws AbstractMethodError. All implemented JDBC 4 methods that don't break compatibility with Java 5 are now included in the default jar file.
@changelog_1127_li
@changelog_1128_li
Issue 414: for some functions, the parameters were evaluated twice (for example "char(nextval(..))" ran "nextval(..)" twice).
@changelog_1128_li
@changelog_1129_li
The ResultSetMetaData methods getSchemaName and getTableName could return null instead of "" (an empty string) as specified in the JDBC API.
@changelog_1129_li
@changelog_1130_li
Added compatibility for "SET NAMES" query in MySQL compatibility mode.
@changelog_1130_h2
@changelog_1131_h2
Version 1.3.168 (2012-07-13)
@changelog_1131_li
@changelog_1132_li
The message "Transaction log could not be truncated" was sometimes written to the .trace.db file even if there was no problem truncating the transaction log.
@changelog_1132_li
@changelog_1133_li
New system property "h2.serializeJavaObject" (default: true) that allows to disable serializing Java objects, so that the objects compareTo and toString methods can be used.
@changelog_1133_li
@changelog_1134_li
Dylan has translated the H2 Console tool to Korean. Thanks a lot!
@changelog_1134_li
@changelog_1135_li
Executing the statement CREATE INDEX IF ALREADY EXISTS if the index already exists no longer fails for a read only database.
@changelog_1135_li
@changelog_1136_li
MVCC: concurrently updating a row could result in the row to appear deleted in the second connection, if there are multiple unique indexes (or a primary key and at least one unique index). Thanks a lot to Teruo for the patch!
@changelog_1136_li
@changelog_1137_li
Fulltext search: in-memory Lucene indexes are now supported.
@changelog_1137_li
@changelog_1138_li
Fulltext search: UUID primary keys are now supported.
@changelog_1138_li
@changelog_1139_li
Apache Tomcat 7.x will now longer log a warning when unloading the web application, if using a connection pool.
@changelog_1139_li
@changelog_1140_li
H2 Console: support the Midori browser (for Debian / Raspberry Pi)
@changelog_1140_li
@changelog_1141_li
When opening a remote session, don't open a temporary file if the trace level is set to zero
@changelog_1141_li
@changelog_1142_li
Use HMAC for authenticating remote LOB id's, removing the need for maintaining a cache, and removing the limit on the number of LOBs per result set.
@changelog_1142_li
@changelog_1143_li
H2 Console: HTML and XML documents can now be edited in an updatable result set. There is (limited) support for editing multi-line documents.
@changelog_1143_h2
@changelog_1144_h2
Version 1.3.167 (2012-05-23)
@changelog_1144_li
@changelog_1145_li
H2 Console: when editing a row, an empty varchar column was replaced with a single space.
@changelog_1145_li
@changelog_1146_li
Lukas Eder has updated the jOOQ documentation.
@changelog_1146_li
@changelog_1147_li
Some nested joins could not be executed, for example: select * from (select * from (select * from a) a right join b b) c;
@changelog_1147_li
@changelog_1148_li
MS SQL Server compatibility: ISNULL is now an alias for IFNULL.
@changelog_1148_li
@changelog_1149_li
Terrence Huang has completed the translation of the H2 Console tool to Chinese. Thanks a lot!
@changelog_1149_li
@changelog_1150_li
Server mode: the number of CLOB / BLOB values that were cached on the server is now the maximum of: 5 times the SERVER_RESULT_SET_FETCH_SIZE (which is 100 by default), and SysProperties.SERVER_CACHED_OBJECTS.
@changelog_1150_li
@changelog_1151_li
In the trace file, the query execution time was incorrect in some cases, specially for the statement SET TRACE_LEVEL_FILE 2.
@changelog_1151_li
@changelog_1152_li
The feature LOG_SIZE_LIMIT that was introduced in version 1.3.165 did not always work correctly (specially with regards to multithreading) and has been removed. The message "Transaction log could not be truncated" is still written to the .trace.db file if required.
@changelog_1152_li
@changelog_1153_li
Then reading from a resource using the prefix "classpath:", the ContextClassLoader is now used if the resource can't be read otherwise.
@changelog_1153_li
@changelog_1154_li
DatabaseEventListener now calls setProgress whenever a statement starts and ends.
@changelog_1154_li
@changelog_1155_li
DatabaseEventListener now calls setProgress periodically while a statement is running.
@changelog_1155_li
@changelog_1156_li
The table INFORMATION_SCHEMA.FUNCTION_ALIASES now includes a column TYPE_NAME.
@changelog_1156_li
@changelog_1157_li
Issue 378: when using views, the wrong values were bound to a parameter in some cases.
@changelog_1157_li
@changelog_1158_li
Terrence Huang has translated the error messages to Chinese. Thanks a lot!
@changelog_1158_li
@changelog_1159_li
TRUNC was added as an alias for TRUNCATE.
@changelog_1159_li
@changelog_1160_li
Small optimisation for accessing result values by column name.
@changelog_1160_li
@changelog_1161_li
Fix for bug in Statement.getMoreResults(int)
@changelog_1161_li
@changelog_1162_li
The SCRIPT statements now supports filtering by schema and table. Thanks a lot to Jacob Qvortrup for providing the patch!
@changelog_1162_h2
@changelog_1163_h2
Version 1.3.166 (2012-04-08)
@changelog_1163_li
@changelog_1164_li
Indexes on column that are larger than half the page size (wide indexes) could sometimes get corrupt, resulting in an ArrayIndexOutOfBoundsException in PageBtree.getRow or "Row not found" in PageBtreeLeaf. Also, such indexes used too much disk space.
@changelog_1164_li
@changelog_1165_li
Server mode: when retrieving more than 64 rows each containing a CLOB or BLOB, the error message "The object is already closed" was thrown.
@changelog_1165_li
@changelog_1166_li
ConvertTraceFile: the time in the trace file is now parsed as a long.
@changelog_1166_li
@changelog_1167_li
Invalid connection settings are now detected.
@changelog_1167_li
@changelog_1168_li
Issue 387: WHERE condition getting pushed into sub-query with LIMIT.
@changelog_1168_h2
@changelog_1169_h2
Version 1.3.165 (2012-03-18)
@changelog_1169_li
@changelog_1170_li
Better string representation for decimal values (for example 0.00000000 instead of 0E-26).
@changelog_1170_li
@changelog_1171_li
Prepared statements could only be re-used if the same data types were used the second time they were executed.
@changelog_1171_li
@changelog_1172_li
In error messages about referential constraint violation, the values are now included.
@changelog_1172_li
@changelog_1173_li
SCRIPT and RUNSCRIPT: the password can now be set using a prepared statement. Previously, it was required to be a literal in the SQL statement.
@changelog_1173_li
@changelog_1174_li
MySQL compatibility: SUBSTR with a negative start index now works like MySQL.
@changelog_1174_li
@changelog_1175_li
When enabling autocommit, the transaction is now committed (as required by the JDBC API).
@changelog_1175_li
@changelog_1176_li
The shell script <code>h2.sh</code> did not work with spaces in the path. It also works now with quoted spaces in the argument list. Thanks a lot to Shimizu Fumiyuki for the patch!
@changelog_1176_li
@changelog_1177_li
If the transaction log could not be truncated because of an uncommitted transaction, now "Transaction log could not be truncated" is written to the .trace.db file. Before, the database file was growing and it was hard to find out what the root cause was. To avoid the database file from growing, a new feature to automatically rollback the oldest transaction is available now. To enable it, append ;LOG_SIZE_LIMIT=32 to the database URL (in that case, the oldest session is rolled back if the transaction log is 32 MB).
@changelog_1177_li
@changelog_1178_li
ALTER TABLE ADD can now add more than one column at a time.
@changelog_1178_li
@changelog_1179_li
Issue 380: ALTER TABLE ADD FOREIGN KEY with an explicit index didn't verify the index can be used, which would lead to a NullPointerException later on.
@changelog_1179_li
@changelog_1180_li
Issue 384: the wrong kind of exception (NullPointerException) was thrown in a UNION query with an incorrect ORDER BY expression.
@changelog_1180_li
@changelog_1181_li
Issue 362: support LIMIT in UPDATE statements.
@changelog_1181_li
@changelog_1182_li
Browser: if no default browser is set, Google Chrome is now used if available. If not available, then Konqueror, Netscape, or Opera is used if available (as before).
@changelog_1182_li
@changelog_1183_li
CSV tool: new feature to disable writing the column header (option writeColumnHeader).
@changelog_1183_li
@changelog_1184_li
CSV tool: new feature to preserve the case sensitivity of column names (option caseSensitiveColumnNames).
@changelog_1184_li
@changelog_1185_li
PostgreSQL compatibility: LOG(x) is base 10 in the PostgreSQL mode.
@cheatSheet_1000_h1
...
...
@@ -6899,7 +6902,7 @@ The tool is very modular. It supports pluggable data types / serialization, plug
Example Code
@mvstore_1033_p
The following sample code show how to create a store, open a map, add some data, and access the current and an old version:
The following sample code show how to use the tool:
@mvstore_1034_h2
Store Builder
...
...
@@ -6908,73 +6911,73 @@ Store Builder
The <code>MVStore.Builder</code> provides a fluid interface to build a store if more complex configuration options are used. The following code contains all supported configuration options:
@mvstore_1036_li
cacheSizeMB: the cache size in MB.
backgroundExceptionListener: a listener for exceptions that could occur while writing in the background.
@mvstore_1037_li
compressData: compress the data when storing.
cacheSize: the cache size in MB.
@mvstore_1038_li
encryptionKey: the encryption key for file encryption.
compressData: compress the data when storing.
@mvstore_1039_li
fileName: the name of the file, for file based stores.
encryptionKey: the encryption key for file encryption.
@mvstore_1040_li
readOnly: open the file in read-only mode.
fileName: the name of the file, for file based stores.
@mvstore_1041_li
writeBufferSize: the size of the write buffer in MB.
pageSplitSize: the point where pages are split.
@mvstore_1042_li
writeDelay: the maximum delay until committed changes are stored (unless stored explicitly).
readOnly: open the file in read-only mode.
@mvstore_1043_h2
@mvstore_1043_li
writeBufferSize: the size of the write buffer in MB.
@mvstore_1044_li
writeDelay: the maximum delay in milliseconds until committed changes are stored in the background.
@mvstore_1045_h2
R-Tree
@mvstore_1044_p
@mvstore_1046_p
The <code>MVRTreeMap</code> is an R-tree implementation that supports fast spatial queries. It can be used as follows:
@mvstore_1045_p
@mvstore_1047_p
The default number of dimensions is 2. To use a different number of dimensions, call <code>new MVRTreeMap.Builder<String>().dimensions(3)</code>. The minimum number of dimensions is 1, the maximum is 255.
@mvstore_1046_h2
@mvstore_1048_h2
Features
@mvstore_1047_h3
@mvstore_1049_h3
Maps
@mvstore_1048_p
Each store supports a set of named maps. A map is sorted by key, and supports the common lookup operations, including access to the first and last key, iterate over some or all keys, and so on.
@mvstore_1049_p
Also supported, and very uncommon for maps, is fast index lookup: the keys of the map can be accessed like a list (get the key at the given index, get the index of a certain key). That means getting the median of two keys is trivial, and range of keys can be counted very quickly. The iterator supports fast skipping. This is possible because internally, each map is organized in the form of a counted B+-tree.
@mvstore_1050_p
In database terms, a map can be used like a table, where the key of the map is the primary key of the table, and the value is the row. A map can also represent an index, where the key of the map is the key of the index, and the value of the map is the primary key of the table (for non-unique indexes, the key of the map must also contain the primary key).
Each store contains a set of named maps. A map is sorted by key, and supports the common lookup operations, including access to the first and last key, iterate over some or all keys, and so on.
@mvstore_1051_h3
Versions
@mvstore_1051_p
Also supported, and very uncommon for maps, is fast index lookup: the entries of the map can be be efficiently accessed like a random-access list (get the entry at the given index), and the index of a key can be calculated efficiently. That also means getting the median of two keys is very fast, and a range of keys can be counted very quickly. The iterator supports fast skipping. This is possible because internally, each map is organized in the form of a counted B+-tree.
@mvstore_1052_p
Multiple versions are supported. A version is a snapshot of all the data of all maps at a given point in time. A transaction is a number of actions between two versions.
In database terms, a map can be used like a table, where the key of the map is the primary key of the table, and the value is the row. A map can also represent an index, where the key of the map is the key of the index, and the value of the map is the primary key of the table (for non-unique indexes, the key of the map must also contain the primary key).
@mvstore_1053_p
Versions are not immediately persisted; instead, only the version counter is incremented. If there is a change after switching to a new version, a snapshot of the old version is kept in memory, so that it can still be read.
@mvstore_1053_h3
Versions
@mvstore_1054_p
Old persisted versions are readable until the old data was explicitly overwritten. Creating a snapshot is fast: only the pages that are changed after a snapshot are copied. This behavior is also called COW (copy on write).
Multiple versions are supported. A version is a snapshot of all the data of all maps at a given point in time. Versions are not immediately persisted; instead, only the version counter is incremented. If there is a change after switching to a new version, a snapshot of the old version is kept in memory, so that it can still be read. Old persisted versions are readable until the old data was explicitly overwritten. Creating a snapshot is fast: only the pages that are changed after a snapshot are copied. This behavior is also called COW (copy on write). Rollback is supported (rollback to any old in-memory version or an old persisted version).
@mvstore_1055_p
Rollback is supported (rollback to any old in-memory version or an old persisted version).
The following sample code show how to create a store, open a map, add some data, and access the current and an old version:
@mvstore_1056_h3
Transactions
@mvstore_1057_p
The multi-version support is the basis for the transaction support. In the simple case, when only one transaction is open at a time, rolling back the transaction only requires to revert to an old version.
To support multiple concurrent open transactions, a transaction utility is included, the <code>TransactionStore</code>. The tool supports PostgreSQL style "read committed" transaction isolation with savepoints, two-phase commit, and other features typically available in a database. There is no limit on the size of a transaction (the log is written to disk for large or long running transactions).
@mvstore_1058_p
To support multiple concurrent open transactions, a transaction utility is included, the <code>TransactionStore</code>. This utility stores the changed entries in a separate map, similar to a transaction log (except that only the key of a changed row is stored, and the entries of a transaction are removed when the transaction is committed). The storage overhead of this utility is very small compared to the overhead of a regular transaction log. The tool supports PostgreSQL style "read committed" transaction isolation. There is no limit on the size of a transaction (the log is not kept in memory). The tool supports savepoints, two-phase commit, and other features typically available in a database.
Internally, this utility stores the old versions of changed entries in a separate map, similar to a transaction log (except that entries of a closed transaction are removed, and the log is usually not stored for short transactions). For common use cases, the storage overhead of this utility is very small compared to the overhead of a regular transaction log.
@mvstore_1059_h3
In-Memory Performance and Usage
...
...
@@ -6983,7 +6986,7 @@ In-Memory Performance and Usage
Performance of in-memory operations is comparable with <code>java.util.TreeMap</code> (many operations are actually faster), but usually slower than <code>java.util.HashMap</code>.
@mvstore_1061_p
The memory overhead for large maps is slightly better than for the regular map implementations, but there is a higher overhead per map. For maps with less than 25 entries, the regular map implementations use less memory on average.
The memory overhead for large maps is slightly better than for the regular map implementations, but there is a higher overhead per map. For maps with less than about 25 entries, the regular map implementations need less memory.
@mvstore_1062_p
If no file name is specified, the store operates purely in memory. Except for persisting data, all features are supported in this mode (multi-versioning, index lookup, R-tree and so on). If a file name is specified, all operations occur in memory (with the same performance characteristics) until data is persisted.
...
...
@@ -7004,174 +7007,168 @@ Pluggable Data Types
BLOB Support
@mvstore_1068_p
There is a mechanism that stores large binary objects by splitting them into smaller blocks. This allows to store objects that don't fit in memory. Streaming as well as random access reads on such objects are supported. This tool is written on top of the store (only using the map interface).
There is a mechanism that stores large binary objects by splitting them into smaller blocks. This allows to store objects that don't fit in memory. Streaming as well as random access reads on such objects are supported. This tool is written on top of the store, using only the map interface.
@mvstore_1069_h3
R-Tree and Pluggable Map Implementations
@mvstore_1070_p
The map implementation is pluggable. In addition to the default <code>MVMap</code> (multi-version map), there is a multi-version R-tree map implementation for spatial operations (contain and intersection; nearest neighbor is not yet implemented).
The map implementation is pluggable. In addition to the default <code>MVMap</code> (multi-version map), there is a map that supports concurrent write operations, and a multi-version R-tree map implementation for spatial operations.
@mvstore_1071_h3
Concurrent Operations and Caching
@mvstore_1072_p
The default map implementation supports concurrent reads on old versions of the data. All such read operations can occur in parallel. Concurrent reads from the page cache, as well as concurrent reads from the file system are supported.
The default map implementation supports concurrent reads on old versions of the data. All such read operations can occur in parallel. Concurrent reads from the page cache, as well as concurrent reads from the file system are supported. Writing changes to the file can occur concurrently to modifying the data, as writing operates on a snapshot.
@mvstore_1073_p
Storing changes can occur concurrently to modifying the data, as it operates on a snapshot.
@mvstore_1074_p
Caching is done on the page level. The page cache is a concurrent LIRS cache, which should be resistant against scan operations.
@mvstore_1075_p
@mvstore_1074_p
The default map implementation does not support concurrent modification operations on a map (the same as <code>HashMap</code> and <code>TreeMap</code>). Similar to those classes, the map tries to detect concurrent modification.
@mvstore_1076_p
@mvstore_1075_p
With the <code>MVMapConcurrent</code> implementation, read operations even on the newest version can happen concurrently with all other operations, without risk of corruption. This comes with slightly reduced speed in single threaded mode, the same as with other <code>ConcurrentHashMap</code> implementations. Write operations first read the relevant area from disk to memory (this can happen concurrently), and only then modify the data. The in-memory part of write operations is synchronized.
@mvstore_1077_p
@mvstore_1076_p
For fully scalable concurrent write operations to a map (in-memory and to disk), the map could be split into multiple maps in different stores ('sharding'). The plan is to add such a mechanism later when needed.
@mvstore_1078_h3
@mvstore_1077_h3
Log Structured Storage
@mvstore_1078_p
Internally, changes are buffered in memory, and once enough changes have accumulated, they are written in one continuous disk write operation. (According to a test, write throughput of a common SSD increases with write block size, until a block size of 2 MB, and then does not further increase.) By default, committed changes are automatically written once every second in a background thread, even if only little data was changed. Changes can also be written explicitly by calling <code>store()</code>. To avoid running out of memory, uncommitted changes are also written when needed, however they are rolled back when closing the store, or at the latest (when the store was not closed normally) when opening the store.
@mvstore_1079_p
Changes are buffered in memory, and once enough changes have accumulated, they are written in one continuous disk write operation. (According to a test, write throughput of a common SSD gets higher the larger the block size, until a block size of 2 MB, and then does not further increase.) By default, committed changes are automatically written once every second in a background thread, even if only little data was changed. Changes can also be written explicitly by calling <code>store()</code>. To avoid out of memory, uncommitted changes are also written when needed, however they are rolled back when closing the store, or at the latest (when the store was not correctly closed) when opening the store.
When storing, all changed pages are serialized, optionally compressed using the LZF algorithm, and written sequentially to a free area of the file. Each such change set is called a chunk. All parent pages of the changed B-trees are stored in this chunk as well, so that each chunk also contains the root of each changed map (which is the entry point for reading this version of the data). There is no separate index: all data is stored as a list of pages. Per store, there is one additional map that contains the metadata (the list of maps, where the root page of each map is stored, and the list of chunks).
@mvstore_1080_p
When storing, all changed pages are serialized, optionally compressed using the LZF algorithm, and written sequentially to a free area of the file. Each such change set is called a chunk. All parent pages of the changed B-trees are stored in this chunk as well, so that each chunk also contains the root of each changed map (which is the entry point to read this version of the data). There is no separate index: all data is stored as a list of pages. Per store, there is one additional map that contains the metadata (the list of maps, where the root page of each map is stored, and the list of chunks).
There are usually two write operations per chunk: one to store the chunk data (the pages), and one to update the file header (so it points to the latest chunk). If the chunk is appended at the end of the file, the file header is only written at the end of the chunk. There is no transaction log, no undo log, and there are no in-place updates (however, unused chunks are overwritten by default).
@mvstore_1081_p
There are usually two write operations per chunk: one to store the chunk data (the pages), and one to update the file header (so it points to the latest chunk). If the chunk is appended at the end of the file, the file header is only written at the end of the chunk.
Old data is kept for at least 45 seconds (configurable), so that there are no explicit sync operations required to guarantee data consistency. An application can also sync explicitly when needed. To reuse disk space, the chunks with the lowest amount of live data are compacted (the live data is stored again in the next chunk). To improve data locality and disk space usage, the plan is to automatically defragment and compact data.
@mvstore_1082_p
There is no transaction log, no undo log, and there are no in-place updates (however unused chunks are overwritten by default).
@mvstore_1083_p
Old data is kept for at least 45 seconds (configurable), so that there are no explicit sync operations required to guarantee data consistency, but an application can also sync explicitly when needed. To reuse disk space, the chunks with the lowest amount of live data are compacted (the live data is simply stored again in the next chunk). To improve data locality and disk space usage, the plan is to automatically defragment and compact data.
@mvstore_1084_p
Compared to traditional storage engines (that use a transaction log, undo log, and main storage area), the log structured storage is simpler, more flexible, and typically needs less disk operations per change, as data is only written once instead of twice or 3 times, and because the B-tree pages are always full (they are stored next to each other) and can be easily compressed. But temporarily, disk space usage might actually be a bit higher than for a regular database, as disk space is not immediately re-used (there are no in-place updates).
@mvstore_1085_h3
@mvstore_1083_h3
File System Abstraction, File Locking and Online Backup
@mvstore_1086_p
@mvstore_1084_p
The file system is pluggable (the same file system abstraction is used as H2 uses). The file can be encrypted using an encrypting file system. Other file system implementations support reading from a compressed zip or jar file.
@mvstore_1087_p
@mvstore_1085_p
Each store may only be opened once within a JVM. When opening a store, the file is locked in exclusive mode, so that the file can only be changed from within one process. Files can be opened in read-only mode, in which case a shared lock is used.
@mvstore_1088_p
@mvstore_1086_p
The persisted data can be backed up to a different file at any time, even during write operations (online backup). To do that, automatic disk space reuse needs to be first disabled, so that new data is always appended at the end of the file. Then, the file can be copied (the file handle is available to the application).
@mvstore_1089_h3
@mvstore_1087_h3
Encrypted Files
@mvstore_1090_p
@mvstore_1088_p
File encryption ensures the data can only be read with the correct password. Data can be encrypted as follows:
@mvstore_1091_p
@mvstore_1089_p
The following algorithms and settings are used:
@mvstore_1092_li
@mvstore_1090_li
The password char array is cleared after use, to reduce the risk that the password is stolen even if the attacker has access to the main memory.
@mvstore_1093_li
@mvstore_1091_li
The password is hashed according to the PBKDF2 standard, using the SHA-256 hash algorithm.
@mvstore_1094_li
@mvstore_1092_li
The length of the salt is 64 bits, so that an attacker can not use a pre-calculated password hash table (rainbow table). It is generated using a cryptographically secure random number generator.
@mvstore_1095_li
@mvstore_1093_li
To speed up opening an encrypted stores on Android, the number of PBKDF2 iterations is 10. The higher the value, the better the protection against brute-force password cracking attacks, but the slower is opening a file.
@mvstore_1096_li
@mvstore_1094_li
The file itself is encrypted using the standardized disk encryption mode XTS-AES. Only little more than one AES-128 round per block is needed.
@mvstore_1097_h3
@mvstore_1095_h3
Tools
@mvstore_1098_p
@mvstore_1096_p
There is a tool (<code>MVStoreTool</code>) to dump the contents of a file.
@mvstore_1099_h3
@mvstore_1097_h3
Exception Handling
@mvstore_1100_p
@mvstore_1098_p
This tool does not throw checked exceptions. Instead, unchecked exceptions are thrown if needed. The error message always contains the version of the tool. The following exceptions can occur:
@mvstore_1101_code
@mvstore_1099_code
IllegalStateException
@mvstore_1102_li
if a map was already closed or an IO exception occurred, for example if the file was locked, is already closed, could not be opened or closed, if reading or writing failed, if the file is corrupt, or if there is an internal error in the tool.
@mvstore_1100_li
if a map was already closed or an IO exception occurred, for example if the file was locked, is already closed, could not be opened or closed, if reading or writing failed, if the file is corrupt, or if there is an internal error in the tool. For such exceptions, an error code is added to the exception so that the application can distinguish between different error cases.
@mvstore_1103_code
@mvstore_1101_code
IllegalArgumentException
@mvstore_1104_li
@mvstore_1102_li
if a method was called with an illegal argument.
@mvstore_1105_code
@mvstore_1103_code
UnsupportedOperationException
@mvstore_1106_li
@mvstore_1104_li
if a method was called that is not supported, for example trying to modify a read-only map or view.
@mvstore_1107_code
@mvstore_1105_code
ConcurrentModificationException
@mvstore_1108_li
@mvstore_1106_li
if the object is modified concurrently.
@mvstore_1109_h3
@mvstore_1107_h3
Table Engine for H2
@mvstore_1110_p
@mvstore_1108_p
The plan is to use the MVStore as the default storage engine for the H2 database in the future (supporting SQL, JDBC, transactions, MVCC, and so on). This is work in progress. To try it out, append <code>;MV_STORE=TRUE</code> to the database URL. In general, functionality and performance should be similar than the current default storage engine (the page store). There are a few features that have not been implemented yet or are not complete:
@mvstore_1111_li
@mvstore_1109_li
There is still a file <code>.h2.db</code>, and the <code>.lock.db</code> file is still used to lock a database (long term, the plan is to no longer use those files).
@mvstore_1112_li
@mvstore_1110_li
The database file(s) sometimes do not shrink as expected.
@mvstore_1113_h2
@mvstore_1111_h2
Similar Projects and Differences to Other Storage Engines
@mvstore_1114_p
@mvstore_1112_p
Unlike similar storage engines like LevelDB and Kyoto Cabinet, the MVStore is written in Java and can easily be embedded in a Java and Android application.
@mvstore_1115_p
@mvstore_1113_p
The MVStore is somewhat similar to the Berkeley DB Java Edition because it is also written in Java, and is also a log structured storage, but the H2 license is more liberal.
@mvstore_1116_p
Like SQLite, the MVStore keeps all data in one file. Unlike SQLite, the MVStore uses is a log structured storage. The plan is to make the MVStore both easier to use as well as faster than SQLite. In a recent (very simple) test, the MVStore was about twice as fast as SQLite on Android.
@mvstore_1114_p
Like SQLite 3, the MVStore keeps all data in one file. Unlike SQLite 3, the MVStore uses is a log structured storage. The plan is to make the MVStore both easier to use as well as faster than SQLite 3. In a recent (very simple) test, the MVStore was about twice as fast as SQLite 3 on Android.
@mvstore_1117_p
The API of the MVStore is similar to MapDB (previously known as JDBM) from Jan Kotek, and some code is shared between MapDB and JDBM. However, unlike MapDB, the MVStore uses is a log structured storage. The MVStore does not have a record size limit.
@mvstore_1115_p
The API of the MVStore is similar to MapDB (previously known as JDBM) from Jan Kotek, and some code is shared between MVStore and MapDB. However, unlike MapDB, the MVStore uses is a log structured storage. The MVStore does not have a record size limit.
@mvstore_1118_h2
@mvstore_1116_h2
Current State
@mvstore_1119_p
@mvstore_1117_p
The code is still experimental at this stage. The API as well as the behavior may partially change. Features may be added and removed (even thought the main features will stay).
@mvstore_1120_h2
@mvstore_1118_h2
Requirements
@mvstore_1121_p
@mvstore_1119_p
The MVStore is included in the latest H2 jar file.
@mvstore_1122_p
@mvstore_1120_p
There are no special requirements to use it. The MVStore should run on any JVM as well as on Android.
@mvstore_1123_p
@mvstore_1121_p
To build just the MVStore (without the database engine), run:
@mvstore_1124_p
@mvstore_1122_p
This will create the file <code>bin/h2mvstore-1.3.173.jar</code> (about 130 KB).
#Issue 468: trunc(timestamp) could return the wrong value (+12 hours), and trunc(number) throw a NullPointerException.
@changelog_1011_li
@changelog_1012_li
#The expression trunc(number) threw a NullPointerException.
@changelog_1012_li
@changelog_1013_li
#Fixed a deadlock when updating LOB's concurrently. See TestLob.testDeadlock2().
@changelog_1013_li
@changelog_1014_li
#Fixed a deadlock related to very large temporary result sets.
@changelog_1014_li
@changelog_1015_li
#Add "-list" command line option to Shell tool so that result-list-mode can be triggered when reading from a file.
@changelog_1015_li
@changelog_1016_li
#Issue 474: H2 MySQL Compatibility code fails to ignore "COMMENT" in CREATE TABLE, patch from Aaron Azeckoski.
@changelog_1016_li
@changelog_1017_li
#Issue 476: Broken link in jaqu.html
@changelog_1017_li
@changelog_1018_li
#Fix potential UTF8 encoding issue in org.h2.store.FileStore, reported by Juerg Spiess.
@changelog_1018_li
@changelog_1019_li
#Improve error message when check constraint is broken, test case from Gili (cowwoc).
@changelog_1019_li
@changelog_1020_li
#Improve error message when we have a unique constraint violation, displays the offending key in the error message.
@changelog_1020_li
@changelog_1021_li
#Issue 478: Support for "SHOW TRANSACTION ISOLATION LEVEL", patch from Andrew Franklin.
@changelog_1021_li
@changelog_1022_li
#Issue 475: PgServer: add support for CancelRequest, patch from Andrew Franklin.
@changelog_1022_li
@changelog_1023_li
#Issue 473: PgServer missing -key option, patch from Andrew Franklin.
@changelog_1023_li
@changelog_1024_li
#Issue 471: CREATE VIEW does not check user rights, patch from Andrew Franklin.
@changelog_1024_li
@changelog_1025_li
#Issue 477: PgServer binary transmission of query params is unimplemented, patch from Andrew Franklin.
@changelog_1025_li
@changelog_1026_li
#Issue 479: Support for SUBSTRING without a FROM condition, patch from Andrew Franklin.
@changelog_1026_li
@changelog_1027_li
#Issue 472: PgServer does not work with any recent Postgres JDBC driver, patch from Andrew Franklin.
@changelog_1027_li
@changelog_1028_li
#Add syntax for passing additional parameters into custom TableEngine implementations.
@changelog_1028_li
@changelog_1029_li
#Issue 480: Bugfix post issue 475, 477, patch from Andrew Franklin.
@changelog_1029_li
@changelog_1030_li
#Issue 481: Further extensions to PgServer to support better support PG JDBC, patch from Andrew Franklin.
@changelog_1030_li
@changelog_1031_li
#Add support for spatial datatype GEOMETRY.
@changelog_1031_li
@changelog_1032_li
#Add support for in-memory spatial index.
@changelog_1032_li
@changelog_1033_li
#change the PageStore#changeCount field from an int to a long, to cope with databases with very high transaction rates.
@changelog_1033_li
@changelog_1034_li
#Fix a NullPointerException when attempting to add foreign key reference to a view.
@changelog_1034_li
@changelog_1035_li
#Add sufficient ClientInfo support to our javax.sql.Connection implementation to make WebSphere happy.
@changelog_1035_li
@changelog_1036_li
#Issue 482: class LobStorageBackend$LobInputStream does not override the method InputStream.available().
@changelog_1036_li
@changelog_1037_li
#Fix corruption resulting from a mix of the "WRITE_DELAY=0" option and "SELECT DISTINCT" queries that don't fit in memory.
@changelog_1037_li
@changelog_1038_li
#Fix the combination of updating a table which contains an LOB, and reading from the LOB at the same time. Previously it would throw an exception, now it works.
@changelog_1038_li
@changelog_1039_li
#Issue 484: In the H2 Console tool, all schemas starting with "INFO" where hidden. Now they are hidden only if the database is not H2. Patch from "mgcodeact"/"cumer d"
@changelog_1039_li
@changelog_1040_li
#MySQL compatibility, support the "AUTO_INCREMENT=3" part of the CREATE TABLE statement.
@changelog_1040_li
@changelog_1041_li
#Issue 486: MySQL compatibility, support the "DEFAULT CHARSET" part of the CREATE TABLE statement.
@changelog_1041_li
@changelog_1042_li
#Issue 487: support the MySQL "SET foreign_key_checks = 0" command
@changelog_1042_li
@changelog_1043_li
#Issue 490: support MySQL "USING BTREE" index declaration
@changelog_1043_li
@changelog_1044_li
#Issue 485: Database get corrupted when column is renamed for which check constraint was defined inside create table statement.
@changelog_1044_li
@changelog_1045_li
#Issue 499: support MySQL "UNIQUE KEY (ID) USING BTREE" constraint syntax
@changelog_1045_li
@changelog_1046_li
#Issue 501: "CREATE TABLE .. WITH" not serialized, patch from nico.devel
@changelog_1046_li
@changelog_1047_li
#Avoid problems with runtime-compiled ALIAS methods when people have set the JAVA_TOOL_OPTIONS environment variable.
@changelog_1047_h2
@changelog_1048_h2
#Version 1.3.172 (2013-05-25)
@changelog_1048_li
@changelog_1049_li
#Referential integrity: when adding a referential integrity constraint failed, and if creating the constraint automatically created an index, this index was not removed.
@changelog_1049_li
@changelog_1050_li
#The auto-analyze feature now only reads 1000 rows per table instead of 10000.
@changelog_1050_li
@changelog_1051_li
#The optimization for IN(...) queries combined with OR could result in a strange exception of the type "column x must be included in the group by list".
@changelog_1051_li
@changelog_1052_li
#Issue 454: Use Charset for type-safety.
@changelog_1052_li
@changelog_1053_li
#Queries with both LIMIT and OFFSET could throw an IllegalArgumentException.
@changelog_1053_li
@changelog_1054_li
#MVStore: multiple issues were fixed: 460, 461, 462, 464, 466.
@changelog_1054_li
@changelog_1055_li
#MVStore: larger stores (multiple GB) are now much faster.
@changelog_1055_li
@changelog_1056_li
#When using local temporary tables and not dropping them manually before closing the session, and then killing the process could result in a database that couldn't be opened (except when using the recover tool).
@changelog_1056_li
@changelog_1057_li
#Support TRUNC(timestamp) for improved Oracle compatibility.
@changelog_1057_li
@changelog_1058_li
#Add support for CREATE TABLE TEST (ID BIGSERIAL) for PostgreSQL compatibility. Patch from Jesse Long.
@changelog_1058_li
@changelog_1059_li
#Add new collation command SET BINARY_COLLATION UNSIGNED, helps with people testing BINARY columns in MySQL mode.
@changelog_1059_li
@changelog_1060_li
#Issue 453: ABBA race conditions in TABLE LINK connection sharing.
@changelog_1060_li
@changelog_1061_li
#Issue 449: Postgres Serial data type should not automatically be marked as primary key
@changelog_1061_li
@changelog_1062_li
#Issue 406: Support "select h2version()"
@changelog_1062_li
@changelog_1063_li
#Issue 389: When there is a multi-column primary key, H2 does not seem to always pick the right index
@changelog_1063_li
@changelog_1064_li
#Issue 305: Implement SELECT ... FOR FETCH ONLY
@changelog_1064_li
@changelog_1065_li
#Issue 274: Sybase/MSSQLServer compatibility - Add GETDATE and CHARINDEX system functions
@changelog_1065_li
@changelog_1066_li
#Issue 274: Sybase/MSSQLServer compatibility - swap parameters of CONVERT function.
@changelog_1066_li
@changelog_1067_li
#Issue 274: Sybase/MSSQLServer compatibility - support index clause e.g. "select * from test (index table1_index)"
@changelog_1067_li
@changelog_1068_li
#Fix bug in Optimizing SELECT * FROM A WHERE X=1 OR X=2 OR X=3 into SELECT * FROM A WHERE X IN (1,2,3)
@changelog_1068_li
@changelog_1069_li
#Issue 442: Groovy patch for SourceCompiler (function ALIAS)
@changelog_1069_li
@changelog_1070_li
#Issue 459: Improve LOB documentation
@changelog_1070_h2
@changelog_1071_h2
#Version 1.3.171 (2013-03-17)
@changelog_1071_li
@changelog_1072_li
#Security: the TCP server did not correctly restrict access rights of clients in some cases. This was specially a problem when using the flag "tcpAllowOthers".
@changelog_1072_li
@changelog_1073_li
#H2 Console: the session timeout can now be configured using the system property "h2.consoleTimeout".
@changelog_1073_li
@changelog_1074_li
#Issue 431: Improved compatibility with MySQL: support for "ENGINE=InnoDB charset=UTF8" when creating a table.
@changelog_1074_li
@changelog_1075_li
#Issue 249: Improved compatibility with MySQL in the MySQL mode: now the methods DatabaseMetaData methods stores*Case*Identifiers return the same as MySQL when using the MySQL mode.
@changelog_1075_li
@changelog_1076_li
#Issue 434: H2 Console didn't work in the Chrome browser due to a wrong viewport argument.
@changelog_1076_li
@changelog_1077_li
#There was a possibility that the .lock.db file was not deleted when the database was closed, which could slow down opening the database.
@changelog_1077_li
@changelog_1078_li
#The SQL script generated by the "script" command contained inconsistent newlines on Windows.
@changelog_1078_li
@changelog_1079_li
#When using trace level 4 (SLF4J) in the server mode, a directory "trace.db" and an empty file was created on the client side. This is no longer made.
@changelog_1079_li
@changelog_1080_li
#Optimize IN(...) queries: there was a bug in version 1.3.170 if the type of the left hand side didn't match the type of the right hand side. Fixed.
@changelog_1080_li
@changelog_1081_li
#Optimize IN(...) queries: there was a bug in version 1.3.170 for comparison of the type "X IN(NULL, NULL)". Fixed.
@changelog_1081_li
@changelog_1082_li
#Timestamps with timezone that were passed as a string were not always converted correctly. For example "2012-11-06T23:00:00.000Z" was converted to "2012-11-06" instead of to "2012-11-07" in the timezone CET. Thanks a lot to Steve Hruda for reporting the problem!
@changelog_1082_li
@changelog_1083_li
#New table engine "org.h2.mvstore.db.MVTableEngine" that internally uses the MVStore to persist data. To try it out, append ";DEFAULT_TABLE_ENGINE=org.h2.mvstore.db.MVTableEngine" to the database URL. This is still very experimental, and many features are not supported yet. The data is stored in a file with the suffix ".mv.db".
@changelog_1083_li
@changelog_1084_li
#New connection setting "DEFAULT_TABLE_ENGINE" to use a specific table engine if none is set explicitly. This is to simplify testing the MVStore table engine.
@changelog_1084_li
@changelog_1085_li
#MVStore: encrypted stores are now supported. Only standardized algorithms are used: PBKDF2, SHA-256, XTS-AES, AES-128.
@changelog_1085_li
@changelog_1086_li
#MVStore: improved API thanks to Simo Tripodi.
@changelog_1086_li
@changelog_1087_li
#MVStore: maps can now be renamed.
@changelog_1087_li
@changelog_1088_li
#MVStore: store the file header also at the end of each chunk, which results in a further reduced number of write operations.
@changelog_1088_li
@changelog_1089_li
#MVStore: a map implementation that supports concurrent operations.
@changelog_1089_li
@changelog_1090_li
#MVStore: unified exception handling; the version is included in the messages.
@changelog_1090_li
@changelog_1091_li
#MVStore: old data is now retained for 45 seconds by default.
@changelog_1091_li
@changelog_1092_li
#MVStore: compress is now disabled by default, and can be enabled on request.
@changelog_1092_li
@changelog_1093_li
#Support ALTER TABLE ADD ... AFTER. Patch from Andrew Gaul (argaul at gmail.com). Fixes issue 401.
@changelog_1093_li
@changelog_1094_li
#Improved OSGi support. H2 now registers itself as a DataSourceFactory service. Fixes issue 365.
@changelog_1094_li
@changelog_1095_li
#Add a DISK_SPACE_USED system function. Fixes issue 270.
@changelog_1095_li
@changelog_1096_li
#Fix a compile-time ambiguity when compiling with JDK7, thanks to a patch from Lukas Eder.
@changelog_1096_li
@changelog_1097_li
#Supporting dropping an index for Lucene full-text indexes.
@changelog_1097_li
@changelog_1098_li
#Optimized performance for SELECT ... ORDER BY X LIMIT Y OFFSET Z queries for in-memory databases using partial sort (by Sergi Vladykin).
@changelog_1098_li
@changelog_1099_li
#Experimental off-heap memory storage engine "nioMemFS:" and "nioMemLZF:", suggestion from Mark Addleman.
@changelog_1099_li
@changelog_1100_li
#Issue 438: JdbcDatabaseMetaData.getSchemas() is no longer supported as of 1.3.169.
@changelog_1100_li
@changelog_1101_li
#MySQL compatibility: support for ALTER TABLE tableName MODIFY [COLUMN] columnName columnDef. Patch from Ville Koskela.
@changelog_1101_li
@changelog_1102_li
#Issue 404: SHOW COLUMNS FROM tableName does not work with ALLOW_LITERALS=NUMBERS.
@changelog_1102_li
@changelog_1103_li
#Throw an explicit error to make it clear we don't support the TRIGGER combination of SELECT and FOR EACH ROW.
@changelog_1103_li
@changelog_1104_li
#Issue 439: Utils.sortTopN does not handle single-element arrays.
@changelog_1104_h2
@changelog_1105_h2
#Version 1.3.170 (2012-11-30)
@changelog_1105_li
@changelog_1106_li
#Issue 407: The TriggerAdapter didn't work with CLOB and BLOB columns.
@changelog_1106_li
@changelog_1107_li
#PostgreSQL compatibility: support for data types BIGSERIAL and SERIAL as an alias for AUTO_INCREMENT.
@changelog_1107_li
@changelog_1108_li
#Issue 417: H2 Console: the web session timeout didn't work, resulting in a memory leak. This was only a problem if the H2 Console was run for a long time and many sessions were opened.
@changelog_1108_li
@changelog_1109_li
#Issue 412: Running the Server tool with just the option "-browser" will now log a warning.
@changelog_1109_li
@changelog_1110_li
#Issue 411: CloseWatcher registration was not concurrency-safe.
@changelog_1110_li
@changelog_1111_li
#MySQL compatibility: support for CONCAT_WS. Thanks a lot to litailang for the patch!
@changelog_1111_li
@changelog_1112_li
#PostgreSQL compatibility: support for EXTRACT(WEEK FROM dateColumn). Thanks to Prashant Bhat for the patch!
@changelog_1112_li
@changelog_1113_li
#Fix for a bug where we would sometimes use the wrong unique constraint to validate foreign key constraints.
@changelog_1113_li
@changelog_1114_li
#Support BOM at the beginning of files for the RUNSCRIPT command
@changelog_1114_li
@changelog_1115_li
#Fix in calling SET @X = IDENTITY() where it would return NULL incorrectly
@changelog_1115_li
@changelog_1116_li
#Fix ABBA deadlock between adding a constraint and the H2-Log-Writer thread.
@changelog_1116_li
@changelog_1117_li
#Optimize IN(...) queries where the values are constant and of the same type.
@changelog_1117_li
@changelog_1118_li
#Restore tool: the parameter "quiet" was not used and is now removed.
@changelog_1118_li
@changelog_1119_li
#Fix ConcurrentModificationException when creating tables and executing SHOW TABLES in parallel. Reported by Viktor Voytovych.
@changelog_1119_li
@changelog_1120_li
#Serialization is now pluggable using the system property "h2.javaObjectSerializer". Thanks to Sergi Vladykin for the patch!
@changelog_1120_h2
@changelog_1121_h2
#Version 1.3.169 (2012-09-09)
@changelog_1121_li
@changelog_1122_li
#The default jar file is now compiled for Java 6.
@changelog_1122_li
@changelog_1123_li
#The new jar file will probably not end up in the central Maven repository in the next few weeks because Sonatype has disabled automatic synchronization from SourceForge (which they call 'legacy sync' now). It will probably take some time until this is sorted out. The H2 jar files are deployed to http://h2database.com/m2-repo/com/h2database/h2/maven-metadata.xml and http://hsql.sourceforge.net/m2-repo/com/h2database/h2/maven-metadata.xml as usual.
@changelog_1123_li
@changelog_1124_li
#A part of the documentation and the H2 Console has been changed to support the Apple retina display.
@changelog_1124_li
@changelog_1125_li
#The CreateCluster tool could not be used if the source database contained a CLOB or BLOB. The root cause was that the TCP server did not synchronize on the session, which caused a problem when using the exclusive mode.
@changelog_1125_li
@changelog_1126_li
#Statement.getQueryTimeout(): only the first call to this method will query the database. If the query timeout was changed in another way than calling setQueryTimeout, this method will always return the last value. This was changed because Hibernate calls getQueryTimeout() a lot.
@changelog_1126_li
@changelog_1127_li
#Issue 416: PreparedStatement.setNString throws AbstractMethodError. All implemented JDBC 4 methods that don't break compatibility with Java 5 are now included in the default jar file.
@changelog_1127_li
@changelog_1128_li
#Issue 414: for some functions, the parameters were evaluated twice (for example "char(nextval(..))" ran "nextval(..)" twice).
@changelog_1128_li
@changelog_1129_li
#The ResultSetMetaData methods getSchemaName and getTableName could return null instead of "" (an empty string) as specified in the JDBC API.
@changelog_1129_li
@changelog_1130_li
#Added compatibility for "SET NAMES" query in MySQL compatibility mode.
@changelog_1130_h2
@changelog_1131_h2
#Version 1.3.168 (2012-07-13)
@changelog_1131_li
@changelog_1132_li
#The message "Transaction log could not be truncated" was sometimes written to the .trace.db file even if there was no problem truncating the transaction log.
@changelog_1132_li
@changelog_1133_li
#New system property "h2.serializeJavaObject" (default: true) that allows to disable serializing Java objects, so that the objects compareTo and toString methods can be used.
@changelog_1133_li
@changelog_1134_li
#Dylan has translated the H2 Console tool to Korean. Thanks a lot!
@changelog_1134_li
@changelog_1135_li
#Executing the statement CREATE INDEX IF ALREADY EXISTS if the index already exists no longer fails for a read only database.
@changelog_1135_li
@changelog_1136_li
#MVCC: concurrently updating a row could result in the row to appear deleted in the second connection, if there are multiple unique indexes (or a primary key and at least one unique index). Thanks a lot to Teruo for the patch!
@changelog_1136_li
@changelog_1137_li
#Fulltext search: in-memory Lucene indexes are now supported.
@changelog_1137_li
@changelog_1138_li
#Fulltext search: UUID primary keys are now supported.
@changelog_1138_li
@changelog_1139_li
#Apache Tomcat 7.x will now longer log a warning when unloading the web application, if using a connection pool.
@changelog_1139_li
@changelog_1140_li
#H2 Console: support the Midori browser (for Debian / Raspberry Pi)
@changelog_1140_li
@changelog_1141_li
#When opening a remote session, don't open a temporary file if the trace level is set to zero
@changelog_1141_li
@changelog_1142_li
#Use HMAC for authenticating remote LOB id's, removing the need for maintaining a cache, and removing the limit on the number of LOBs per result set.
@changelog_1142_li
@changelog_1143_li
#H2 Console: HTML and XML documents can now be edited in an updatable result set. There is (limited) support for editing multi-line documents.
@changelog_1143_h2
@changelog_1144_h2
#Version 1.3.167 (2012-05-23)
@changelog_1144_li
@changelog_1145_li
#H2 Console: when editing a row, an empty varchar column was replaced with a single space.
@changelog_1145_li
@changelog_1146_li
#Lukas Eder has updated the jOOQ documentation.
@changelog_1146_li
@changelog_1147_li
#Some nested joins could not be executed, for example: select * from (select * from (select * from a) a right join b b) c;
@changelog_1147_li
@changelog_1148_li
#MS SQL Server compatibility: ISNULL is now an alias for IFNULL.
@changelog_1148_li
@changelog_1149_li
#Terrence Huang has completed the translation of the H2 Console tool to Chinese. Thanks a lot!
@changelog_1149_li
@changelog_1150_li
#Server mode: the number of CLOB / BLOB values that were cached on the server is now the maximum of: 5 times the SERVER_RESULT_SET_FETCH_SIZE (which is 100 by default), and SysProperties.SERVER_CACHED_OBJECTS.
@changelog_1150_li
@changelog_1151_li
#In the trace file, the query execution time was incorrect in some cases, specially for the statement SET TRACE_LEVEL_FILE 2.
@changelog_1151_li
@changelog_1152_li
#The feature LOG_SIZE_LIMIT that was introduced in version 1.3.165 did not always work correctly (specially with regards to multithreading) and has been removed. The message "Transaction log could not be truncated" is still written to the .trace.db file if required.
@changelog_1152_li
@changelog_1153_li
#Then reading from a resource using the prefix "classpath:", the ContextClassLoader is now used if the resource can't be read otherwise.
@changelog_1153_li
@changelog_1154_li
#DatabaseEventListener now calls setProgress whenever a statement starts and ends.
@changelog_1154_li
@changelog_1155_li
#DatabaseEventListener now calls setProgress periodically while a statement is running.
@changelog_1155_li
@changelog_1156_li
#The table INFORMATION_SCHEMA.FUNCTION_ALIASES now includes a column TYPE_NAME.
@changelog_1156_li
@changelog_1157_li
#Issue 378: when using views, the wrong values were bound to a parameter in some cases.
@changelog_1157_li
@changelog_1158_li
#Terrence Huang has translated the error messages to Chinese. Thanks a lot!
@changelog_1158_li
@changelog_1159_li
#TRUNC was added as an alias for TRUNCATE.
@changelog_1159_li
@changelog_1160_li
#Small optimisation for accessing result values by column name.
@changelog_1160_li
@changelog_1161_li
#Fix for bug in Statement.getMoreResults(int)
@changelog_1161_li
@changelog_1162_li
#The SCRIPT statements now supports filtering by schema and table. Thanks a lot to Jacob Qvortrup for providing the patch!
@changelog_1162_h2
@changelog_1163_h2
#Version 1.3.166 (2012-04-08)
@changelog_1163_li
@changelog_1164_li
#Indexes on column that are larger than half the page size (wide indexes) could sometimes get corrupt, resulting in an ArrayIndexOutOfBoundsException in PageBtree.getRow or "Row not found" in PageBtreeLeaf. Also, such indexes used too much disk space.
@changelog_1164_li
@changelog_1165_li
#Server mode: when retrieving more than 64 rows each containing a CLOB or BLOB, the error message "The object is already closed" was thrown.
@changelog_1165_li
@changelog_1166_li
#ConvertTraceFile: the time in the trace file is now parsed as a long.
@changelog_1166_li
@changelog_1167_li
#Invalid connection settings are now detected.
@changelog_1167_li
@changelog_1168_li
#Issue 387: WHERE condition getting pushed into sub-query with LIMIT.
@changelog_1168_h2
@changelog_1169_h2
#Version 1.3.165 (2012-03-18)
@changelog_1169_li
@changelog_1170_li
#Better string representation for decimal values (for example 0.00000000 instead of 0E-26).
@changelog_1170_li
@changelog_1171_li
#Prepared statements could only be re-used if the same data types were used the second time they were executed.
@changelog_1171_li
@changelog_1172_li
#In error messages about referential constraint violation, the values are now included.
@changelog_1172_li
@changelog_1173_li
#SCRIPT and RUNSCRIPT: the password can now be set using a prepared statement. Previously, it was required to be a literal in the SQL statement.
@changelog_1173_li
@changelog_1174_li
#MySQL compatibility: SUBSTR with a negative start index now works like MySQL.
@changelog_1174_li
@changelog_1175_li
#When enabling autocommit, the transaction is now committed (as required by the JDBC API).
@changelog_1175_li
@changelog_1176_li
#The shell script <code>h2.sh</code> did not work with spaces in the path. It also works now with quoted spaces in the argument list. Thanks a lot to Shimizu Fumiyuki for the patch!
@changelog_1176_li
@changelog_1177_li
#If the transaction log could not be truncated because of an uncommitted transaction, now "Transaction log could not be truncated" is written to the .trace.db file. Before, the database file was growing and it was hard to find out what the root cause was. To avoid the database file from growing, a new feature to automatically rollback the oldest transaction is available now. To enable it, append ;LOG_SIZE_LIMIT=32 to the database URL (in that case, the oldest session is rolled back if the transaction log is 32 MB).
@changelog_1177_li
@changelog_1178_li
#ALTER TABLE ADD can now add more than one column at a time.
@changelog_1178_li
@changelog_1179_li
#Issue 380: ALTER TABLE ADD FOREIGN KEY with an explicit index didn't verify the index can be used, which would lead to a NullPointerException later on.
@changelog_1179_li
@changelog_1180_li
#Issue 384: the wrong kind of exception (NullPointerException) was thrown in a UNION query with an incorrect ORDER BY expression.
@changelog_1180_li
@changelog_1181_li
#Issue 362: support LIMIT in UPDATE statements.
@changelog_1181_li
@changelog_1182_li
#Browser: if no default browser is set, Google Chrome is now used if available. If not available, then Konqueror, Netscape, or Opera is used if available (as before).
@changelog_1182_li
@changelog_1183_li
#CSV tool: new feature to disable writing the column header (option writeColumnHeader).
@changelog_1183_li
@changelog_1184_li
#CSV tool: new feature to preserve the case sensitivity of column names (option caseSensitiveColumnNames).
@changelog_1184_li
@changelog_1185_li
#PostgreSQL compatibility: LOG(x) is base 10 in the PostgreSQL mode.
@cheatSheet_1000_h1
...
...
@@ -6899,7 +6902,7 @@ H2 データベース エンジン
#Example Code
@mvstore_1033_p
# The following sample code show how to create a store, open a map, add some data, and access the current and an old version:
# The following sample code show how to use the tool:
@mvstore_1034_h2
#Store Builder
...
...
@@ -6908,73 +6911,73 @@ H2 データベース エンジン
# The <code>MVStore.Builder</code> provides a fluid interface to build a store if more complex configuration options are used. The following code contains all supported configuration options:
@mvstore_1036_li
#cacheSizeMB: the cache size in MB.
#backgroundExceptionListener: a listener for exceptions that could occur while writing in the background.
@mvstore_1037_li
#compressData: compress the data when storing.
#cacheSize: the cache size in MB.
@mvstore_1038_li
#encryptionKey: the encryption key for file encryption.
#compressData: compress the data when storing.
@mvstore_1039_li
#fileName: the name of the file, for file based stores.
#encryptionKey: the encryption key for file encryption.
@mvstore_1040_li
#readOnly: open the file in read-only mode.
#fileName: the name of the file, for file based stores.
@mvstore_1041_li
#writeBufferSize: the size of the write buffer in MB.
#pageSplitSize: the point where pages are split.
@mvstore_1042_li
#writeDelay: the maximum delay until committed changes are stored (unless stored explicitly).
#readOnly: open the file in read-only mode.
@mvstore_1043_h2
@mvstore_1043_li
#writeBufferSize: the size of the write buffer in MB.
@mvstore_1044_li
#writeDelay: the maximum delay in milliseconds until committed changes are stored in the background.
@mvstore_1045_h2
#R-Tree
@mvstore_1044_p
@mvstore_1046_p
# The <code>MVRTreeMap</code> is an R-tree implementation that supports fast spatial queries. It can be used as follows:
@mvstore_1045_p
@mvstore_1047_p
# The default number of dimensions is 2. To use a different number of dimensions, call <code>new MVRTreeMap.Builder<String>().dimensions(3)</code>. The minimum number of dimensions is 1, the maximum is 255.
@mvstore_1046_h2
@mvstore_1048_h2
特徴
@mvstore_1047_h3
@mvstore_1049_h3
#Maps
@mvstore_1048_p
# Each store supports a set of named maps. A map is sorted by key, and supports the common lookup operations, including access to the first and last key, iterate over some or all keys, and so on.
@mvstore_1049_p
# Also supported, and very uncommon for maps, is fast index lookup: the keys of the map can be accessed like a list (get the key at the given index, get the index of a certain key). That means getting the median of two keys is trivial, and range of keys can be counted very quickly. The iterator supports fast skipping. This is possible because internally, each map is organized in the form of a counted B+-tree.
@mvstore_1050_p
# In database terms, a map can be used like a table, where the key of the map is the primary key of the table, and the value is the row. A map can also represent an index, where the key of the map is the key of the index, and the value of the map is the primary key of the table (for non-unique indexes, the key of the map must also contain the primary key).
# Each store contains a set of named maps. A map is sorted by key, and supports the common lookup operations, including access to the first and last key, iterate over some or all keys, and so on.
@mvstore_1051_h3
#Versions
@mvstore_1051_p
# Also supported, and very uncommon for maps, is fast index lookup: the entries of the map can be be efficiently accessed like a random-access list (get the entry at the given index), and the index of a key can be calculated efficiently. That also means getting the median of two keys is very fast, and a range of keys can be counted very quickly. The iterator supports fast skipping. This is possible because internally, each map is organized in the form of a counted B+-tree.
@mvstore_1052_p
# Multiple versions are supported. A version is a snapshot of all the data of all maps at a given point in time. A transaction is a number of actions between two versions.
# In database terms, a map can be used like a table, where the key of the map is the primary key of the table, and the value is the row. A map can also represent an index, where the key of the map is the key of the index, and the value of the map is the primary key of the table (for non-unique indexes, the key of the map must also contain the primary key).
@mvstore_1053_p
# Versions are not immediately persisted; instead, only the version counter is incremented. If there is a change after switching to a new version, a snapshot of the old version is kept in memory, so that it can still be read.
@mvstore_1053_h3
#Versions
@mvstore_1054_p
# Old persisted versions are readable until the old data was explicitly overwritten. Creating a snapshot is fast: only the pages that are changed after a snapshot are copied. This behavior is also called COW (copy on write).
# Multiple versions are supported. A version is a snapshot of all the data of all maps at a given point in time. Versions are not immediately persisted; instead, only the version counter is incremented. If there is a change after switching to a new version, a snapshot of the old version is kept in memory, so that it can still be read. Old persisted versions are readable until the old data was explicitly overwritten. Creating a snapshot is fast: only the pages that are changed after a snapshot are copied. This behavior is also called COW (copy on write). Rollback is supported (rollback to any old in-memory version or an old persisted version).
@mvstore_1055_p
# Rollback is supported (rollback to any old in-memory version or an old persisted version).
# The following sample code show how to create a store, open a map, add some data, and access the current and an old version:
@mvstore_1056_h3
#Transactions
@mvstore_1057_p
# The multi-version support is the basis for the transaction support. In the simple case, when only one transaction is open at a time, rolling back the transaction only requires to revert to an old version.
# To support multiple concurrent open transactions, a transaction utility is included, the <code>TransactionStore</code>. The tool supports PostgreSQL style "read committed" transaction isolation with savepoints, two-phase commit, and other features typically available in a database. There is no limit on the size of a transaction (the log is written to disk for large or long running transactions).
@mvstore_1058_p
# To support multiple concurrent open transactions, a transaction utility is included, the <code>TransactionStore</code>. This utility stores the changed entries in a separate map, similar to a transaction log (except that only the key of a changed row is stored, and the entries of a transaction are removed when the transaction is committed). The storage overhead of this utility is very small compared to the overhead of a regular transaction log. The tool supports PostgreSQL style "read committed" transaction isolation. There is no limit on the size of a transaction (the log is not kept in memory). The tool supports savepoints, two-phase commit, and other features typically available in a database.
# Internally, this utility stores the old versions of changed entries in a separate map, similar to a transaction log (except that entries of a closed transaction are removed, and the log is usually not stored for short transactions). For common use cases, the storage overhead of this utility is very small compared to the overhead of a regular transaction log.
@mvstore_1059_h3
#In-Memory Performance and Usage
...
...
@@ -6983,7 +6986,7 @@ H2 データベース エンジン
# Performance of in-memory operations is comparable with <code>java.util.TreeMap</code> (many operations are actually faster), but usually slower than <code>java.util.HashMap</code>.
@mvstore_1061_p
# The memory overhead for large maps is slightly better than for the regular map implementations, but there is a higher overhead per map. For maps with less than 25 entries, the regular map implementations use less memory on average.
# The memory overhead for large maps is slightly better than for the regular map implementations, but there is a higher overhead per map. For maps with less than about 25 entries, the regular map implementations need less memory.
@mvstore_1062_p
# If no file name is specified, the store operates purely in memory. Except for persisting data, all features are supported in this mode (multi-versioning, index lookup, R-tree and so on). If a file name is specified, all operations occur in memory (with the same performance characteristics) until data is persisted.
...
...
@@ -7004,174 +7007,168 @@ H2 データベース エンジン
#BLOB Support
@mvstore_1068_p
# There is a mechanism that stores large binary objects by splitting them into smaller blocks. This allows to store objects that don't fit in memory. Streaming as well as random access reads on such objects are supported. This tool is written on top of the store (only using the map interface).
# There is a mechanism that stores large binary objects by splitting them into smaller blocks. This allows to store objects that don't fit in memory. Streaming as well as random access reads on such objects are supported. This tool is written on top of the store, using only the map interface.
@mvstore_1069_h3
#R-Tree and Pluggable Map Implementations
@mvstore_1070_p
# The map implementation is pluggable. In addition to the default <code>MVMap</code> (multi-version map), there is a multi-version R-tree map implementation for spatial operations (contain and intersection; nearest neighbor is not yet implemented).
# The map implementation is pluggable. In addition to the default <code>MVMap</code> (multi-version map), there is a map that supports concurrent write operations, and a multi-version R-tree map implementation for spatial operations.
@mvstore_1071_h3
#Concurrent Operations and Caching
@mvstore_1072_p
# The default map implementation supports concurrent reads on old versions of the data. All such read operations can occur in parallel. Concurrent reads from the page cache, as well as concurrent reads from the file system are supported.
# The default map implementation supports concurrent reads on old versions of the data. All such read operations can occur in parallel. Concurrent reads from the page cache, as well as concurrent reads from the file system are supported. Writing changes to the file can occur concurrently to modifying the data, as writing operates on a snapshot.
@mvstore_1073_p
# Storing changes can occur concurrently to modifying the data, as it operates on a snapshot.
@mvstore_1074_p
# Caching is done on the page level. The page cache is a concurrent LIRS cache, which should be resistant against scan operations.
@mvstore_1075_p
@mvstore_1074_p
# The default map implementation does not support concurrent modification operations on a map (the same as <code>HashMap</code> and <code>TreeMap</code>). Similar to those classes, the map tries to detect concurrent modification.
@mvstore_1076_p
@mvstore_1075_p
# With the <code>MVMapConcurrent</code> implementation, read operations even on the newest version can happen concurrently with all other operations, without risk of corruption. This comes with slightly reduced speed in single threaded mode, the same as with other <code>ConcurrentHashMap</code> implementations. Write operations first read the relevant area from disk to memory (this can happen concurrently), and only then modify the data. The in-memory part of write operations is synchronized.
@mvstore_1077_p
@mvstore_1076_p
# For fully scalable concurrent write operations to a map (in-memory and to disk), the map could be split into multiple maps in different stores ('sharding'). The plan is to add such a mechanism later when needed.
@mvstore_1078_h3
@mvstore_1077_h3
#Log Structured Storage
@mvstore_1078_p
# Internally, changes are buffered in memory, and once enough changes have accumulated, they are written in one continuous disk write operation. (According to a test, write throughput of a common SSD increases with write block size, until a block size of 2 MB, and then does not further increase.) By default, committed changes are automatically written once every second in a background thread, even if only little data was changed. Changes can also be written explicitly by calling <code>store()</code>. To avoid running out of memory, uncommitted changes are also written when needed, however they are rolled back when closing the store, or at the latest (when the store was not closed normally) when opening the store.
@mvstore_1079_p
# Changes are buffered in memory, and once enough changes have accumulated, they are written in one continuous disk write operation. (According to a test, write throughput of a common SSD gets higher the larger the block size, until a block size of 2 MB, and then does not further increase.) By default, committed changes are automatically written once every second in a background thread, even if only little data was changed. Changes can also be written explicitly by calling <code>store()</code>. To avoid out of memory, uncommitted changes are also written when needed, however they are rolled back when closing the store, or at the latest (when the store was not correctly closed) when opening the store.
# When storing, all changed pages are serialized, optionally compressed using the LZF algorithm, and written sequentially to a free area of the file. Each such change set is called a chunk. All parent pages of the changed B-trees are stored in this chunk as well, so that each chunk also contains the root of each changed map (which is the entry point for reading this version of the data). There is no separate index: all data is stored as a list of pages. Per store, there is one additional map that contains the metadata (the list of maps, where the root page of each map is stored, and the list of chunks).
@mvstore_1080_p
# When storing, all changed pages are serialized, optionally compressed using the LZF algorithm, and written sequentially to a free area of the file. Each such change set is called a chunk. All parent pages of the changed B-trees are stored in this chunk as well, so that each chunk also contains the root of each changed map (which is the entry point to read this version of the data). There is no separate index: all data is stored as a list of pages. Per store, there is one additional map that contains the metadata (the list of maps, where the root page of each map is stored, and the list of chunks).
# There are usually two write operations per chunk: one to store the chunk data (the pages), and one to update the file header (so it points to the latest chunk). If the chunk is appended at the end of the file, the file header is only written at the end of the chunk. There is no transaction log, no undo log, and there are no in-place updates (however, unused chunks are overwritten by default).
@mvstore_1081_p
# There are usually two write operations per chunk: one to store the chunk data (the pages), and one to update the file header (so it points to the latest chunk). If the chunk is appended at the end of the file, the file header is only written at the end of the chunk.
# Old data is kept for at least 45 seconds (configurable), so that there are no explicit sync operations required to guarantee data consistency. An application can also sync explicitly when needed. To reuse disk space, the chunks with the lowest amount of live data are compacted (the live data is stored again in the next chunk). To improve data locality and disk space usage, the plan is to automatically defragment and compact data.
@mvstore_1082_p
# There is no transaction log, no undo log, and there are no in-place updates (however unused chunks are overwritten by default).
@mvstore_1083_p
# Old data is kept for at least 45 seconds (configurable), so that there are no explicit sync operations required to guarantee data consistency, but an application can also sync explicitly when needed. To reuse disk space, the chunks with the lowest amount of live data are compacted (the live data is simply stored again in the next chunk). To improve data locality and disk space usage, the plan is to automatically defragment and compact data.
@mvstore_1084_p
# Compared to traditional storage engines (that use a transaction log, undo log, and main storage area), the log structured storage is simpler, more flexible, and typically needs less disk operations per change, as data is only written once instead of twice or 3 times, and because the B-tree pages are always full (they are stored next to each other) and can be easily compressed. But temporarily, disk space usage might actually be a bit higher than for a regular database, as disk space is not immediately re-used (there are no in-place updates).
@mvstore_1085_h3
@mvstore_1083_h3
#File System Abstraction, File Locking and Online Backup
@mvstore_1086_p
@mvstore_1084_p
# The file system is pluggable (the same file system abstraction is used as H2 uses). The file can be encrypted using an encrypting file system. Other file system implementations support reading from a compressed zip or jar file.
@mvstore_1087_p
@mvstore_1085_p
# Each store may only be opened once within a JVM. When opening a store, the file is locked in exclusive mode, so that the file can only be changed from within one process. Files can be opened in read-only mode, in which case a shared lock is used.
@mvstore_1088_p
@mvstore_1086_p
# The persisted data can be backed up to a different file at any time, even during write operations (online backup). To do that, automatic disk space reuse needs to be first disabled, so that new data is always appended at the end of the file. Then, the file can be copied (the file handle is available to the application).
@mvstore_1089_h3
@mvstore_1087_h3
#Encrypted Files
@mvstore_1090_p
@mvstore_1088_p
# File encryption ensures the data can only be read with the correct password. Data can be encrypted as follows:
@mvstore_1091_p
@mvstore_1089_p
# The following algorithms and settings are used:
@mvstore_1092_li
@mvstore_1090_li
#The password char array is cleared after use, to reduce the risk that the password is stolen even if the attacker has access to the main memory.
@mvstore_1093_li
@mvstore_1091_li
#The password is hashed according to the PBKDF2 standard, using the SHA-256 hash algorithm.
@mvstore_1094_li
@mvstore_1092_li
#The length of the salt is 64 bits, so that an attacker can not use a pre-calculated password hash table (rainbow table). It is generated using a cryptographically secure random number generator.
@mvstore_1095_li
@mvstore_1093_li
#To speed up opening an encrypted stores on Android, the number of PBKDF2 iterations is 10. The higher the value, the better the protection against brute-force password cracking attacks, but the slower is opening a file.
@mvstore_1096_li
@mvstore_1094_li
#The file itself is encrypted using the standardized disk encryption mode XTS-AES. Only little more than one AES-128 round per block is needed.
@mvstore_1097_h3
@mvstore_1095_h3
#Tools
@mvstore_1098_p
@mvstore_1096_p
# There is a tool (<code>MVStoreTool</code>) to dump the contents of a file.
@mvstore_1099_h3
@mvstore_1097_h3
#Exception Handling
@mvstore_1100_p
@mvstore_1098_p
# This tool does not throw checked exceptions. Instead, unchecked exceptions are thrown if needed. The error message always contains the version of the tool. The following exceptions can occur:
@mvstore_1101_code
@mvstore_1099_code
#IllegalStateException
@mvstore_1102_li
# if a map was already closed or an IO exception occurred, for example if the file was locked, is already closed, could not be opened or closed, if reading or writing failed, if the file is corrupt, or if there is an internal error in the tool.
@mvstore_1100_li
# if a map was already closed or an IO exception occurred, for example if the file was locked, is already closed, could not be opened or closed, if reading or writing failed, if the file is corrupt, or if there is an internal error in the tool. For such exceptions, an error code is added to the exception so that the application can distinguish between different error cases.
@mvstore_1103_code
@mvstore_1101_code
#IllegalArgumentException
@mvstore_1104_li
@mvstore_1102_li
# if a method was called with an illegal argument.
@mvstore_1105_code
@mvstore_1103_code
#UnsupportedOperationException
@mvstore_1106_li
@mvstore_1104_li
# if a method was called that is not supported, for example trying to modify a read-only map or view.
@mvstore_1107_code
@mvstore_1105_code
#ConcurrentModificationException
@mvstore_1108_li
@mvstore_1106_li
# if the object is modified concurrently.
@mvstore_1109_h3
@mvstore_1107_h3
#Table Engine for H2
@mvstore_1110_p
@mvstore_1108_p
# The plan is to use the MVStore as the default storage engine for the H2 database in the future (supporting SQL, JDBC, transactions, MVCC, and so on). This is work in progress. To try it out, append <code>;MV_STORE=TRUE</code> to the database URL. In general, functionality and performance should be similar than the current default storage engine (the page store). There are a few features that have not been implemented yet or are not complete:
@mvstore_1111_li
@mvstore_1109_li
#There is still a file <code>.h2.db</code>, and the <code>.lock.db</code> file is still used to lock a database (long term, the plan is to no longer use those files).
@mvstore_1112_li
@mvstore_1110_li
#The database file(s) sometimes do not shrink as expected.
@mvstore_1113_h2
@mvstore_1111_h2
#Similar Projects and Differences to Other Storage Engines
@mvstore_1114_p
@mvstore_1112_p
# Unlike similar storage engines like LevelDB and Kyoto Cabinet, the MVStore is written in Java and can easily be embedded in a Java and Android application.
@mvstore_1115_p
@mvstore_1113_p
# The MVStore is somewhat similar to the Berkeley DB Java Edition because it is also written in Java, and is also a log structured storage, but the H2 license is more liberal.
@mvstore_1116_p
# Like SQLite, the MVStore keeps all data in one file. Unlike SQLite, the MVStore uses is a log structured storage. The plan is to make the MVStore both easier to use as well as faster than SQLite. In a recent (very simple) test, the MVStore was about twice as fast as SQLite on Android.
@mvstore_1114_p
# Like SQLite 3, the MVStore keeps all data in one file. Unlike SQLite 3, the MVStore uses is a log structured storage. The plan is to make the MVStore both easier to use as well as faster than SQLite 3. In a recent (very simple) test, the MVStore was about twice as fast as SQLite 3 on Android.
@mvstore_1117_p
# The API of the MVStore is similar to MapDB (previously known as JDBM) from Jan Kotek, and some code is shared between MapDB and JDBM. However, unlike MapDB, the MVStore uses is a log structured storage. The MVStore does not have a record size limit.
@mvstore_1115_p
# The API of the MVStore is similar to MapDB (previously known as JDBM) from Jan Kotek, and some code is shared between MVStore and MapDB. However, unlike MapDB, the MVStore uses is a log structured storage. The MVStore does not have a record size limit.
@mvstore_1118_h2
@mvstore_1116_h2
#Current State
@mvstore_1119_p
@mvstore_1117_p
# The code is still experimental at this stage. The API as well as the behavior may partially change. Features may be added and removed (even thought the main features will stay).
@mvstore_1120_h2
@mvstore_1118_h2
必�?�?�件
@mvstore_1121_p
@mvstore_1119_p
# The MVStore is included in the latest H2 jar file.
@mvstore_1122_p
@mvstore_1120_p
# There are no special requirements to use it. The MVStore should run on any JVM as well as on Android.
@mvstore_1123_p
@mvstore_1121_p
# To build just the MVStore (without the database engine), run:
@mvstore_1124_p
@mvstore_1122_p
# This will create the file <code>bin/h2mvstore-1.3.173.jar</code> (about 130 KB).
@@ -546,189 +546,190 @@ build_1111_li=The rail images (one straight, four junctions, two turns) are gene
build_1112_p=\ To generate railroad diagrams for other grammars, see the package <code>org.h2.jcr</code>. This package is used to generate the SQL-2 railroad diagrams for the JCR 2.0 specification.
changelog_1000_h1=Change Log
changelog_1001_h2=Next Version (unreleased)
changelog_1002_li=-
changelog_1003_h2=Version 1.3.173 (2013-07-28)
changelog_1004_li=Support empty statements that just contains a comment.
changelog_1005_li=Server mode\:if there was an error while reading from a LOB, the session was closed in some cases.
changelog_1006_li=Issue 463\:Driver name and version are now the same in OsgiDataSourceFactory and JdbcDatabaseMetaData.
changelog_1007_li=JaQu\:The data type VARCHAR is now (again) used for Strings (no longer TEXT, except when explicitly set).
changelog_1008_li=For in-memory databases, creating an index on a CLOB or BLOB column is no longer supported. This is to simplify the MVTableEngine.
changelog_1010_li=Issue 468\:trunc(timestamp) could return the wrong value (+12 hours), and trunc(number) throw a NullPointerException.
changelog_1011_li=The expression trunc(number) threw a NullPointerException.
changelog_1012_li=Fixed a deadlock when updating LOB's concurrently. See TestLob.testDeadlock2().
changelog_1013_li=Fixed a deadlock related to very large temporary result sets.
changelog_1014_li=Add "-list" command line option to Shell tool so that result-list-mode can be triggered when reading from a file.
changelog_1015_li=Issue 474\:H2 MySQL Compatibility code fails to ignore "COMMENT" in CREATE TABLE, patch from Aaron Azeckoski.
changelog_1016_li=Issue 476\:Broken link in jaqu.html
changelog_1017_li=Fix potential UTF8 encoding issue in org.h2.store.FileStore, reported by Juerg Spiess.
changelog_1018_li=Improve error message when check constraint is broken, test case from Gili (cowwoc).
changelog_1019_li=Improve error message when we have a unique constraint violation, displays the offending key in the error message.
changelog_1020_li=Issue 478\:Support for "SHOW TRANSACTION ISOLATION LEVEL", patch from Andrew Franklin.
changelog_1021_li=Issue 475\:PgServer\:add support for CancelRequest, patch from Andrew Franklin.
changelog_1022_li=Issue 473\:PgServer missing -key option, patch from Andrew Franklin.
changelog_1023_li=Issue 471\:CREATE VIEW does not check user rights, patch from Andrew Franklin.
changelog_1024_li=Issue 477\:PgServer binary transmission of query params is unimplemented, patch from Andrew Franklin.
changelog_1025_li=Issue 479\:Support for SUBSTRING without a FROM condition, patch from Andrew Franklin.
changelog_1026_li=Issue 472\:PgServer does not work with any recent Postgres JDBC driver, patch from Andrew Franklin.
changelog_1027_li=Add syntax for passing additional parameters into custom TableEngine implementations.
changelog_1028_li=Issue 480\:Bugfix post issue 475, 477, patch from Andrew Franklin.
changelog_1029_li=Issue 481\:Further extensions to PgServer to support better support PG JDBC, patch from Andrew Franklin.
changelog_1030_li=Add support for spatial datatype GEOMETRY.
changelog_1031_li=Add support for in-memory spatial index.
changelog_1032_li=change the PageStore\#changeCount field from an int to a long, to cope with databases with very high transaction rates.
changelog_1033_li=Fix a NullPointerException when attempting to add foreign key reference to a view.
changelog_1034_li=Add sufficient ClientInfo support to our javax.sql.Connection implementation to make WebSphere happy.
changelog_1035_li=Issue 482\:class LobStorageBackend$LobInputStream does not override the method InputStream.available().
changelog_1036_li=Fix corruption resulting from a mix of the "WRITE_DELAY\=0" option and "SELECT DISTINCT" queries that don't fit in memory.
changelog_1037_li=Fix the combination of updating a table which contains an LOB, and reading from the LOB at the same time. Previously it would throw an exception, now it works.
changelog_1038_li=Issue 484\:In the H2 Console tool, all schemas starting with "INFO" where hidden. Now they are hidden only if the database is not H2. Patch from "mgcodeact"/"cumer d"
changelog_1039_li=MySQL compatibility, support the "AUTO_INCREMENT\=3" part of the CREATE TABLE statement.
changelog_1040_li=Issue 486\:MySQL compatibility, support the "DEFAULT CHARSET" part of the CREATE TABLE statement.
changelog_1041_li=Issue 487\:support the MySQL "SET foreign_key_checks \=0" command
changelog_1042_li=Issue 490\:support MySQL "USING BTREE" index declaration
changelog_1043_li=Issue 485\:Database get corrupted when column is renamed for which check constraint was defined inside create table statement.
changelog_1044_li=Issue 499\:support MySQL "UNIQUE KEY (ID) USING BTREE" constraint syntax
changelog_1045_li=Issue 501\:"CREATE TABLE .. WITH"not serialized, patch from nico.devel
changelog_1046_li=Avoid problems with runtime-compiled ALIAS methods when people have set the JAVA_TOOL_OPTIONS environment variable.
changelog_1047_h2=Version 1.3.172 (2013-05-25)
changelog_1048_li=Referential integrity\:when adding a referential integrity constraint failed, and if creating the constraint automatically created an index, this index was not removed.
changelog_1049_li=The auto-analyze feature now only reads 1000 rows per table instead of 10000.
changelog_1050_li=The optimization for IN(...) queries combined with OR could result in a strange exception of the type "column x must be included in the group by list".
changelog_1051_li=Issue 454\:Use Charset for type-safety.
changelog_1052_li=Queries with both LIMIT and OFFSET could throw an IllegalArgumentException.
changelog_1053_li=MVStore\:multiple issues were fixed\:460, 461, 462, 464, 466.
changelog_1054_li=MVStore\:larger stores (multiple GB) are now much faster.
changelog_1055_li=When using local temporary tables and not dropping them manually before closing the session, and then killing the process could result in a database that couldn't be opened (except when using the recover tool).
changelog_1056_li=Support TRUNC(timestamp) for improved Oracle compatibility.
changelog_1057_li=Add support for CREATE TABLE TEST (ID BIGSERIAL) for PostgreSQL compatibility. Patch from Jesse Long.
changelog_1058_li=Add new collation command SET BINARY_COLLATION UNSIGNED, helps with people testing BINARY columns in MySQL mode.
changelog_1059_li=Issue 453\:ABBA race conditions in TABLE LINK connection sharing.
changelog_1060_li=Issue 449\:Postgres Serial data type should not automatically be marked as primary key
changelog_1071_li=Security\:the TCP server did not correctly restrict access rights of clients in some cases. This was specially a problem when using the flag "tcpAllowOthers".
changelog_1072_li=H2 Console\:the session timeout can now be configured using the system property "h2.consoleTimeout".
changelog_1073_li=Issue 431\:Improved compatibility with MySQL\:support for "ENGINE\=InnoDB charset\=UTF8" when creating a table.
changelog_1074_li=Issue 249\:Improved compatibility with MySQL in the MySQL mode\:now the methods DatabaseMetaData methods stores*Case*Identifiers return the same as MySQL when using the MySQL mode.
changelog_1075_li=Issue 434\:H2 Console didn't work in the Chrome browser due to a wrong viewport argument.
changelog_1076_li=There was a possibility that the .lock.db file was not deleted when the database was closed, which could slow down opening the database.
changelog_1077_li=The SQL script generated by the "script" command contained inconsistent newlines on Windows.
changelog_1078_li=When using trace level 4 (SLF4J) in the server mode, a directory "trace.db" and an empty file was created on the client side. This is no longer made.
changelog_1079_li=Optimize IN(...) queries\:there was a bug in version 1.3.170 if the type of the left hand side didn't match the type of the right hand side. Fixed.
changelog_1080_li=Optimize IN(...) queries\:there was a bug in version 1.3.170 for comparison of the type "X IN(NULL, NULL)". Fixed.
changelog_1081_li=Timestamps with timezone that were passed as a string were not always converted correctly. For example "2012-11-06T23\:00\:00.000Z" was converted to "2012-11-06" instead of to "2012-11-07" in the timezone CET. Thanks a lot to Steve Hruda for reporting the problem\!
changelog_1082_li=New table engine "org.h2.mvstore.db.MVTableEngine" that internally uses the MVStore to persist data. To try it out, append ";DEFAULT_TABLE_ENGINE\=org.h2.mvstore.db.MVTableEngine" to the database URL. This is still very experimental, and many features are not supported yet. The data is stored in a file with the suffix ".mv.db".
changelog_1083_li=New connection setting "DEFAULT_TABLE_ENGINE" to use a specific table engine if none is set explicitly. This is to simplify testing the MVStore table engine.
changelog_1084_li=MVStore\:encrypted stores are now supported. Only standardized algorithms are used\:PBKDF2, SHA-256, XTS-AES, AES-128.
changelog_1085_li=MVStore\:improved API thanks to Simo Tripodi.
changelog_1086_li=MVStore\:maps can now be renamed.
changelog_1087_li=MVStore\:store the file header also at the end of each chunk, which results in a further reduced number of write operations.
changelog_1088_li=MVStore\:a map implementation that supports concurrent operations.
changelog_1089_li=MVStore\:unified exception handling; the version is included in the messages.
changelog_1090_li=MVStore\:old data is now retained for 45 seconds by default.
changelog_1091_li=MVStore\:compress is now disabled by default, and can be enabled on request.
changelog_1092_li=Support ALTER TABLE ADD ... AFTER. Patch from Andrew Gaul (argaul at gmail.com). Fixes issue 401.
changelog_1093_li=Improved OSGi support. H2 now registers itself as a DataSourceFactory service. Fixes issue 365.
changelog_1094_li=Add a DISK_SPACE_USED system function. Fixes issue 270.
changelog_1095_li=Fix a compile-time ambiguity when compiling with JDK7, thanks to a patch from Lukas Eder.
changelog_1096_li=Supporting dropping an index for Lucene full-text indexes.
changelog_1097_li=Optimized performance for SELECT ... ORDER BY X LIMIT Y OFFSET Z queries for in-memory databases using partial sort (by Sergi Vladykin).
changelog_1098_li=Experimental off-heap memory storage engine "nioMemFS\:" and "nioMemLZF\:", suggestion from Mark Addleman.
changelog_1099_li=Issue 438\: JdbcDatabaseMetaData.getSchemas() is no longer supported as of 1.3.169.
changelog_1100_li=MySQL compatibility\: support for ALTER TABLE tableName MODIFY [COLUMN] columnName columnDef. Patch from Ville Koskela.
changelog_1101_li=Issue 404\: SHOW COLUMNS FROM tableName does not work with ALLOW_LITERALS\=NUMBERS.
changelog_1102_li=Throw an explicit error to make it clear we don't support the TRIGGER combination of SELECT and FOR EACH ROW.
changelog_1103_li=Issue 439\: Utils.sortTopN does not handle single-element arrays.
changelog_1104_h2=Version 1.3.170 (2012-11-30)
changelog_1105_li=Issue 407\: The TriggerAdapter didn't work with CLOB and BLOB columns.
changelog_1106_li=PostgreSQL compatibility\: support for data types BIGSERIAL and SERIAL as an alias for AUTO_INCREMENT.
changelog_1107_li=Issue 417\: H2 Console\: the web session timeout didn't work, resulting in a memory leak. This was only a problem if the H2 Console was run for a long time and many sessions were opened.
changelog_1108_li=Issue 412\: Running the Server tool with just the option "-browser" will now log a warning.
changelog_1109_li=Issue 411\:CloseWatcher registration was not concurrency-safe.
changelog_1110_li=MySQL compatibility\:support for CONCAT_WS. Thanks a lot to litailang for the patch\!
changelog_1111_li=PostgreSQL compatibility\:support for EXTRACT(WEEK FROM dateColumn). Thanks to Prashant Bhat for the patch\!
changelog_1112_li=Fix for a bug where we would sometimes use the wrong unique constraint to validate foreign key constraints.
changelog_1113_li=Support BOM at the beginning of files for the RUNSCRIPT command
changelog_1114_li=Fix in calling SET @X \=IDENTITY() where it would return NULL incorrectly
changelog_1115_li=Fix ABBA deadlock between adding a constraint and the H2-Log-Writer thread.
changelog_1116_li=Optimize IN(...) queries where the values are constant and of the same type.
changelog_1117_li=Restore tool\:the parameter "quiet" was not used and is now removed.
changelog_1118_li=Fix ConcurrentModificationException when creating tables and executing SHOW TABLES in parallel. Reported by Viktor Voytovych.
changelog_1119_li=Serialization is now pluggable using the system property "h2.javaObjectSerializer". Thanks to Sergi Vladykin for the patch\!
changelog_1120_h2=Version 1.3.169 (2012-09-09)
changelog_1121_li=The default jar file is now compiled for Java 6.
changelog_1122_li=The new jar file will probably not end up in the central Maven repository in the next few weeks because Sonatype has disabled automatic synchronization from SourceForge (which they call 'legacy sync' now). It will probably take some time until this is sorted out. The H2 jar files are deployed to http\://h2database.com/m2-repo/com/h2database/h2/maven-metadata.xml and http\://hsql.sourceforge.net/m2-repo/com/h2database/h2/maven-metadata.xml as usual.
changelog_1123_li=A part of the documentation and the H2 Console has been changed to support the Apple retina display.
changelog_1124_li=The CreateCluster tool could not be used if the source database contained a CLOB or BLOB. The root cause was that the TCP server did not synchronize on the session, which caused a problem when using the exclusive mode.
changelog_1125_li=Statement.getQueryTimeout()\:only the first call to this method will query the database. If the query timeout was changed in another way than calling setQueryTimeout, this method will always return the last value. This was changed because Hibernate calls getQueryTimeout() a lot.
changelog_1126_li=Issue 416\:PreparedStatement.setNString throws AbstractMethodError. All implemented JDBC 4 methods that don't break compatibility with Java 5 are now included in the default jar file.
changelog_1127_li=Issue 414\:for some functions, the parameters were evaluated twice (for example "char(nextval(..))" ran "nextval(..)" twice).
changelog_1128_li=The ResultSetMetaData methods getSchemaName and getTableName could return null instead of "" (an empty string) as specified in the JDBC API.
changelog_1129_li=Added compatibility for "SET NAMES" query in MySQL compatibility mode.
changelog_1130_h2=Version 1.3.168 (2012-07-13)
changelog_1131_li=The message "Transaction log could not be truncated" was sometimes written to the .trace.db file even if there was no problem truncating the transaction log.
changelog_1132_li=New system property "h2.serializeJavaObject" (default\:true) that allows to disable serializing Java objects, so that the objects compareTo and toString methods can be used.
changelog_1133_li=Dylan has translated the H2 Console tool to Korean. Thanks a lot\!
changelog_1134_li=Executing the statement CREATE INDEX IF ALREADY EXISTS if the index already exists no longer fails for a read only database.
changelog_1135_li=MVCC\:concurrently updating a row could result in the row to appear deleted in the second connection, if there are multiple unique indexes (or a primary key and at least one unique index). Thanks a lot to Teruo for the patch\!
changelog_1136_li=Fulltext search\:in-memory Lucene indexes are now supported.
changelog_1137_li=Fulltext search\:UUID primary keys are now supported.
changelog_1138_li=Apache Tomcat 7.x will now longer log a warning when unloading the web application, if using a connection pool.
changelog_1139_li=H2 Console\:support the Midori browser (for Debian / Raspberry Pi)
changelog_1140_li=When opening a remote session, don't open a temporary file if the trace level is set to zero
changelog_1141_li=Use HMAC for authenticating remote LOB id's, removing the need for maintaining a cache, and removing the limit on the number of LOBs per result set.
changelog_1142_li=H2 Console\:HTML and XML documents can now be edited in an updatable result set. There is (limited) support for editing multi-line documents.
changelog_1143_h2=Version 1.3.167 (2012-05-23)
changelog_1144_li=H2 Console\:when editing a row, an empty varchar column was replaced with a single space.
changelog_1145_li=Lukas Eder has updated the jOOQ documentation.
changelog_1146_li=Some nested joins could not be executed, for example\:select * from (select * from (select * from a) a right join b b) c;
changelog_1147_li=MS SQL Server compatibility\:ISNULL is now an alias for IFNULL.
changelog_1148_li=Terrence Huang has completed the translation of the H2 Console tool to Chinese. Thanks a lot\!
changelog_1149_li=Server mode\:the number of CLOB / BLOB values that were cached on the server is now the maximum of\:5 times the SERVER_RESULT_SET_FETCH_SIZE (which is 100 by default), and SysProperties.SERVER_CACHED_OBJECTS.
changelog_1150_li=In the trace file, the query execution time was incorrect in some cases, specially for the statement SET TRACE_LEVEL_FILE 2.
changelog_1151_li=The feature LOG_SIZE_LIMIT that was introduced in version 1.3.165 did not always work correctly (specially with regards to multithreading) and has been removed. The message "Transaction log could not be truncated" is still written to the .trace.db file if required.
changelog_1152_li=Then reading from a resource using the prefix "classpath\:", the ContextClassLoader is now used if the resource can't be read otherwise.
changelog_1153_li=DatabaseEventListener now calls setProgress whenever a statement starts and ends.
changelog_1154_li=DatabaseEventListener now calls setProgress periodically while a statement is running.
changelog_1155_li=The table INFORMATION_SCHEMA.FUNCTION_ALIASES now includes a column TYPE_NAME.
changelog_1156_li=Issue 378\: when using views, the wrong values were bound to a parameter in some cases.
changelog_1157_li=Terrence Huang has translated the error messages to Chinese. Thanks a lot\!
changelog_1158_li=TRUNC was added as an alias for TRUNCATE.
changelog_1159_li=Small optimisation for accessing result values by column name.
changelog_1160_li=Fix for bug in Statement.getMoreResults(int)
changelog_1161_li=The SCRIPT statements now supports filtering by schema and table. Thanks a lot to Jacob Qvortrup for providing the patch\!
changelog_1162_h2=Version 1.3.166 (2012-04-08)
changelog_1163_li=Indexes on column that are larger than half the page size (wide indexes) could sometimes get corrupt, resulting in an ArrayIndexOutOfBoundsException in PageBtree.getRow or "Row not found" in PageBtreeLeaf. Also, such indexes used too much disk space.
changelog_1164_li=Server mode\:when retrieving more than 64 rows each containing a CLOB or BLOB, the error message "The object is already closed" was thrown.
changelog_1165_li=ConvertTraceFile\:the time in the trace file is now parsed as a long.
changelog_1166_li=Invalid connection settings are now detected.
changelog_1167_li=Issue 387\:WHERE condition getting pushed into sub-query with LIMIT.
changelog_1168_h2=Version 1.3.165 (2012-03-18)
changelog_1169_li=Better string representation for decimal values (for example 0.00000000 instead of 0E-26).
changelog_1170_li=Prepared statements could only be re-used if the same data types were used the second time they were executed.
changelog_1171_li=In error messages about referential constraint violation, the values are now included.
changelog_1172_li=SCRIPT and RUNSCRIPT\:the password can now be set using a prepared statement. Previously, it was required to be a literal in the SQL statement.
changelog_1173_li=MySQL compatibility\:SUBSTR with a negative start index now works like MySQL.
changelog_1174_li=When enabling autocommit, the transaction is now committed (as required by the JDBC API).
changelog_1175_li=The shell script <code>h2.sh</code> did not work with spaces in the path. It also works now with quoted spaces in the argument list. Thanks a lot to Shimizu Fumiyuki for the patch\!
changelog_1176_li=If the transaction log could not be truncated because of an uncommitted transaction, now "Transaction log could not be truncated" is written to the .trace.db file. Before, the database file was growing and it was hard to find out what the root cause was. To avoid the database file from growing, a new feature to automatically rollback the oldest transaction is available now. To enable it, append ;LOG_SIZE_LIMIT\=32 to the database URL (in that case, the oldest session is rolled back if the transaction log is 32 MB).
changelog_1177_li=ALTER TABLE ADD can now add more than one column at a time.
changelog_1178_li=Issue 380\:ALTER TABLE ADD FOREIGN KEY with an explicit index didn't verify the index can be used, which would lead to a NullPointerException later on.
changelog_1179_li=Issue 384\:the wrong kind of exception (NullPointerException) was thrown in a UNION query with an incorrect ORDER BY expression.
changelog_1180_li=Issue 362\:support LIMIT in UPDATE statements.
changelog_1181_li=Browser\:if no default browser is set, Google Chrome is now used if available. If not available, then Konqueror, Netscape, or Opera is used if available (as before).
changelog_1182_li=CSV tool\:new feature to disable writing the column header (option writeColumnHeader).
changelog_1183_li=CSV tool\:new feature to preserve the case sensitivity of column names (option caseSensitiveColumnNames).
changelog_1184_li=PostgreSQL compatibility\:LOG(x) is base 10 in the PostgreSQL mode.
changelog_1002_li=Improved spatial index and data type.
changelog_1003_li=Issue 467\:OSGi Class Loader (ability to create reference to class in other ClassLoader, for example in another OSGi bundle).
changelog_1004_h2=Version 1.3.173 (2013-07-28)
changelog_1005_li=Support empty statements that just contains a comment.
changelog_1006_li=Server mode\:if there was an error while reading from a LOB, the session was closed in some cases.
changelog_1007_li=Issue 463\:Driver name and version are now the same in OsgiDataSourceFactory and JdbcDatabaseMetaData.
changelog_1008_li=JaQu\:The data type VARCHAR is now (again) used for Strings (no longer TEXT, except when explicitly set).
changelog_1009_li=For in-memory databases, creating an index on a CLOB or BLOB column is no longer supported. This is to simplify the MVTableEngine.
changelog_1011_li=Issue 468\:trunc(timestamp) could return the wrong value (+12 hours), and trunc(number) throw a NullPointerException.
changelog_1012_li=The expression trunc(number) threw a NullPointerException.
changelog_1013_li=Fixed a deadlock when updating LOB's concurrently. See TestLob.testDeadlock2().
changelog_1014_li=Fixed a deadlock related to very large temporary result sets.
changelog_1015_li=Add "-list" command line option to Shell tool so that result-list-mode can be triggered when reading from a file.
changelog_1016_li=Issue 474\:H2 MySQL Compatibility code fails to ignore "COMMENT" in CREATE TABLE, patch from Aaron Azeckoski.
changelog_1017_li=Issue 476\:Broken link in jaqu.html
changelog_1018_li=Fix potential UTF8 encoding issue in org.h2.store.FileStore, reported by Juerg Spiess.
changelog_1019_li=Improve error message when check constraint is broken, test case from Gili (cowwoc).
changelog_1020_li=Improve error message when we have a unique constraint violation, displays the offending key in the error message.
changelog_1021_li=Issue 478\:Support for "SHOW TRANSACTION ISOLATION LEVEL", patch from Andrew Franklin.
changelog_1022_li=Issue 475\:PgServer\:add support for CancelRequest, patch from Andrew Franklin.
changelog_1023_li=Issue 473\:PgServer missing -key option, patch from Andrew Franklin.
changelog_1024_li=Issue 471\:CREATE VIEW does not check user rights, patch from Andrew Franklin.
changelog_1025_li=Issue 477\:PgServer binary transmission of query params is unimplemented, patch from Andrew Franklin.
changelog_1026_li=Issue 479\:Support for SUBSTRING without a FROM condition, patch from Andrew Franklin.
changelog_1027_li=Issue 472\:PgServer does not work with any recent Postgres JDBC driver, patch from Andrew Franklin.
changelog_1028_li=Add syntax for passing additional parameters into custom TableEngine implementations.
changelog_1029_li=Issue 480\:Bugfix post issue 475, 477, patch from Andrew Franklin.
changelog_1030_li=Issue 481\:Further extensions to PgServer to support better support PG JDBC, patch from Andrew Franklin.
changelog_1031_li=Add support for spatial datatype GEOMETRY.
changelog_1032_li=Add support for in-memory spatial index.
changelog_1033_li=change the PageStore\#changeCount field from an int to a long, to cope with databases with very high transaction rates.
changelog_1034_li=Fix a NullPointerException when attempting to add foreign key reference to a view.
changelog_1035_li=Add sufficient ClientInfo support to our javax.sql.Connection implementation to make WebSphere happy.
changelog_1036_li=Issue 482\:class LobStorageBackend$LobInputStream does not override the method InputStream.available().
changelog_1037_li=Fix corruption resulting from a mix of the "WRITE_DELAY\=0" option and "SELECT DISTINCT" queries that don't fit in memory.
changelog_1038_li=Fix the combination of updating a table which contains an LOB, and reading from the LOB at the same time. Previously it would throw an exception, now it works.
changelog_1039_li=Issue 484\:In the H2 Console tool, all schemas starting with "INFO" where hidden. Now they are hidden only if the database is not H2. Patch from "mgcodeact"/"cumer d"
changelog_1040_li=MySQL compatibility, support the "AUTO_INCREMENT\=3" part of the CREATE TABLE statement.
changelog_1041_li=Issue 486\:MySQL compatibility, support the "DEFAULT CHARSET" part of the CREATE TABLE statement.
changelog_1042_li=Issue 487\:support the MySQL "SET foreign_key_checks \=0" command
changelog_1043_li=Issue 490\:support MySQL "USING BTREE" index declaration
changelog_1044_li=Issue 485\:Database get corrupted when column is renamed for which check constraint was defined inside create table statement.
changelog_1045_li=Issue 499\:support MySQL "UNIQUE KEY (ID) USING BTREE" constraint syntax
changelog_1046_li=Issue 501\:"CREATE TABLE .. WITH"not serialized, patch from nico.devel
changelog_1047_li=Avoid problems with runtime-compiled ALIAS methods when people have set the JAVA_TOOL_OPTIONS environment variable.
changelog_1048_h2=Version 1.3.172 (2013-05-25)
changelog_1049_li=Referential integrity\:when adding a referential integrity constraint failed, and if creating the constraint automatically created an index, this index was not removed.
changelog_1050_li=The auto-analyze feature now only reads 1000 rows per table instead of 10000.
changelog_1051_li=The optimization for IN(...) queries combined with OR could result in a strange exception of the type "column x must be included in the group by list".
changelog_1052_li=Issue 454\:Use Charset for type-safety.
changelog_1053_li=Queries with both LIMIT and OFFSET could throw an IllegalArgumentException.
changelog_1054_li=MVStore\:multiple issues were fixed\:460, 461, 462, 464, 466.
changelog_1055_li=MVStore\:larger stores (multiple GB) are now much faster.
changelog_1056_li=When using local temporary tables and not dropping them manually before closing the session, and then killing the process could result in a database that couldn't be opened (except when using the recover tool).
changelog_1057_li=Support TRUNC(timestamp) for improved Oracle compatibility.
changelog_1058_li=Add support for CREATE TABLE TEST (ID BIGSERIAL) for PostgreSQL compatibility. Patch from Jesse Long.
changelog_1059_li=Add new collation command SET BINARY_COLLATION UNSIGNED, helps with people testing BINARY columns in MySQL mode.
changelog_1060_li=Issue 453\:ABBA race conditions in TABLE LINK connection sharing.
changelog_1061_li=Issue 449\:Postgres Serial data type should not automatically be marked as primary key
changelog_1072_li=Security\:the TCP server did not correctly restrict access rights of clients in some cases. This was specially a problem when using the flag "tcpAllowOthers".
changelog_1073_li=H2 Console\:the session timeout can now be configured using the system property "h2.consoleTimeout".
changelog_1074_li=Issue 431\:Improved compatibility with MySQL\:support for "ENGINE\=InnoDB charset\=UTF8" when creating a table.
changelog_1075_li=Issue 249\:Improved compatibility with MySQL in the MySQL mode\:now the methods DatabaseMetaData methods stores*Case*Identifiers return the same as MySQL when using the MySQL mode.
changelog_1076_li=Issue 434\:H2 Console didn't work in the Chrome browser due to a wrong viewport argument.
changelog_1077_li=There was a possibility that the .lock.db file was not deleted when the database was closed, which could slow down opening the database.
changelog_1078_li=The SQL script generated by the "script" command contained inconsistent newlines on Windows.
changelog_1079_li=When using trace level 4 (SLF4J) in the server mode, a directory "trace.db" and an empty file was created on the client side. This is no longer made.
changelog_1080_li=Optimize IN(...) queries\:there was a bug in version 1.3.170 if the type of the left hand side didn't match the type of the right hand side. Fixed.
changelog_1081_li=Optimize IN(...) queries\:there was a bug in version 1.3.170 for comparison of the type "X IN(NULL, NULL)". Fixed.
changelog_1082_li=Timestamps with timezone that were passed as a string were not always converted correctly. For example "2012-11-06T23\:00\:00.000Z" was converted to "2012-11-06" instead of to "2012-11-07" in the timezone CET. Thanks a lot to Steve Hruda for reporting the problem\!
changelog_1083_li=New table engine "org.h2.mvstore.db.MVTableEngine" that internally uses the MVStore to persist data. To try it out, append ";DEFAULT_TABLE_ENGINE\=org.h2.mvstore.db.MVTableEngine" to the database URL. This is still very experimental, and many features are not supported yet. The data is stored in a file with the suffix ".mv.db".
changelog_1084_li=New connection setting "DEFAULT_TABLE_ENGINE" to use a specific table engine if none is set explicitly. This is to simplify testing the MVStore table engine.
changelog_1085_li=MVStore\:encrypted stores are now supported. Only standardized algorithms are used\:PBKDF2, SHA-256, XTS-AES, AES-128.
changelog_1086_li=MVStore\:improved API thanks to Simo Tripodi.
changelog_1087_li=MVStore\:maps can now be renamed.
changelog_1088_li=MVStore\:store the file header also at the end of each chunk, which results in a further reduced number of write operations.
changelog_1089_li=MVStore\:a map implementation that supports concurrent operations.
changelog_1090_li=MVStore\:unified exception handling; the version is included in the messages.
changelog_1091_li=MVStore\:old data is now retained for 45 seconds by default.
changelog_1092_li=MVStore\:compress is now disabled by default, and can be enabled on request.
changelog_1093_li=Support ALTER TABLE ADD ... AFTER. Patch from Andrew Gaul (argaul at gmail.com). Fixes issue 401.
changelog_1094_li=Improved OSGi support. H2 now registers itself as a DataSourceFactory service. Fixes issue 365.
changelog_1095_li=Add a DISK_SPACE_USED system function. Fixes issue 270.
changelog_1096_li=Fix a compile-time ambiguity when compiling with JDK7, thanks to a patch from Lukas Eder.
changelog_1097_li=Supporting dropping an index for Lucene full-text indexes.
changelog_1098_li=Optimized performance for SELECT ... ORDER BY X LIMIT Y OFFSET Z queries for in-memory databases using partial sort (by Sergi Vladykin).
changelog_1099_li=Experimental off-heap memory storage engine "nioMemFS\:" and "nioMemLZF\:", suggestion from Mark Addleman.
changelog_1100_li=Issue 438\: JdbcDatabaseMetaData.getSchemas() is no longer supported as of 1.3.169.
changelog_1101_li=MySQL compatibility\: support for ALTER TABLE tableName MODIFY [COLUMN] columnName columnDef. Patch from Ville Koskela.
changelog_1102_li=Issue 404\: SHOW COLUMNS FROM tableName does not work with ALLOW_LITERALS\=NUMBERS.
changelog_1103_li=Throw an explicit error to make it clear we don't support the TRIGGER combination of SELECT and FOR EACH ROW.
changelog_1104_li=Issue 439\: Utils.sortTopN does not handle single-element arrays.
changelog_1105_h2=Version 1.3.170 (2012-11-30)
changelog_1106_li=Issue 407\: The TriggerAdapter didn't work with CLOB and BLOB columns.
changelog_1107_li=PostgreSQL compatibility\: support for data types BIGSERIAL and SERIAL as an alias for AUTO_INCREMENT.
changelog_1108_li=Issue 417\: H2 Console\: the web session timeout didn't work, resulting in a memory leak. This was only a problem if the H2 Console was run for a long time and many sessions were opened.
changelog_1109_li=Issue 412\: Running the Server tool with just the option "-browser" will now log a warning.
changelog_1110_li=Issue 411\:CloseWatcher registration was not concurrency-safe.
changelog_1111_li=MySQL compatibility\:support for CONCAT_WS. Thanks a lot to litailang for the patch\!
changelog_1112_li=PostgreSQL compatibility\:support for EXTRACT(WEEK FROM dateColumn). Thanks to Prashant Bhat for the patch\!
changelog_1113_li=Fix for a bug where we would sometimes use the wrong unique constraint to validate foreign key constraints.
changelog_1114_li=Support BOM at the beginning of files for the RUNSCRIPT command
changelog_1115_li=Fix in calling SET @X \=IDENTITY() where it would return NULL incorrectly
changelog_1116_li=Fix ABBA deadlock between adding a constraint and the H2-Log-Writer thread.
changelog_1117_li=Optimize IN(...) queries where the values are constant and of the same type.
changelog_1118_li=Restore tool\:the parameter "quiet" was not used and is now removed.
changelog_1119_li=Fix ConcurrentModificationException when creating tables and executing SHOW TABLES in parallel. Reported by Viktor Voytovych.
changelog_1120_li=Serialization is now pluggable using the system property "h2.javaObjectSerializer". Thanks to Sergi Vladykin for the patch\!
changelog_1121_h2=Version 1.3.169 (2012-09-09)
changelog_1122_li=The default jar file is now compiled for Java 6.
changelog_1123_li=The new jar file will probably not end up in the central Maven repository in the next few weeks because Sonatype has disabled automatic synchronization from SourceForge (which they call 'legacy sync' now). It will probably take some time until this is sorted out. The H2 jar files are deployed to http\://h2database.com/m2-repo/com/h2database/h2/maven-metadata.xml and http\://hsql.sourceforge.net/m2-repo/com/h2database/h2/maven-metadata.xml as usual.
changelog_1124_li=A part of the documentation and the H2 Console has been changed to support the Apple retina display.
changelog_1125_li=The CreateCluster tool could not be used if the source database contained a CLOB or BLOB. The root cause was that the TCP server did not synchronize on the session, which caused a problem when using the exclusive mode.
changelog_1126_li=Statement.getQueryTimeout()\:only the first call to this method will query the database. If the query timeout was changed in another way than calling setQueryTimeout, this method will always return the last value. This was changed because Hibernate calls getQueryTimeout() a lot.
changelog_1127_li=Issue 416\:PreparedStatement.setNString throws AbstractMethodError. All implemented JDBC 4 methods that don't break compatibility with Java 5 are now included in the default jar file.
changelog_1128_li=Issue 414\:for some functions, the parameters were evaluated twice (for example "char(nextval(..))" ran "nextval(..)" twice).
changelog_1129_li=The ResultSetMetaData methods getSchemaName and getTableName could return null instead of "" (an empty string) as specified in the JDBC API.
changelog_1130_li=Added compatibility for "SET NAMES" query in MySQL compatibility mode.
changelog_1131_h2=Version 1.3.168 (2012-07-13)
changelog_1132_li=The message "Transaction log could not be truncated" was sometimes written to the .trace.db file even if there was no problem truncating the transaction log.
changelog_1133_li=New system property "h2.serializeJavaObject" (default\:true) that allows to disable serializing Java objects, so that the objects compareTo and toString methods can be used.
changelog_1134_li=Dylan has translated the H2 Console tool to Korean. Thanks a lot\!
changelog_1135_li=Executing the statement CREATE INDEX IF ALREADY EXISTS if the index already exists no longer fails for a read only database.
changelog_1136_li=MVCC\:concurrently updating a row could result in the row to appear deleted in the second connection, if there are multiple unique indexes (or a primary key and at least one unique index). Thanks a lot to Teruo for the patch\!
changelog_1137_li=Fulltext search\:in-memory Lucene indexes are now supported.
changelog_1138_li=Fulltext search\:UUID primary keys are now supported.
changelog_1139_li=Apache Tomcat 7.x will now longer log a warning when unloading the web application, if using a connection pool.
changelog_1140_li=H2 Console\:support the Midori browser (for Debian / Raspberry Pi)
changelog_1141_li=When opening a remote session, don't open a temporary file if the trace level is set to zero
changelog_1142_li=Use HMAC for authenticating remote LOB id's, removing the need for maintaining a cache, and removing the limit on the number of LOBs per result set.
changelog_1143_li=H2 Console\:HTML and XML documents can now be edited in an updatable result set. There is (limited) support for editing multi-line documents.
changelog_1144_h2=Version 1.3.167 (2012-05-23)
changelog_1145_li=H2 Console\:when editing a row, an empty varchar column was replaced with a single space.
changelog_1146_li=Lukas Eder has updated the jOOQ documentation.
changelog_1147_li=Some nested joins could not be executed, for example\:select * from (select * from (select * from a) a right join b b) c;
changelog_1148_li=MS SQL Server compatibility\:ISNULL is now an alias for IFNULL.
changelog_1149_li=Terrence Huang has completed the translation of the H2 Console tool to Chinese. Thanks a lot\!
changelog_1150_li=Server mode\:the number of CLOB / BLOB values that were cached on the server is now the maximum of\:5 times the SERVER_RESULT_SET_FETCH_SIZE (which is 100 by default), and SysProperties.SERVER_CACHED_OBJECTS.
changelog_1151_li=In the trace file, the query execution time was incorrect in some cases, specially for the statement SET TRACE_LEVEL_FILE 2.
changelog_1152_li=The feature LOG_SIZE_LIMIT that was introduced in version 1.3.165 did not always work correctly (specially with regards to multithreading) and has been removed. The message "Transaction log could not be truncated" is still written to the .trace.db file if required.
changelog_1153_li=Then reading from a resource using the prefix "classpath\:", the ContextClassLoader is now used if the resource can't be read otherwise.
changelog_1154_li=DatabaseEventListener now calls setProgress whenever a statement starts and ends.
changelog_1155_li=DatabaseEventListener now calls setProgress periodically while a statement is running.
changelog_1156_li=The table INFORMATION_SCHEMA.FUNCTION_ALIASES now includes a column TYPE_NAME.
changelog_1157_li=Issue 378\: when using views, the wrong values were bound to a parameter in some cases.
changelog_1158_li=Terrence Huang has translated the error messages to Chinese. Thanks a lot\!
changelog_1159_li=TRUNC was added as an alias for TRUNCATE.
changelog_1160_li=Small optimisation for accessing result values by column name.
changelog_1161_li=Fix for bug in Statement.getMoreResults(int)
changelog_1162_li=The SCRIPT statements now supports filtering by schema and table. Thanks a lot to Jacob Qvortrup for providing the patch\!
changelog_1163_h2=Version 1.3.166 (2012-04-08)
changelog_1164_li=Indexes on column that are larger than half the page size (wide indexes) could sometimes get corrupt, resulting in an ArrayIndexOutOfBoundsException in PageBtree.getRow or "Row not found" in PageBtreeLeaf. Also, such indexes used too much disk space.
changelog_1165_li=Server mode\:when retrieving more than 64 rows each containing a CLOB or BLOB, the error message "The object is already closed" was thrown.
changelog_1166_li=ConvertTraceFile\:the time in the trace file is now parsed as a long.
changelog_1167_li=Invalid connection settings are now detected.
changelog_1168_li=Issue 387\:WHERE condition getting pushed into sub-query with LIMIT.
changelog_1169_h2=Version 1.3.165 (2012-03-18)
changelog_1170_li=Better string representation for decimal values (for example 0.00000000 instead of 0E-26).
changelog_1171_li=Prepared statements could only be re-used if the same data types were used the second time they were executed.
changelog_1172_li=In error messages about referential constraint violation, the values are now included.
changelog_1173_li=SCRIPT and RUNSCRIPT\:the password can now be set using a prepared statement. Previously, it was required to be a literal in the SQL statement.
changelog_1174_li=MySQL compatibility\:SUBSTR with a negative start index now works like MySQL.
changelog_1175_li=When enabling autocommit, the transaction is now committed (as required by the JDBC API).
changelog_1176_li=The shell script <code>h2.sh</code> did not work with spaces in the path. It also works now with quoted spaces in the argument list. Thanks a lot to Shimizu Fumiyuki for the patch\!
changelog_1177_li=If the transaction log could not be truncated because of an uncommitted transaction, now "Transaction log could not be truncated" is written to the .trace.db file. Before, the database file was growing and it was hard to find out what the root cause was. To avoid the database file from growing, a new feature to automatically rollback the oldest transaction is available now. To enable it, append ;LOG_SIZE_LIMIT\=32 to the database URL (in that case, the oldest session is rolled back if the transaction log is 32 MB).
changelog_1178_li=ALTER TABLE ADD can now add more than one column at a time.
changelog_1179_li=Issue 380\:ALTER TABLE ADD FOREIGN KEY with an explicit index didn't verify the index can be used, which would lead to a NullPointerException later on.
changelog_1180_li=Issue 384\:the wrong kind of exception (NullPointerException) was thrown in a UNION query with an incorrect ORDER BY expression.
changelog_1181_li=Issue 362\:support LIMIT in UPDATE statements.
changelog_1182_li=Browser\:if no default browser is set, Google Chrome is now used if available. If not available, then Konqueror, Netscape, or Opera is used if available (as before).
changelog_1183_li=CSV tool\:new feature to disable writing the column header (option writeColumnHeader).
changelog_1184_li=CSV tool\:new feature to preserve the case sensitivity of column names (option caseSensitiveColumnNames).
changelog_1185_li=PostgreSQL compatibility\:LOG(x) is base 10 in the PostgreSQL mode.
cheatSheet_1000_h1=H2 Database Engine Cheat Sheet
cheatSheet_1001_h2=Using H2
cheatSheet_1002_a=H2
...
...
@@ -2298,98 +2299,96 @@ mvstore_1029_li=Old versions of the data can be read concurrently with all other
mvstore_1030_li=Transaction are supported (including concurrent transactions and 2-phase commit).
mvstore_1031_li=The tool is very modular. It supports pluggable data types / serialization, pluggable map implementations (B-tree, R-tree, concurrent B-tree currently), BLOB storage, and a file system abstraction to support encrypted files and zip files.
mvstore_1032_h2=Example Code
mvstore_1033_p=\ The following sample code show how to create a store, open a map, add some data, and access the current and an old version\:
mvstore_1033_p=\ The following sample code show how to use the tool\:
mvstore_1034_h2=Store Builder
mvstore_1035_p=\ The <code>MVStore.Builder</code> provides a fluid interface to build a store if more complex configuration options are used. The following code contains all supported configuration options\:
mvstore_1036_li=cacheSizeMB\:the cache size in MB.
mvstore_1037_li=compressData\:compress the data when storing.
mvstore_1038_li=encryptionKey\:the encryption key for file encryption.
mvstore_1039_li=fileName\:the name of the file, for file based stores.
mvstore_1040_li=readOnly\:open the file in read-only mode.
mvstore_1041_li=writeBufferSize\:the size of the write buffer in MB.
mvstore_1042_li=writeDelay\:the maximum delay until committed changes are stored (unless stored explicitly).
mvstore_1043_h2=R-Tree
mvstore_1044_p=\ The <code>MVRTreeMap</code> is an R-tree implementation that supports fast spatial queries. It can be used as follows\:
mvstore_1045_p=\ The default number of dimensions is 2. To use a different number of dimensions, call <code>new MVRTreeMap.Builder<String>().dimensions(3)</code>. The minimum number of dimensions is 1, the maximum is 255.
mvstore_1046_h2=Features
mvstore_1047_h3=Maps
mvstore_1048_p=\ Each store supports a set of named maps. A map is sorted by key, and supports the common lookup operations, including access to the first and last key, iterate over some or all keys, and so on.
mvstore_1049_p=\ Also supported, and very uncommon for maps, is fast index lookup\:the keys of the map can be accessed like a list (get the key at the given index, get the index of a certain key). That means getting the median of two keys is trivial, and range of keys can be counted very quickly. The iterator supports fast skipping. This is possible because internally, each map is organized in the form of a counted B+-tree.
mvstore_1050_p=\ In database terms, a map can be used like a table, where the key of the map is the primary key of the table, and the value is the row. A map can also represent an index, where the key of the map is the key of the index, and the value of the map is the primary key of the table (for non-unique indexes, the key of the map must also contain the primary key).
mvstore_1051_h3=Versions
mvstore_1052_p=\ Multiple versions are supported. A version is a snapshot of all the data of all maps at a given point in time. A transaction is a number of actions between two versions.
mvstore_1053_p=\ Versions are not immediately persisted; instead, only the version counter is incremented. If there is a change after switching to a new version, a snapshot of the old version is kept in memory, so that it can still be read.
mvstore_1054_p=\ Old persisted versions are readable until the old data was explicitly overwritten. Creating a snapshot is fast\:only the pages that are changed after a snapshot are copied. This behavior is also called COW (copy on write).
mvstore_1055_p=\ Rollback is supported (rollback to any old in-memory version or an old persisted version).
mvstore_1036_li=backgroundExceptionListener\:a listener for exceptions that could occur while writing in the background.
mvstore_1037_li=cacheSize\:the cache size in MB.
mvstore_1038_li=compressData\:compress the data when storing.
mvstore_1039_li=encryptionKey\:the encryption key for file encryption.
mvstore_1040_li=fileName\:the name of the file, for file based stores.
mvstore_1041_li=pageSplitSize\:the point where pages are split.
mvstore_1042_li=readOnly\:open the file in read-only mode.
mvstore_1043_li=writeBufferSize\:the size of the write buffer in MB.
mvstore_1044_li=writeDelay\:the maximum delay in milliseconds until committed changes are stored in the background.
mvstore_1045_h2=R-Tree
mvstore_1046_p=\ The <code>MVRTreeMap</code> is an R-tree implementation that supports fast spatial queries. It can be used as follows\:
mvstore_1047_p=\ The default number of dimensions is 2. To use a different number of dimensions, call <code>new MVRTreeMap.Builder<String>().dimensions(3)</code>. The minimum number of dimensions is 1, the maximum is 255.
mvstore_1048_h2=Features
mvstore_1049_h3=Maps
mvstore_1050_p=\ Each store contains a set of named maps. A map is sorted by key, and supports the common lookup operations, including access to the first and last key, iterate over some or all keys, and so on.
mvstore_1051_p=\ Also supported, and very uncommon for maps, is fast index lookup\:the entries of the map can be be efficiently accessed like a random-access list (get the entry at the given index), and the index of a key can be calculated efficiently. That also means getting the median of two keys is very fast, and a range of keys can be counted very quickly. The iterator supports fast skipping. This is possible because internally, each map is organized in the form of a counted B+-tree.
mvstore_1052_p=\ In database terms, a map can be used like a table, where the key of the map is the primary key of the table, and the value is the row. A map can also represent an index, where the key of the map is the key of the index, and the value of the map is the primary key of the table (for non-unique indexes, the key of the map must also contain the primary key).
mvstore_1053_h3=Versions
mvstore_1054_p=\ Multiple versions are supported. A version is a snapshot of all the data of all maps at a given point in time. Versions are not immediately persisted; instead, only the version counter is incremented. If there is a change after switching to a new version, a snapshot of the old version is kept in memory, so that it can still be read. Old persisted versions are readable until the old data was explicitly overwritten. Creating a snapshot is fast\:only the pages that are changed after a snapshot are copied. This behavior is also called COW (copy on write). Rollback is supported (rollback to any old in-memory version or an old persisted version).
mvstore_1055_p=\ The following sample code show how to create a store, open a map, add some data, and access the current and an old version\:
mvstore_1056_h3=Transactions
mvstore_1057_p=\ The multi-version support is the basis for the transaction support. In the simple case, when only one transaction is open at a time, rolling back the transaction only requires to revert to an old version.
mvstore_1058_p=\ To support multiple concurrent open transactions, a transaction utility is included, the <code>TransactionStore</code>. This utility stores the changed entries in a separate map, similar to a transaction log (except that only the key of a changed row is stored, and the entries of a transaction are removed when the transaction is committed). The storage overhead of this utility is very small compared to the overhead of a regular transaction log. The tool supports PostgreSQL style "read committed" transaction isolation. There is no limit on the size of a transaction (the log is not kept in memory). The tool supports savepoints, two-phase commit, and other features typically available in a database.
mvstore_1057_p=\ To support multiple concurrent open transactions, a transaction utility is included, the <code>TransactionStore</code>. The tool supports PostgreSQL style "read committed" transaction isolation with savepoints, two-phase commit, and other features typically available in a database. There is no limit on the size of a transaction (the log is written to disk for large or long running transactions).
mvstore_1058_p=\ Internally, this utility stores the old versions of changed entries in a separate map, similar to a transaction log (except that entries of a closed transaction are removed, and the log is usually not stored for short transactions). For common use cases, the storage overhead of this utility is very small compared to the overhead of a regular transaction log.
mvstore_1059_h3=In-Memory Performance and Usage
mvstore_1060_p=\ Performance of in-memory operations is comparable with <code>java.util.TreeMap</code> (many operations are actually faster), but usually slower than <code>java.util.HashMap</code>.
mvstore_1061_p=\ The memory overhead for large maps is slightly better than for the regular map implementations, but there is a higher overhead per map. For maps with less than 25 entries, the regular map implementations use less memory on average.
mvstore_1061_p=\ The memory overhead for large maps is slightly better than for the regular map implementations, but there is a higher overhead per map. For maps with less than about 25 entries, the regular map implementations need less memory.
mvstore_1062_p=\ If no file name is specified, the store operates purely in memory. Except for persisting data, all features are supported in this mode (multi-versioning, index lookup, R-tree and so on). If a file name is specified, all operations occur in memory (with the same performance characteristics) until data is persisted.
mvstore_1063_h3=Pluggable Data Types
mvstore_1064_p=\ Serialization is pluggable. The default serialization currently supports many common data types, and uses Java serialization for other objects. The following classes are currently directly supported\:<code>Boolean, Byte, Short, Character, Integer, Long, Float, Double, BigInteger, BigDecimal, String, UUID, Date</code> and arrays (both primitive arrays and object arrays).
mvstore_1065_p=\ Parameterized data types are supported (for example one could build a string data type that limits the length for some reason).
mvstore_1066_p=\ The storage engine itself does not have any length limits, so that keys, values, pages, and chunks can be very big (as big as fits in memory). Also, there is no inherent limit to the number of maps and chunks. Due to using a log structured storage, there is no special case handling for large keys or pages.
mvstore_1067_h3=BLOB Support
mvstore_1068_p=\ There is a mechanism that stores large binary objects by splitting them into smaller blocks. This allows to store objects that don't fit in memory. Streaming as well as random access reads on such objects are supported. This tool is written on top of the store (only using the map interface).
mvstore_1068_p=\ There is a mechanism that stores large binary objects by splitting them into smaller blocks. This allows to store objects that don't fit in memory. Streaming as well as random access reads on such objects are supported. This tool is written on top of the store, using only the map interface.
mvstore_1069_h3=R-Tree and Pluggable Map Implementations
mvstore_1070_p=\ The map implementation is pluggable. In addition to the default <code>MVMap</code> (multi-version map), there is a multi-version R-tree map implementation for spatial operations (contain and intersection; nearest neighbor is not yet implemented).
mvstore_1070_p=\ The map implementation is pluggable. In addition to the default <code>MVMap</code> (multi-version map), there is a map that supports concurrent write operations, and a multi-version R-tree map implementation for spatial operations.
mvstore_1071_h3=Concurrent Operations and Caching
mvstore_1072_p=\ The default map implementation supports concurrent reads on old versions of the data. All such read operations can occur in parallel. Concurrent reads from the page cache, as well as concurrent reads from the file system are supported.
mvstore_1073_p=\ Storing changes can occur concurrently to modifying the data, as it operates on a snapshot.
mvstore_1074_p=\ Caching is done on the page level. The page cache is a concurrent LIRS cache, which should be resistant against scan operations.
mvstore_1075_p=\ The default map implementation does not support concurrent modification operations on a map (the same as <code>HashMap</code> and <code>TreeMap</code>). Similar to those classes, the map tries to detect concurrent modification.
mvstore_1076_p=\ With the <code>MVMapConcurrent</code> implementation, read operations even on the newest version can happen concurrently with all other operations, without risk of corruption. This comes with slightly reduced speed in single threaded mode, the same as with other <code>ConcurrentHashMap</code> implementations. Write operations first read the relevant area from disk to memory (this can happen concurrently), and only then modify the data. The in-memory part of write operations is synchronized.
mvstore_1077_p=\ For fully scalable concurrent write operations to a map (in-memory and to disk), the map could be split into multiple maps in different stores ('sharding'). The plan is to add such a mechanism later when needed.
mvstore_1078_h3=Log Structured Storage
mvstore_1079_p=\ Changes are buffered in memory, and once enough changes have accumulated, they are written in one continuous disk write operation. (According to a test, write throughput of a common SSD gets higher the larger the block size, until a block size of 2 MB, and then does not further increase.) By default, committed changes are automatically written once every second in a background thread, even if only little data was changed. Changes can also be written explicitly by calling <code>store()</code>. To avoid out of memory, uncommitted changes are also written when needed, however they are rolled back when closing the store, or at the latest (when the store was not correctly closed) when opening the store.
mvstore_1080_p=\ When storing, all changed pages are serialized, optionally compressed using the LZF algorithm, and written sequentially to a free area of the file. Each such change set is called a chunk. All parent pages of the changed B-trees are stored in this chunk as well, so that each chunk also contains the root of each changed map (which is the entry point to read this version of the data). There is no separate index\:all data is stored as a list of pages. Per store, there is one additional map that contains the metadata (the list of maps, where the root page of each map is stored, and the list of chunks).
mvstore_1081_p=\ There are usually two write operations per chunk\:one to store the chunk data (the pages), and one to update the file header (so it points to the latest chunk). If the chunk is appended at the end of the file, the file header is only written at the end of the chunk.
mvstore_1082_p=\ There is no transaction log, no undo log, and there are no in-place updates (however unused chunks are overwritten by default).
mvstore_1083_p=\ Old data is kept for at least 45 seconds (configurable), so that there are no explicit sync operations required to guarantee data consistency, but an application can also sync explicitly when needed. To reuse disk space, the chunks with the lowest amount of live data are compacted (the live data is simply stored again in the next chunk). To improve data locality and disk space usage, the plan is to automatically defragment and compact data.
mvstore_1084_p=\ Compared to traditional storage engines (that use a transaction log, undo log, and main storage area), the log structured storage is simpler, more flexible, and typically needs less disk operations per change, as data is only written once instead of twice or 3 times, and because the B-tree pages are always full (they are stored next to each other) and can be easily compressed. But temporarily, disk space usage might actually be a bit higher than for a regular database, as disk space is not immediately re-used (there are no in-place updates).
mvstore_1085_h3=File System Abstraction, File Locking and Online Backup
mvstore_1086_p=\ The file system is pluggable (the same file system abstraction is used as H2 uses). The file can be encrypted using an encrypting file system. Other file system implementations support reading from a compressed zip or jar file.
mvstore_1087_p=\ Each store may only be opened once within a JVM. When opening a store, the file is locked in exclusive mode, so that the file can only be changed from within one process. Files can be opened in read-only mode, in which case a shared lock is used.
mvstore_1088_p=\ The persisted data can be backed up to a different file at any time, even during write operations (online backup). To do that, automatic disk space reuse needs to be first disabled, so that new data is always appended at the end of the file. Then, the file can be copied (the file handle is available to the application).
mvstore_1089_h3=Encrypted Files
mvstore_1090_p=\ File encryption ensures the data can only be read with the correct password. Data can be encrypted as follows\:
mvstore_1091_p=\ The following algorithms and settings are used\:
mvstore_1092_li=The password char array is cleared after use, to reduce the risk that the password is stolen even if the attacker has access to the main memory.
mvstore_1093_li=The password is hashed according to the PBKDF2 standard, using the SHA-256 hash algorithm.
mvstore_1094_li=The length of the salt is 64 bits, so that an attacker can not use a pre-calculated password hash table (rainbow table). It is generated using a cryptographically secure random number generator.
mvstore_1095_li=To speed up opening an encrypted stores on Android, the number of PBKDF2 iterations is 10. The higher the value, the better the protection against brute-force password cracking attacks, but the slower is opening a file.
mvstore_1096_li=The file itself is encrypted using the standardized disk encryption mode XTS-AES. Only little more than one AES-128 round per block is needed.
mvstore_1097_h3=Tools
mvstore_1098_p=\ There is a tool (<code>MVStoreTool</code>) to dump the contents of a file.
mvstore_1099_h3=Exception Handling
mvstore_1100_p=\ This tool does not throw checked exceptions. Instead, unchecked exceptions are thrown if needed. The error message always contains the version of the tool. The following exceptions can occur\:
mvstore_1101_code=IllegalStateException
mvstore_1102_li=\ if a map was already closed or an IO exception occurred, for example if the file was locked, is already closed, could not be opened or closed, if reading or writing failed, if the file is corrupt, or if there is an internal error in the tool.
mvstore_1103_code=IllegalArgumentException
mvstore_1104_li=\ if a method was called with an illegal argument.
mvstore_1105_code=UnsupportedOperationException
mvstore_1106_li=\ if a method was called that is not supported, for example trying to modify a read-only map or view.
mvstore_1107_code=ConcurrentModificationException
mvstore_1108_li=\ if the object is modified concurrently.
mvstore_1109_h3=Table Engine for H2
mvstore_1110_p=\ The plan is to use the MVStore as the default storage engine for the H2 database in the future (supporting SQL, JDBC, transactions, MVCC, and so on). This is work in progress. To try it out, append <code>;MV_STORE\=TRUE</code> to the database URL. In general, functionality and performance should be similar than the current default storage engine (the page store). There are a few features that have not been implemented yet or are not complete\:
mvstore_1111_li=There is still a file <code>.h2.db</code>, and the <code>.lock.db</code> file is still used to lock a database (long term, the plan is to no longer use those files).
mvstore_1112_li=The database file(s) sometimes do not shrink as expected.
mvstore_1113_h2=Similar Projects and Differences to Other Storage Engines
mvstore_1114_p=\ Unlike similar storage engines like LevelDB and Kyoto Cabinet, the MVStore is written in Java and can easily be embedded in a Java and Android application.
mvstore_1115_p=\ The MVStore is somewhat similar to the Berkeley DB Java Edition because it is also written in Java, and is also a log structured storage, but the H2 license is more liberal.
mvstore_1116_p=\ Like SQLite, the MVStore keeps all data in one file. Unlike SQLite, the MVStore uses is a log structured storage. The plan is to make the MVStore both easier to use as well as faster than SQLite. In a recent (very simple) test, the MVStore was about twice as fast as SQLite on Android.
mvstore_1117_p=\ The API of the MVStore is similar to MapDB (previously known as JDBM) from Jan Kotek, and some code is shared between MapDB and JDBM. However, unlike MapDB, the MVStore uses is a log structured storage. The MVStore does not have a record size limit.
mvstore_1118_h2=Current State
mvstore_1119_p=\ The code is still experimental at this stage. The API as well as the behavior may partially change. Features may be added and removed (even thought the main features will stay).
mvstore_1120_h2=Requirements
mvstore_1121_p=\ The MVStore is included in the latest H2 jar file.
mvstore_1122_p=\ There are no special requirements to use it. The MVStore should run on any JVM as well as on Android.
mvstore_1123_p=\ To build just the MVStore (without the database engine), run\:
mvstore_1124_p=\ This will create the file <code>bin/h2mvstore-1.3.173.jar</code> (about 130 KB).
mvstore_1072_p=\ The default map implementation supports concurrent reads on old versions of the data. All such read operations can occur in parallel. Concurrent reads from the page cache, as well as concurrent reads from the file system are supported. Writing changes to the file can occur concurrently to modifying the data, as writing operates on a snapshot.
mvstore_1073_p=\ Caching is done on the page level. The page cache is a concurrent LIRS cache, which should be resistant against scan operations.
mvstore_1074_p=\ The default map implementation does not support concurrent modification operations on a map (the same as <code>HashMap</code> and <code>TreeMap</code>). Similar to those classes, the map tries to detect concurrent modification.
mvstore_1075_p=\ With the <code>MVMapConcurrent</code> implementation, read operations even on the newest version can happen concurrently with all other operations, without risk of corruption. This comes with slightly reduced speed in single threaded mode, the same as with other <code>ConcurrentHashMap</code> implementations. Write operations first read the relevant area from disk to memory (this can happen concurrently), and only then modify the data. The in-memory part of write operations is synchronized.
mvstore_1076_p=\ For fully scalable concurrent write operations to a map (in-memory and to disk), the map could be split into multiple maps in different stores ('sharding'). The plan is to add such a mechanism later when needed.
mvstore_1077_h3=Log Structured Storage
mvstore_1078_p=\ Internally, changes are buffered in memory, and once enough changes have accumulated, they are written in one continuous disk write operation. (According to a test, write throughput of a common SSD increases with write block size, until a block size of 2 MB, and then does not further increase.) By default, committed changes are automatically written once every second in a background thread, even if only little data was changed. Changes can also be written explicitly by calling <code>store()</code>. To avoid running out of memory, uncommitted changes are also written when needed, however they are rolled back when closing the store, or at the latest (when the store was not closed normally) when opening the store.
mvstore_1079_p=\ When storing, all changed pages are serialized, optionally compressed using the LZF algorithm, and written sequentially to a free area of the file. Each such change set is called a chunk. All parent pages of the changed B-trees are stored in this chunk as well, so that each chunk also contains the root of each changed map (which is the entry point for reading this version of the data). There is no separate index\:all data is stored as a list of pages. Per store, there is one additional map that contains the metadata (the list of maps, where the root page of each map is stored, and the list of chunks).
mvstore_1080_p=\ There are usually two write operations per chunk\:one to store the chunk data (the pages), and one to update the file header (so it points to the latest chunk). If the chunk is appended at the end of the file, the file header is only written at the end of the chunk. There is no transaction log, no undo log, and there are no in-place updates (however, unused chunks are overwritten by default).
mvstore_1081_p=\ Old data is kept for at least 45 seconds (configurable), so that there are no explicit sync operations required to guarantee data consistency. An application can also sync explicitly when needed. To reuse disk space, the chunks with the lowest amount of live data are compacted (the live data is stored again in the next chunk). To improve data locality and disk space usage, the plan is to automatically defragment and compact data.
mvstore_1082_p=\ Compared to traditional storage engines (that use a transaction log, undo log, and main storage area), the log structured storage is simpler, more flexible, and typically needs less disk operations per change, as data is only written once instead of twice or 3 times, and because the B-tree pages are always full (they are stored next to each other) and can be easily compressed. But temporarily, disk space usage might actually be a bit higher than for a regular database, as disk space is not immediately re-used (there are no in-place updates).
mvstore_1083_h3=File System Abstraction, File Locking and Online Backup
mvstore_1084_p=\ The file system is pluggable (the same file system abstraction is used as H2 uses). The file can be encrypted using an encrypting file system. Other file system implementations support reading from a compressed zip or jar file.
mvstore_1085_p=\ Each store may only be opened once within a JVM. When opening a store, the file is locked in exclusive mode, so that the file can only be changed from within one process. Files can be opened in read-only mode, in which case a shared lock is used.
mvstore_1086_p=\ The persisted data can be backed up to a different file at any time, even during write operations (online backup). To do that, automatic disk space reuse needs to be first disabled, so that new data is always appended at the end of the file. Then, the file can be copied (the file handle is available to the application).
mvstore_1087_h3=Encrypted Files
mvstore_1088_p=\ File encryption ensures the data can only be read with the correct password. Data can be encrypted as follows\:
mvstore_1089_p=\ The following algorithms and settings are used\:
mvstore_1090_li=The password char array is cleared after use, to reduce the risk that the password is stolen even if the attacker has access to the main memory.
mvstore_1091_li=The password is hashed according to the PBKDF2 standard, using the SHA-256 hash algorithm.
mvstore_1092_li=The length of the salt is 64 bits, so that an attacker can not use a pre-calculated password hash table (rainbow table). It is generated using a cryptographically secure random number generator.
mvstore_1093_li=To speed up opening an encrypted stores on Android, the number of PBKDF2 iterations is 10. The higher the value, the better the protection against brute-force password cracking attacks, but the slower is opening a file.
mvstore_1094_li=The file itself is encrypted using the standardized disk encryption mode XTS-AES. Only little more than one AES-128 round per block is needed.
mvstore_1095_h3=Tools
mvstore_1096_p=\ There is a tool (<code>MVStoreTool</code>) to dump the contents of a file.
mvstore_1097_h3=Exception Handling
mvstore_1098_p=\ This tool does not throw checked exceptions. Instead, unchecked exceptions are thrown if needed. The error message always contains the version of the tool. The following exceptions can occur\:
mvstore_1099_code=IllegalStateException
mvstore_1100_li=\ if a map was already closed or an IO exception occurred, for example if the file was locked, is already closed, could not be opened or closed, if reading or writing failed, if the file is corrupt, or if there is an internal error in the tool. For such exceptions, an error code is added to the exception so that the application can distinguish between different error cases.
mvstore_1101_code=IllegalArgumentException
mvstore_1102_li=\ if a method was called with an illegal argument.
mvstore_1103_code=UnsupportedOperationException
mvstore_1104_li=\ if a method was called that is not supported, for example trying to modify a read-only map or view.
mvstore_1105_code=ConcurrentModificationException
mvstore_1106_li=\ if the object is modified concurrently.
mvstore_1107_h3=Table Engine for H2
mvstore_1108_p=\ The plan is to use the MVStore as the default storage engine for the H2 database in the future (supporting SQL, JDBC, transactions, MVCC, and so on). This is work in progress. To try it out, append <code>;MV_STORE\=TRUE</code> to the database URL. In general, functionality and performance should be similar than the current default storage engine (the page store). There are a few features that have not been implemented yet or are not complete\:
mvstore_1109_li=There is still a file <code>.h2.db</code>, and the <code>.lock.db</code> file is still used to lock a database (long term, the plan is to no longer use those files).
mvstore_1110_li=The database file(s) sometimes do not shrink as expected.
mvstore_1111_h2=Similar Projects and Differences to Other Storage Engines
mvstore_1112_p=\ Unlike similar storage engines like LevelDB and Kyoto Cabinet, the MVStore is written in Java and can easily be embedded in a Java and Android application.
mvstore_1113_p=\ The MVStore is somewhat similar to the Berkeley DB Java Edition because it is also written in Java, and is also a log structured storage, but the H2 license is more liberal.
mvstore_1114_p=\ Like SQLite 3, the MVStore keeps all data in one file. Unlike SQLite 3, the MVStore uses is a log structured storage. The plan is to make the MVStore both easier to use as well as faster than SQLite 3. In a recent (very simple) test, the MVStore was about twice as fast as SQLite 3 on Android.
mvstore_1115_p=\ The API of the MVStore is similar to MapDB (previously known as JDBM) from Jan Kotek, and some code is shared between MVStore and MapDB. However, unlike MapDB, the MVStore uses is a log structured storage. The MVStore does not have a record size limit.
mvstore_1116_h2=Current State
mvstore_1117_p=\ The code is still experimental at this stage. The API as well as the behavior may partially change. Features may be added and removed (even thought the main features will stay).
mvstore_1118_h2=Requirements
mvstore_1119_p=\ The MVStore is included in the latest H2 jar file.
mvstore_1120_p=\ There are no special requirements to use it. The MVStore should run on any JVM as well as on Android.
mvstore_1121_p=\ To build just the MVStore (without the database engine), run\:
mvstore_1122_p=\ This will create the file <code>bin/h2mvstore-1.3.173.jar</code> (about 130 KB).