# Roadmap New (feature) requests will usually be added at the very end of the list. The priority is increased for important and popular requests. Of course, patches are always welcome, but are not always applied as is. See also Providing Patches. ## Version 1.5.x: Planned Changes Replace file password hash with file encryption key; validate encryption key when connecting. Remove "set binary collation" feature. Remove the encryption algorithm XTEA. Disallow referencing other tables in a table (via constraints for example). Remove PageStore features like compress_lob. ## Version 1.4.x: Planned Changes Change license to MPL 2.0. Automatic migration from 1.3 databases to 1.4. Option to disable the file name suffix somehow (issue 447). ## Priority 1 Bugfixes. More tests with MULTI_THREADED=1 (and MULTI_THREADED with MVCC): Online backup (using the 'backup' statement). Server side cursors. ## Priority 2 Support hints for the optimizer (which index to use, enforce the join order). Full outer joins. Access rights: remember the owner of an object. Create, alter and drop privileges. COMMENT: allow owner of object to change it. Issue 208: Access rights for schemas. Test multi-threaded in-memory db access. MySQL, MS SQL Server compatibility: support case sensitive (mixed case) identifiers without quotes. Support GRANT SELECT, UPDATE ON [schemaName.] *. Migrate database tool (also from other database engines). For Oracle, maybe use DBMS_METADATA.GET_DDL / GET_DEPENDENT_DDL. Clustering: support mixed clustering mode (one embedded, others in server mode). Clustering: reads should be randomly distributed (optional) or to a designated database on RAM (parameter: READ_FROM=3). Window functions: RANK() and DENSE_RANK(), partition using OVER(). select *, count(*) over() as fullCount from ... limit 4; PostgreSQL catalog: use BEFORE SELECT triggers instead of views over metadata tables. Compatibility: automatically load functions from a script depending on the mode - see FunctionsMySQL.java, issue 211. Test very large databases and LOBs (up to 256 GB). Store all temp files in the temp directory. Don't use temp files, specially not deleteOnExit (bug 4513817: File.deleteOnExit consumes memory). Also to allow opening client / server (remote) connections when using LOBs. Make DDL (Data Definition) operations transactional. Deferred integrity checking (DEFERRABLE INITIALLY DEFERRED). Groovy Stored Procedures: http://groovy.codehaus.org/GSQL Add a migration guide (list differences between databases). Optimization: automatic index creation suggestion using the trace file? Fulltext search Lucene: analyzer configuration, mergeFactor. Compression performance: don't allocate buffers, compress / expand in to out buffer. Rebuild index functionality to shrink index size and improve performance. Console: add accesskey to most important commands (A, AREA, BUTTON, INPUT, LABEL, LEGEND, TEXTAREA). Test performance again with SQL Server, Oracle, DB2. Test with Spatial DB in a box / JTS: http://www.opengeospatial.org/standards/sfs - OpenGIS Implementation Specification. Write more tests and documentation for MVCC (Multi Version Concurrency Control). Find a tool to view large text file (larger than 100 MB), with find, page up and down (like less), truncate before / after. Implement, test, document XAConnection and so on. Pluggable data type (for streaming, hashing, compression, validation, conversion, encryption). CHECK: find out what makes CHECK=TRUE slow, move to assertions. Drop with invalidate views (so that source code is not lost). Check what other databases do exactly. Index usage for (ID, NAME)=(1, 'Hi'); document. Set a connection read only (Connection.setReadOnly) or using a connection parameter. Access rights: finer grained access control (grant access for specific functions). ROW_NUMBER() OVER([PARTITION BY columnName][ORDER BY columnName]). Version check: docs / web console (using Javascript), and maybe in the library (using TCP/IP). Web server classloader: override findResource / getResourceFrom. Cost for embedded temporary view is calculated wrong, if result is constant. Count index range query (count(*) where id between 10 and 20). Performance: update in-place. Clustering: when a database is back alive, automatically synchronize with the master (requires readable transaction log). Database file name suffix: a way to use no or a different suffix (for example using a slash). Eclipse plugin. Asynchronous queries to support publish/subscribe: SELECT ... FOR READ WAIT [maxMillisToWait]. See also MS SQL Server "Query Notification". Fulltext search (native): reader / tokenizer / filter. Linked schema using CSV files: one schema for a directory of files; support indexes for CSV files. iReport to support H2. Include SMTP (mail) client (alert on cluster failure, low disk space,...). Option for SCRIPT to append to a file. JSON parser and functions. Copy database: tool with config GUI and batch mode, extensible (example: compare). Document, implement tool for long running transactions using user-defined compensation statements. Support SET TABLE DUAL READONLY. Events for: database Startup, Connections, Login attempts, Disconnections, Prepare (after parsing), Web Server. See http://docs.openlinksw.com/virtuoso/fn_dbev_startup.html Optimization: simpler log compression. Support more standard INFORMATION_SCHEMA tables, as defined in SQL standard. Compatibility: in MySQL, HSQLDB, /0.0 is NULL; in PostgreSQL, Derby: division by zero. HSQLDB: 0.0e1 / 0.0e1 is NaN. Functional tables should accept parameters from other tables (see FunctionMultiReturn) SELECT * FROM TEST T, P2C(T.A, T.R). Custom class loader to reload functions on demand. Test http://mysql-je.sourceforge.net/ H2 Console: the webclient could support more features like phpMyAdmin. Support Oracle functions: TO_NUMBER. Work on the Java to C converter. The HELP information schema can be directly exposed in the Console. Maybe use the 0x1234 notation for binary fields, see MS SQL Server. Support Oracle CONNECT BY in some way: http://www.adp-gmbh.ch/ora/sql/connect_by.html http://philip.greenspun.com/sql/trees.html SQL Server 2005, Oracle: support COUNT(*) OVER(). See http://www.orafusion.com/art_anlytc.htm SQL 2003: http://www.wiscorp.com/sql_2003_standard.zip Version column (number/sequence and timestamp based). Test and document UPDATE TEST SET (ID, NAME) = (SELECT ID*10, NAME || '!' FROM TEST T WHERE T.ID=TEST.ID). Max memory rows / max undo log size: use block count / row size not row count. Implement point-in-time recovery. Support PL/SQL (programming language / control flow statements). LIKE: improved version for larger texts (currently using naive search). Throw an exception when the application calls getInt on a Long (optional). Default date format for input and output (local date constants). Document ROWNUM usage for reports: SELECT ROWNUM, * FROM (subquery). File system that writes to two file systems (replication, replicating file system). Standalone tool to get relevant system properties and add it to the trace output. Support 'call proc(1=value)' (PostgreSQL, Oracle). Console: improve editing data (Tab, Shift-Tab, Enter, Up, Down, Shift+Del?). Console: autocomplete Ctrl+Space inserts template. Option to encrypt .trace.db file. Auto-Update feature for database, .jar file. ResultSet SimpleResultSet.readFromURL(String url): id varchar, state varchar, released timestamp. Partial indexing (see PostgreSQL). Add GUI to build a custom version (embedded, fulltext,...) using build flags. http://rubyforge.org/projects/hypersonic/ Add a sample application that runs the H2 unit test and writes the result to a file (so it can be included in the user app). Table order: ALTER TABLE TEST ORDER BY NAME DESC (MySQL compatibility). Backup tool should work with other databases as well. Console: -ifExists doesn't work for the console. Add a flag to disable other dbs. Check if 'FSUTIL behavior set disablelastaccess 1' improves the performance (fsutil behavior query disablelastaccess). Java static code analysis: https://pmd.github.io/ Compatibility for CREATE SCHEMA AUTHORIZATION. Implement Clob / Blob truncate and the remaining functionality. File locking: writing a system property to detect concurrent access from the same VM (different classloaders). Pure SQL triggers (example: update parent table if the child table is changed). Add H2 to Gem (Ruby install system). Support linked JCR tables. Native fulltext search: min word length; store word positions. Add an option to the SCRIPT command to generate only portable / standard SQL. Updatable views: create 'instead of' triggers automatically if possible (simple cases first). Improve create index performance. Compact databases without having to close the database (vacuum). Implement more JDBC 4.0 features. Support TRANSFORM / PIVOT as in MS Access. Support updatable views with join on primary keys (to extend a table). Public interface for functions (not public static). Support reading the transaction log. Feature matrix. Updatable result set on table without primary key or unique index. Allow execution time prepare for SELECT * FROM CSVREAD(?, 'columnNameString') Support data type INTERVAL Support nested transactions (possibly using savepoints internally). Add a benchmark for bigger databases, and one for many users. Compression in the result set over TCP/IP. Support curtimestamp (like curtime, curdate). Support ANALYZE {TABLE|INDEX} tableName COMPUTE|ESTIMATE|DELETE STATISTICS ptnOption options. Release locks (shared or exclusive) on demand Support OUTER UNION Support parameterized views (similar to CSVREAD, but using just SQL for the definition) A way (JDBC driver) to map an URL (jdbc:h2map:c1) to a connection object Support dynamic linked schema (automatically adding/updating/removing tables) Clustering: adding a node should be very fast and without interrupting clients (very short lock) Compatibility: # is the start of a single line comment (MySQL) but date quote (Access). Mode specific Run benchmarks with Android, Java 7, java -server Optimizations: faster hash function for strings. DatabaseEventListener: callback for all operations (including expected time, RUNSCRIPT) and cancel functionality Benchmark: add a graph to show how databases scale (performance/database size) Implement a SQLData interface to map your data over to a custom object In the MySQL and PostgreSQL mode, use lower case identifiers by default (DatabaseMetaData.storesLowerCaseIdentifiers = true) Support multiple directories (on different hard drives) for the same database Server protocol: use challenge response authentication, but client sends hash(user+password) encrypted with response Support EXEC[UTE] (doesn't return a result set, compatible to MS SQL Server) Support native XML data type - see http://en.wikipedia.org/wiki/SQL/XML Support triggers with a string property or option: SpringTrigger, OSGITrigger MySQL compatibility: update test1 t1, test2 t2 set t1.id = t2.id where t1.id = t2.id; Ability to resize the cache array when resizing the cache Time based cache writing (one second after writing the log) Check state of H2 driver for DDLUtils: http://issues.apache.org/jira/browse/DDLUTILS-185 Index usage for REGEXP LIKE. Compatibility: add a role DBA (like ADMIN). Better support multiple processors for in-memory databases. Support N'text' Support compatibility for jdbc:hsqldb:res: HSQLDB compatibility: automatically convert to the next 'higher' data type. Example: cast(2000000000 as int) + cast(2000000000 as int); (HSQLDB: long; PostgreSQL: integer out of range) Provide an Java SQL builder with standard and H2 syntax Trace: write OS, file system, JVM,... when opening the database Support indexes for views (probably requires materialized views) Document SET SEARCH_PATH, BEGIN, EXECUTE, parameters Server: use one listener (detect if the request comes from an PG or TCP client) Optimize SELECT MIN(ID), MAX(ID), COUNT(*) FROM TEST WHERE ID BETWEEN 100 AND 200 Sequence: PostgreSQL compatibility (rename, create) http://www.postgresql.org/docs/8.2/static/sql-altersequence.html Support a special trigger on all tables to allow building a transaction log reader. File system with a background writer thread; test if this is faster Better document the source code (high level documentation). Support select * from dual a left join dual b on b.x=(select max(x) from dual) Optimization: don't lock when the database is read-only Issue 146: Support merge join. Integrate spatial functions from http://geosysin.iict.ch/irstv-trac/wiki/H2spatial/Download Cluster: hot deploy (adding a node at runtime). Support DatabaseMetaData.insertsAreDetected: updatable result sets should detect inserts. Oracle: support DECODE method (convert to CASE WHEN). Native search: support "phrase search", wildcard search (* and ?), case-insensitive search, boolean operators, and grouping Improve documentation of access rights. Support opening a database that is in the classpath, maybe using a new file system. Workaround: detect jar file using getClass().getProtectionDomain().getCodeSource().getLocation(). Remember the user defined data type (domain) of a column. Auto-server: add option to define the port range or list. Support Jackcess (MS Access databases) Built-in methods to write large objects (BLOB and CLOB): FILE_WRITE('test.txt', 'Hello World') Improve time to open large databases (see mail 'init time for distributed setup') Move Maven 2 repository from hsql.sf.net to h2database.sf.net Java 1.5 tool: JdbcUtils.closeSilently(s1, s2,...) Optimize A=? OR B=? to UNION if the cost is lower. Javadoc: document design patterns used Support custom collators, for example for natural sort (for text that contains numbers). Write an article about SQLInjection (h2/src/docsrc/html/images/SQLInjection.txt) Convert SQL-injection-2.txt to html document, include SQLInjection.java sample Support OUT parameters in user-defined procedures. Web site design: http://www.igniterealtime.org/projects/openfire/index.jsp HSQLDB compatibility: Openfire server uses: CREATE SCHEMA PUBLIC AUTHORIZATION DBA; CREATE USER SA PASSWORD ""; GRANT DBA TO SA; SET SCHEMA PUBLIC Translation: use ${.} in help.csv Translated .pdf Recovery tool: bad blocks should be converted to INSERT INTO SYSTEM_ERRORS(...), and things should go into the .trace.db file RECOVER=2 to backup the database, run recovery, open the database Recovery should work with encrypted databases Corruption: new error code, add help Space reuse: after init, scan all storages and free those that don't belong to a live database object Access rights: add missing features (users should be 'owner' of objects; missing rights for sequences; dropping objects) Support NOCACHE table option (Oracle). Support table partitioning. The database should be kept open for a longer time when using the server mode. Javadocs: for each tool, add a copy & paste sample in the class level. Javadocs: add @author tags. Fluent API for tools: Server.createTcpServer().setPort(9081).setPassword(password).start(); MySQL compatibility: real SQL statement for DESCRIBE TEST Use a default delay of 1 second before closing a database. Write (log) to system table before adding to internal data structures. Support direct lookup for MIN and MAX when using WHERE (see todo.txt / Direct Lookup). Support other array types (String[], double[]) in PreparedStatement.setObject(int, Object) (with test case). Oracle compatibility: support NLS_DATE_FORMAT. Support for Thread.interrupt to cancel running statements. Cluster: add feature to make sure cluster nodes can not get out of sync (for example by stopping one process). H2 Console: support CLOB/BLOB download using a link. Support flashback queries as in Oracle. Import / Export of fixed with text files. HSQLDB compatibility: automatic data type for SUM if value is the value is too big (by default use the same type as the data). Improve the optimizer to select the right index for special cases: where id between 2 and 4 and booleanColumn Linked tables: make hidden columns available (Oracle: rowid and ora_rowscn columns). H2 Console: in-place autocomplete. Support large databases: split database files to multiple directories / disks (similar to tablespaces). H2 Console: support configuration option for fixed width (monospace) font. Native fulltext search: support analyzers (specially for Chinese, Japanese). Automatically compact databases from time to time (as a background process). Test Eclipse DTP. H2 Console: autocomplete: keep the previous setting executeBatch: option to stop at the first failed statement. Implement OLAP features as described here: http://www.devx.com/getHelpOn/10MinuteSolution/16573/0/page/5 Support Oracle ROWID (unique identifier for each row). MySQL compatibility: alter table add index i(c), add constraint c foreign key(c) references t(c); Server mode: improve performance for batch updates. Applets: support read-only databases in a zip file (accessed as a resource). Long running queries / errors / trace system table. Better document FTL_SEARCH, FTL_SEARCH_DATA. Sequences: CURRVAL should be session specific. Compatibility with PostgreSQL. Index creation using deterministic functions. ANALYZE: for unique indexes that allow null, count the number of null. MySQL compatibility: multi-table delete: DELETE .. FROM .. [,...] USING - See http://dev.mysql.com/doc/refman/5.0/en/delete.html AUTO_SERVER: support changing IP addresses (disable a network while the database is open). Avoid using java.util.Calendar internally because it's slow, complicated, and buggy. Support TRUNCATE .. CASCADE like PostgreSQL. Fulltext search: lazy result generation using SimpleRowSource. Fulltext search: support alternative syntax: WHERE FTL_CONTAINS(name, 'hello'). MySQL compatibility: support INSERT INTO table SET column1 = value1, column2 = value2 Docs: add a one line description for each functions and SQL statements at the top (in the link section). Javadoc search: weight for titles should be higher ('random' should list Functions as the best match). Replace information_schema tables with regular tables that are automatically re-built when needed. Use indexes. Issue 50: Oracle compatibility: support calling 0-parameters functions without parenthesis. Make constants obsolete. MySQL, HSQLDB compatibility: support where 'a'=1 (not supported by Derby, PostgreSQL) Finer granularity for SLF4J trace - See http://code.google.com/p/h2database/issues/detail?id=62 Add database creation date and time to the database. Support ASSERTION. MySQL compatibility: support comparing 1='a' Support PostgreSQL lock modes: http://www.postgresql.org/docs/8.3/static/explicit-locking.html PostgreSQL compatibility: test DbVisualizer and Squirrel SQL using a new PostgreSQL JDBC driver. RunScript should be able to read from system in (or quite mode for Shell). Natural join: support select x from dual natural join dual. Support using system properties in database URLs (may be a security problem). Natural join: somehow support this: select a.x, b.x, x from dual a natural join dual b Use the Java service provider mechanism to register file systems and function libraries. MySQL compatibility: for auto_increment columns, convert 0 to next value (as when inserting NULL). Optimization for multi-column IN: use an index if possible. Example: (A, B) IN((1, 2), (2, 3)). Optimization for EXISTS: convert to inner join or IN(..) if possible. Serialized file lock: support long running queries. Network: use 127.0.0.1 if other addresses don't work. Pluggable network protocol (currently Socket/ServerSocket over TCP/IP) - see also TransportServer with master slave replication. Support reading JCR data: one table per node type; query table; cache option OSGi: create a sample application, test, document. help.csv: use complete examples for functions; run as test case. Functions to calculate the memory and disk space usage of a table, a row, or a value. Re-implement PooledConnection; use a lightweight connection object. Doclet: convert tests in javadocs to a java class. Doclet: format fields like methods, but support sorting by name and value. Doclet: shrink the html files. MySQL compatibility: support SET NAMES 'latin1' - See also http://code.google.com/p/h2database/issues/detail?id=56 Allow to scan index backwards starting with a value (to better support ORDER BY DESC). Java Service Wrapper: try http://yajsw.sourceforge.net/ Batch parameter for INSERT, UPDATE, and DELETE, and commit after each batch. See also MySQL DELETE. Use a lazy and auto-close input stream (open resource when reading, close on eof). Connection pool: 'reset session' command (delete temp tables, rollback, auto-commit true). Improve SQL documentation, see http://www.w3schools.com/sql/ MySQL compatibility: DatabaseMetaData.stores*() methods should return the same values. Test with SquirrelSQL. MS SQL Server compatibility: support DATEPART syntax. Sybase/DB2/Oracle compatibility: support out parameters in stored procedures - See http://code.google.com/p/h2database/issues/detail?id=83 Support INTERVAL data type (see Oracle and others). Combine Server and Console tool (only keep Server). Store the Lucene index in the database itself. Oracle compatibility: support DECODE(x, ...). MVCC: compare concurrent update behavior with PostgreSQL and Oracle. HSQLDB compatibility: CREATE FUNCTION (maybe using a Function interface). HSQLDB compatibility: support CALL "java.lang.Math.sqrt"(2.0) Support comma as the decimal separator in the CSV tool. Compatibility: Java functions with SQLJ Part1 http://www.acm.org/sigmod/record/issues/9912/standards.pdf.gz Compatibility: Java functions with SQL/PSM (Persistent Stored Modules) - need to find the documentation. CACHE_SIZE: automatically use a fraction of Runtime.maxMemory - maybe automatically the second level cache. PostgreSQL compatibility: when in PG mode, treat BYTEA data like PG. Support =ANY(array) as in PostgreSQL. See also http://www.postgresql.org/docs/8.0/interactive/arrays.html IBM DB2 compatibility: support PREVIOUS VALUE FOR sequence. Compatibility: use different LIKE ESCAPE characters depending on the mode (disable for Derby, HSQLDB, DB2, Oracle, MSSQLServer). Oracle compatibility: support CREATE SYNONYM table FOR schema.table. FTP: document the server, including -ftpTask option to execute / kill remote processes FTP: problems with multithreading? FTP: implement SFTP / FTPS FTP: access to a database (.csv for a table, a directory for a schema, a file for a lob, a script.sql file). More secure default configuration if remote access is enabled. Improve database file locking (maybe use native file locking). The current approach seems to be problematic if the file system is on a remote share (see Google Group 'Lock file modification time is in the future'). Document internal features such as BELONGS_TO_TABLE, NULL_TO_DEFAULT, SEQUENCE. Issue 107: Prefer using the ORDER BY index if LIMIT is used. An index on (id, name) should be used for a query: select * from t where s=? order by i Support reading sequences using DatabaseMetaData.getTables(null, null, null, new String[]{"SEQUENCE"}). See PostgreSQL. Add option to enable TCP_NODELAY using Socket.setTcpNoDelay(true). Maybe disallow = within database names (jdbc:h2:mem:MODE=DB2 means database name MODE=DB2). Fast alter table add column. Improve concurrency for in-memory database operations. Issue 122: Support for connection aliases for remote tcp connections. Fast scrambling (strong encryption doesn't help if the password is included in the application). H2 Console: support -webPassword to require a password to access preferences or shutdown. Issue 126: The index name should be "IDX_" plus the constraint name unless there is a conflict, in which case append a number. Issue 127: Support activation/deactivation of triggers Issue 130: Custom log event listeners Issue 132: Use Java enum trigger type. Issue 134: IBM DB2 compatibility: session global variables. Cluster: support load balance with values for each server / auto detect. FTL_SET_OPTION(keyString, valueString) with key stopWords at first. Pluggable access control mechanism. Fulltext search (Lucene): support streaming CLOB data. Document/example how to create and read an encrypted script file. Fulltext search (Lucene): only prefix column names with _ if they already start with _. Instead of DATA / QUERY / modified use _DATA, _QUERY, _MODIFIED if possible. Support a way to create or read compressed encrypted script files using an API. Scripting language support (Javascript). The network client should better detect if the server is not an H2 server and fail early. H2 Console: support CLOB/BLOB upload. Database file lock: detect hibernate / standby / very slow threads (compare system time). Automatic detection of redundant indexes. Maybe reject join without "on" (except natural join). Implement GiST (Generalized Search Tree for Secondary Storage). Function to read a number of bytes/characters from an BLOB or CLOB. Issue 156: Support SELECT ? UNION SELECT ?. Automatic mixed mode: support a port range list (to avoid firewall problems). Support the pseudo column rowid, oid, _rowid_. H2 Console / large result sets: stream early instead of keeping a whole result in-memory Support TRUNCATE for linked tables. UNION: evaluate INTERSECT before UNION (like most other database except Oracle). Delay creating the information schema, and share metadata columns. TCP Server: use a nonce (number used once) to protect unencrypted channels against replay attacks. Simplify running scripts and recovery: CREATE FORCE USER (overwrites an existing user). Support CREATE DATABASE LINK (a custom JDBC driver is already supported). Support large GROUP BY operations. Issue 216. Issue 163: Allow to create foreign keys on metadata types. Logback: write a native DBAppender. Cache size: don't use more cache than what is available. Allow to defragment at runtime (similar to SHUTDOWN DEFRAG) in a background thread. Tree index: Instead of an AVL tree, use a general balanced trees or a scapegoat tree. User defined functions: allow to store the bytecode (of just the class, or the jar file of the extension) in the database. Compatibility: ResultSet.getObject() on a CLOB (TEXT) should return String for PostgreSQL and MySQL. Optimizer: WHERE X=? AND Y IN(?), it always uses the index on Y. Should be cost based. Common Table Expression (CTE) / recursive queries: support parameters. Issue 314. Oracle compatibility: support INSERT ALL. Issue 178: Optimizer: index usage when both ascending and descending indexes are available. Issue 179: Related subqueries in HAVING clause. IBM DB2 compatibility: NOT NULL WITH DEFAULT. Similar to MySQL Mode.convertInsertNullToZero. Creating primary key: always create a constraint. Maybe use a different page layout: keep the data at the head of the page, and ignore the tail (don't store / read it). This may increase write / read performance depending on the file system. Indexes of temporary tables are currently kept in-memory. Is this how it should be? The Shell tool should support the same built-in commands as the H2 Console. Maybe use PhantomReference instead of finalize. Database file name suffix: should only have one dot by default. Example: .h2db Issue 196: Function based indexes Fix the disk space leak (killing the process at the exact right moment will increase the disk space usage; this space is not re-used). See TestDiskSpaceLeak.java ROWNUM: Oracle compatibility when used within a subquery. Issue 198. Allow to access the database over HTTP (possibly using port 80) and a servlet in a REST way. ODBC: encrypted databases are not supported because the ;CIPHER= can not be set. Support CLOB and BLOB update, specially conn.createBlob().setBinaryStream(1); Optimizer: index usage when both ascending and descending indexes are available. Issue 178. Issue 306: Support schema specific domains. Triggers: support user defined execution order. Oracle: CREATE OR REPLACE TRIGGER TEST_2 BEFORE INSERT ON TEST FOR EACH ROW FOLLOWS TEST_1. SQL specifies that multiple triggers should be fired in time-of-creation order. PostgreSQL uses name order, which was judged to be more convenient. Derby: triggers are fired in the order in which they were created. PostgreSQL compatibility: combine "users" and "roles". See: http://www.postgresql.org/docs/8.1/interactive/user-manag.html Improve documentation of system properties: only list the property names, default values, and description. Support running totals / cumulative sum using SUM(..) OVER(..). Improve object memory size calculation. Use constants for known VMs, or use reflection to call java.lang.instrument.Instrumentation.getObjectSize(Object objectToSize) Triggers: NOT NULL checks should be done after running triggers (Oracle behavior, maybe others). Common Table Expression (CTE) / recursive queries: support INSERT INTO ... SELECT ... Issue 219. Common Table Expression (CTE) / recursive queries: support non-recursive queries. Issue 217. Common Table Expression (CTE) / recursive queries: avoid endless loop. Issue 218. Common Table Expression (CTE) / recursive queries: support multiple named queries. Issue 220. Common Table Expression (CTE) / recursive queries: identifier scope may be incorrect. Issue 222. Log long running transactions (similar to long running statements). Parameter data type is data type of other operand. Issue 205. Some combinations of nested join with right outer join are not supported. DatabaseEventListener.openConnection(id) and closeConnection(id). Listener or authentication module for new connections, or a way to restrict the number of different connections to a tcp server, or to prevent to login with the same username and password from different IPs. Possibly using the DatabaseEventListener API, or a new API. Compatibility for data type CHAR (Derby, HSQLDB). Issue 212. Optimizer: use a histogram of the data, specially for non-normal distributions. Trigger: allow declaring as source code (like functions). User defined aggregate: allow declaring as source code (like functions). The error "table not found" is sometimes caused by using the wrong database. Add "(this database is empty)" to the exception message if applicable. MySQL + PostgreSQL compatibility: support string literal escape with \n. PostgreSQL compatibility: support string literal escape with double \\. Document the TCP server "management_db". Maybe include the IP address of the client. Use javax.tools.JavaCompilerTool instead of com.sun.tools.javac.Main If a database object was not found in the current schema, but one with the same name existed in another schema, included that in the error message. Optimization to use an index for OR when using multiple keys: where (key1 = ? and key2 = ?) OR (key1 = ? and key2 = ?) Issue 302: Support optimizing queries with both inner and outer joins, as in: select * from test a inner join test b on a.id=b.id inner join o on o.id=a.id where b.x=1 (the optimizer should swap a and b here). See also TestNestedJoins, tag "swapInnerJoinTables". Move table to a different schema (rename table to a different schema), possibly using ALTER TABLE ... SET SCHEMA ...; nioMapped file system: automatically fall back to regular (non mapped) IO if there is a problem (out of memory exception for example). Column as parameter of function table. Issue 228. Connection pool: detect ;AUTOCOMMIT=FALSE in the database URL, and if set, disable autocommit for all connections. Compatibility with MS Access: support "&" to concatenate text. The BACKUP statement should not synchronize on the database, and therefore should not block other users. Document the database file format. Support reading LOBs. Require appending DANGEROUS=TRUE when using certain dangerous settings such as LOG=0, LOG=1, LOCK_MODE=0, disabling FILE_LOCK,... Support UDT (user defined types) similar to how Apache Derby supports it: check constraint, allow to use it in Java functions as parameters (return values already seem to work). Encrypted file system (use cipher text stealing so file length doesn't need to decrypt; 4 KB header per file, optional compatibility with current encrypted database files). Issue 229: SELECT with simple OR tests uses tableScan when it could use indexes. GROUP BY queries should use a temporary table if there are too many rows. BLOB: support random access when reading. CLOB: support random access when reading (this is harder than for BLOB as data is stored in UTF-8 form). Compatibility: support SELECT INTO (as an alias for CREATE TABLE ... AS SELECT ...). Compatibility with MySQL: support SELECT INTO OUTFILE (cannot be an existing file) as an alias for CSVWRITE(...). Compatibility with MySQL: support non-strict mode (sql_mode = "") any data that is too large for the column will just be truncated or set to the default value. The full condition should be sent to the linked table, not just the indexed condition. Example: TestLinkedTableFullCondition Compatibility with IBM DB2: CREATE PROCEDURE. Compatibility with IBM DB2: SQL cursors. Single-column primary key values are always stored explicitly. This is not required. Compatibility with MySQL: support CREATE TABLE TEST(NAME VARCHAR(255) CHARACTER SET UTF8). CALL is incompatible with other databases because it returns a result set, so that CallableStatement.execute() returns true. Compatibility for ARRAY data type (Oracle: VARRAY(n) of VARCHAR(m); HSQLDB: VARCHAR(n) ARRAY; Postgres: VARCHAR(n)[]). PostgreSQL compatible array literal syntax: ARRAY[['a', 'b'], ['c', 'd']] PostgreSQL compatibility: UPDATE with FROM. Issue 297: Oracle compatibility for "at time zone". IBM DB2 compatibility: IDENTITY_VAL_LOCAL(). Support SQL/XML. Support concurrent opening of databases. Improved error message and diagnostics in case of network configuration problems. TRUNCATE should reset the identity columns as in MySQL and MS SQL Server (and possibly other databases). Adding a primary key should make the columns 'not null' unless if there is a row with null (compatibility with MySQL, PostgreSQL, HSQLDB; not Derby). ARRAY data type: support Integer[] and so on in Java functions (currently only Object[] is supported). MySQL compatibility: LOCK TABLES a READ, b READ - see also http://dev.mysql.com/doc/refman/5.0/en/lock-tables.html The HTML to PDF converter should use http://code.google.com/p/wkhtmltopdf/ Issue 303: automatically convert "X NOT IN(SELECT...)" to "NOT EXISTS(...)". MySQL compatibility: update test1 t1, test2 t2 set t1.name=t2.name where t1.id=t2.id. Issue 283: Improve performance of H2 on Android. Support INSERT INTO / UPDATE / MERGE ... RETURNING to retrieve the generated key(s). Column compression option - see http://groups.google.com/group/h2-database/browse_thread/thread/3e223504e52671fa/243da82244343f5d MS SQL Server compatibility: support @@ROWCOUNT. Issue 311: Serialized lock mode: executeQuery of write operations fails. PostgreSQL compatibility: support PgAdmin III (specially the function current_setting). Support SELECT ... FOR UPDATE with joins (supported by PostgreSQL, MySQL, and HSQLDB; but not Derby). Support SELECT ... FOR UPDATE OF [field-list] (supported by PostgreSQL, MySQL, and HSQLDB; but not Derby). Support SELECT ... FOR UPDATE OF [table-list] (supported by PostgreSQL, HSQLDB, Sybase). TRANSACTION_ID() for in-memory databases. TRANSACTION_ID() should be long (same as HSQLDB and PostgreSQL). Support [INNER | OUTER] JOIN USING(column [,...]). Support NATURAL [ { LEFT | RIGHT } [ OUTER ] | INNER ] JOIN (Derby, Oracle) GROUP BY columnNumber (similar to ORDER BY columnNumber) (MySQL, PostgreSQL, SQLite; not by HSQLDB and Derby). Sybase / MS SQL Server compatibility: CONVERT(..) parameters are swapped. Index conditions: WHERE AGE>1 should not scan through all rows with AGE=1. PHP support: H2 should support PDO, or test with PostgreSQL PDO. Outer joins: if no column of the outer join table is referenced, the outer join table could be removed from the query. Cluster: allow using auto-increment and identity columns by ensuring executed in lock-step. MySQL compatibility: index names only need to be unique for the given table. Issue 352: constraints: distinguish between 'no action' and 'restrict'. Currently, only restrict is supported, and 'no action' is internally mapped to 'restrict'. The database meta data returns 'restrict' in all cases. Issue 348: Oracle compatibility: division should return a decimal result. Read rows on demand: instead of reading the whole row, only read up to that column that is requested. Keep an pointer to the data area and the column id that is already read. Long running transactions: log session id when detected. Optimization: "select id from test" should use the index on id even without "order by". Issue 362: LIMIT support for UPDATE statements (MySQL compatibility). Sybase SQL Anywhere compatibility: SELECT TOP ... START AT ... Use Java 6 SQLException subclasses. Issue 390: RUNSCRIPT FROM '...' CONTINUE_ON_ERROR Use Java 6 exceptions: SQLDataException, SQLSyntaxErrorException, SQLTimeoutException,.. ## Not Planned HSQLDB (did) support this: select id i from test where i<0 (other databases don't). Supporting it may break compatibility. String.intern (so that Strings can be compared with ==) will not be used because some VMs have problems when used extensively. In prepared statements, identifier names (table names and so on) can not be parameterized. Adding such a feature would complicate the source code without providing reasonable speedup, and would slow down regular prepared statements.