提交 22752adb authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 ded04941
...@@ -4,4 +4,4 @@ if exist bin/org/h2/build/Build.class goto buildOK ...@@ -4,4 +4,4 @@ if exist bin/org/h2/build/Build.class goto buildOK
if not exist bin mkdir bin if not exist bin mkdir bin
javac -sourcepath src/tools -d bin src/tools/org/h2/build/*.java javac -sourcepath src/tools -d bin src/tools/org/h2/build/*.java
:buildOK :buildOK
java -cp "bin;%JAVA_HOME%/lib/tools.jar;temp" org.h2.build.Build %1 %2 %3 %4 %5 java -Xmx512m -cp "bin;%JAVA_HOME%/lib/tools.jar;temp" org.h2.build.Build %1 %2 %3 %4 %5
\ No newline at end of file \ No newline at end of file
...@@ -8,4 +8,4 @@ if [ ! -f "bin/org/h2/build/Build.class" ] ; then ...@@ -8,4 +8,4 @@ if [ ! -f "bin/org/h2/build/Build.class" ] ; then
fi fi
javac -sourcepath src/tools -d bin src/tools/org/h2/build/*.java javac -sourcepath src/tools -d bin src/tools/org/h2/build/*.java
fi fi
java -cp "bin:$JAVA_HOME/lib/tools.jar:temp" org.h2.build.Build $@ java -Xms512m -cp "bin:$JAVA_HOME/lib/tools.jar:temp" org.h2.build.Build $@
...@@ -40,7 +40,7 @@ H2 Database Engine ...@@ -40,7 +40,7 @@ H2 Database Engine
</p> </p>
<p> <p>
For details about changes, see the <a href="history.html">Change Log</a>. For details about changes, see the <a href="changelog.html">Change Log</a>.
</p> </p>
</div></td></tr></table><!-- analytics --></body></html> </div></td></tr></table><!-- analytics --></body></html>
...@@ -37,26 +37,22 @@ Roadmap ...@@ -37,26 +37,22 @@ Roadmap
<h2>Priority 1</h2> <h2>Priority 1</h2>
<ul> <ul>
<li>Write more tests and documentation for MVCC (Multi Version Concurrency Control) <li>Write more tests and documentation for MVCC (Multi Version Concurrency Control)
</li><li>Row level locking
</li><li>RECOVER=1 should automatically recover, =2 should run the recovery tool if required </li><li>RECOVER=1 should automatically recover, =2 should run the recovery tool if required
</li><li>More tests with MULTI_THREADED=1 </li><li>More tests with MULTI_THREADED=1
</li><li>Test with Spatial DB in a box / JTS (http://docs.codehaus.org/display/GEOS/SpatialDBBox) </li><li>Test with Spatial DB in a box / JTS (http://docs.codehaus.org/display/GEOS/SpatialDBBox)
</li><li>Optimization: result set caching (like MySQL) </li><li>Optimization: result set caching (like MySQL)
</li><li>Server side cursors </li><li>Server side cursors
</li><li>Row level locking
</li><li>Long running queries / errors / trace system table </li><li>Long running queries / errors / trace system table
</li><li>Migrate database tool (also from other database engines) </li><li>Migrate database tool (also from other database engines)
</li><li>Shutdown compact </li><li>Shutdown compact
</li><li>Document server mode, embedded mode, web app mode, dual mode (server+embedded)
</li><li>Updatable result sets: DatabaseMetaData.ownUpdatesAreVisible = true (for insert, delete, update) Simple solution: automatically calls 'refresh' when the result was changed. Compare with other databases.
</li></ul> </li></ul>
<h2>Priority 2</h2> <h2>Priority 2</h2>
<ul> <ul>
<li>Automatic mode: jdbc:h2:auto: (embedded mode if possible, if not use server mode). Keep the server running until all have disconnected. <li>Automatic mode: jdbc:h2:auto: (embedded mode if possible, if not use server mode). Keep the server running until all have disconnected.
</li><li>Support OSGi: http://oscar-osgi.sourceforge.net, http://incubator.apache.org/felix/index.html </li><li>Support OSGi: http://oscar-osgi.sourceforge.net, http://incubator.apache.org/felix/index.html
</li><li>Better space re-use in the files after deleting data (shrink the files) </li><li>Better space re-use in the files after deleting data: shrink the data file without closing the database (if the end of the file is empty)
</li><li>Shrink the data file without closing the database (if the end of the file is empty)
</li><li>ParameterMetaData should return correct data type where possible (INSERT, UPDATE; supported by PostgreSQL, Derby, HSQLDB)
</li><li>Pluggable tracing system </li><li>Pluggable tracing system
</li><li>Full outer joins </li><li>Full outer joins
</li><li>Procedural language / script language (Javascript) </li><li>Procedural language / script language (Javascript)
...@@ -99,6 +95,7 @@ Roadmap ...@@ -99,6 +95,7 @@ Roadmap
</li><li>Comparison: pluggable sort order: natural sort </li><li>Comparison: pluggable sort order: natural sort
</li><li>Count index range query (count(*) where id between 10 and 20) </li><li>Count index range query (count(*) where id between 10 and 20)
</li><li>Eclipse plugin </li><li>Eclipse plugin
</li><li>Asynchronous queries to support publish/subscribe: SELECT ... FOR READ WAIT [maxMillisToWait]
</li><li>iReport to support H2 </li><li>iReport to support H2
</li><li>Implement missing JDBC API (CallableStatement,...) </li><li>Implement missing JDBC API (CallableStatement,...)
</li><li>Compression of the cache </li><li>Compression of the cache
...@@ -129,7 +126,6 @@ Roadmap ...@@ -129,7 +126,6 @@ Roadmap
</li><li>Profiler option or profiling tool to find long running and often repeated queries (using DatabaseEventListener API) </li><li>Profiler option or profiling tool to find long running and often repeated queries (using DatabaseEventListener API)
</li><li>Allow custom settings (@PATH for RUNSCRIPT for example) </li><li>Allow custom settings (@PATH for RUNSCRIPT for example)
</li><li>EXE file: maybe use http://jsmooth.sourceforge.net </li><li>EXE file: maybe use http://jsmooth.sourceforge.net
</li><li>SELECT ... FOR READ WAIT [maxMillisToWait]
</li><li>Automatically delete the index file if opening it fails </li><li>Automatically delete the index file if opening it fails
</li><li>Performance: Automatically build in-memory indexes if the whole table is in memory </li><li>Performance: Automatically build in-memory indexes if the whole table is in memory
</li><li>H2 Console: The webclient could support more features like phpMyAdmin. </li><li>H2 Console: The webclient could support more features like phpMyAdmin.
...@@ -233,8 +229,6 @@ Roadmap ...@@ -233,8 +229,6 @@ Roadmap
</li><li>Autocomplete: schema support: "Other Grammar","Table Expression","{[schemaName.]tableName | (select)} [[AS] newTableAlias] </li><li>Autocomplete: schema support: "Other Grammar","Table Expression","{[schemaName.]tableName | (select)} [[AS] newTableAlias]
</li><li>Functions: options readonly, deterministic (pure, always return the same value) </li><li>Functions: options readonly, deterministic (pure, always return the same value)
</li><li>Document FTP server, including -ftpTask option to execute / kill remote processes </li><li>Document FTP server, including -ftpTask option to execute / kill remote processes
</li><li>Add jdbcx to the javadocs
</li><li>Delay reading the row if data is not required
</li><li>Eliminate undo log records if stored on disk (just one pointer per block, not per record) </li><li>Eliminate undo log records if stored on disk (just one pointer per block, not per record)
</li><li>Feature matrix like in <a href="http://www.inetsoftware.de/products/jdbc/mssql/features/default.asp">i-net software</a>. </li><li>Feature matrix like in <a href="http://www.inetsoftware.de/products/jdbc/mssql/features/default.asp">i-net software</a>.
</li><li>Updatable result set on table without primary key or unique index </li><li>Updatable result set on table without primary key or unique index
...@@ -300,7 +294,6 @@ Roadmap ...@@ -300,7 +294,6 @@ Roadmap
</li><li>Access rights: Finer grained access control (grant access for specific functions) </li><li>Access rights: Finer grained access control (grant access for specific functions)
</li><li>Support N'text' </li><li>Support N'text'
</li><li>Support SCOPE_IDENTITY() to avoid problems when inserting rows in a trigger </li><li>Support SCOPE_IDENTITY() to avoid problems when inserting rows in a trigger
</li><li>Support DESCRIBE like MySQL or Oracle (DESC|DESCRIBE {[schema.]object[@connect_identifier]})
</li><li>Set a connection read only (Connection.setReadOnly) </li><li>Set a connection read only (Connection.setReadOnly)
</li><li>In MySQL mode, for AUTO_INCREMENT columns, don't set the primary key </li><li>In MySQL mode, for AUTO_INCREMENT columns, don't set the primary key
</li><li>Use JDK 1.4 file locking to create the lock file (but not yet by default); writing a system property to detect concurrent access from the same VM (different classloaders). </li><li>Use JDK 1.4 file locking to create the lock file (but not yet by default); writing a system property to detect concurrent access from the same VM (different classloaders).
...@@ -398,7 +391,7 @@ Roadmap ...@@ -398,7 +391,7 @@ Roadmap
</li><li>Javadocs: add @author tags. </li><li>Javadocs: add @author tags.
</li><li>SET LOG_SYSTEM {NATIVE|LOG4J|COMMONS|DRIVER_MANAGER} </li><li>SET LOG_SYSTEM {NATIVE|LOG4J|COMMONS|DRIVER_MANAGER}
</li><li>Fluent API for tools: Server.createTcpServer().setPort(9081).setPassword(password).start(); </li><li>Fluent API for tools: Server.createTcpServer().setPort(9081).setPassword(password).start();
</li><li>MySQL compatibility: SHOW TABLES, DESCRIBE TEST (then remove from Shell) </li><li>MySQL compatibility: real SQL statements for SHOW TABLES, DESCRIBE TEST (then remove from Shell)
</li><li>Use a default delay of 1 second before closing a database. </li><li>Use a default delay of 1 second before closing a database.
</li><li>Maven: upload source code and javadocs as well. </li><li>Maven: upload source code and javadocs as well.
</li><li>Write (log) to system table before adding to internal data structures. </li><li>Write (log) to system table before adding to internal data structures.
...@@ -411,6 +404,7 @@ Roadmap ...@@ -411,6 +404,7 @@ Roadmap
</li><li>MySQL compatibility: SELECT @variable := x FROM SYSTEM_RANGE(1, 50); </li><li>MySQL compatibility: SELECT @variable := x FROM SYSTEM_RANGE(1, 50);
</li><li>Oracle compatibility: support NLS_DATE_FORMAT. </li><li>Oracle compatibility: support NLS_DATE_FORMAT.
</li><li>Support flashback queries as in Oracle. </li><li>Support flashback queries as in Oracle.
</li><li>Import / Export of fixed with text files.
</li></ul> </li></ul>
<h2>Not Planned</h2> <h2>Not Planned</h2>
......
...@@ -308,13 +308,13 @@ build_1009_p=A Java Runtime Environment (JRE) version 1.4 or higher is required ...@@ -308,13 +308,13 @@ build_1009_p=A Java Runtime Environment (JRE) version 1.4 or higher is required
build_1010_p=To build the database executables, the following software stack was used. Newer version or compatible software works too. build_1010_p=To build the database executables, the following software stack was used. Newer version or compatible software works too.
build_1011_li=Windows XP build_1011_li=Windows XP
build_1012_li=Sun JDK Version 1.4 build_1012_li=Sun JDK Version 1.4
build_1013_li=Apache Ant Version 1.6.5 build_1013_li=Mozilla Firefox 1.5
build_1014_li=Mozilla Firefox 1.5 build_1014_li=Eclipse Version 3.2.2
build_1015_li=Eclipse Version 3.2.2 build_1015_li=YourKit Java Profiler
build_1016_li=YourKit Java Profiler build_1016_li=Apache Ant Version 1.6.5
build_1017_h2=Building the Software build_1017_h2=Building the Software
build_1018_p=On the command line, go to the directory src and execute the following command\: build_1018_p=On the command line, go to the directory src and execute the following command\:
build_1019_p=You will get a list of targets. If you want to build the jar files, execute\: build_1019_p=You will get a list of targets. If you want to build the jar file, execute\:
build_1020_p=To create a jar file with the JDBC API and the classes required to connect to a server only, use the target jarClient\: build_1020_p=To create a jar file with the JDBC API and the classes required to connect to a server only, use the target jarClient\:
build_1021_p=The other targets may be used as well. build_1021_p=The other targets may be used as well.
build_1022_h2=Using Maven 2 build_1022_h2=Using Maven 2
...@@ -329,298 +329,300 @@ build_1030_p=The translation of this software is split into the following parts\ ...@@ -329,298 +329,300 @@ build_1030_p=The translation of this software is split into the following parts\
build_1031_li=H2 Console\: src/main/org/h2/server/web/res/_text_*.properties build_1031_li=H2 Console\: src/main/org/h2/server/web/res/_text_*.properties
build_1032_li=Error messages\: src/main/org/h2/res/_messages_*.properties build_1032_li=Error messages\: src/main/org/h2/res/_messages_*.properties
build_1033_li=Web site\: src/docsrc/text/_docs_*.utf8.txt build_1033_li=Web site\: src/docsrc/text/_docs_*.utf8.txt
build_1034_p=The conversion between UTF-8 and Java encoding (using the \\u syntax), as well as the HTML entities (&amp;\#..;) is automated by running the tool PropertiesToUTF8. The web site translation is automated as well, using <code>ant docs</code> . build_1034_p=The conversion between UTF-8 and Java encoding (using the \\u syntax), as well as the HTML entities (&amp;\#..;) is automated by running the tool PropertiesToUTF8. The web site translation is automated as well, using <code>build docs</code> .
changelog_1000_h1=Change Log changelog_1000_h1=Change Log
changelog_1001_h2=Next Version (unreleased) changelog_1001_h2=Next Version (unreleased)
changelog_1002_li=H2 is now dual-licensed under the Eclipse Public License (EPL) and the old 'H2 License' (which is basically MPL). changelog_1002_li=-
changelog_1003_li=Sometimes an exception 'File ID mismatch' or 'try to add a record twice' occured after large records (8 KB or larger) are updated or deleted. See also http\://code.google.com/p/h2database/issues/detail?id\=22 changelog_1003_h2=Version 1.0.71 (2008-04-25)
changelog_1004_li=H2 Console\: The tools can now be translated (it didn't work in the last release). changelog_1004_li=H2 is now dual-licensed under the Eclipse Public License (EPL) and the old 'H2 License' (which is basically MPL).
changelog_1005_li=New traditional Chinese translation. Thanks a lot to Derek Chao\! changelog_1005_li=Sometimes an exception 'File ID mismatch' or 'try to add a record twice' occured after large records (8 KB or larger) are updated or deleted. See also http\://code.google.com/p/h2database/issues/detail?id\=22
changelog_1006_li=Indexes were not used when enabling the optimization for IN(SELECT...) (system property h2.optimizeInJoin) changelog_1006_li=H2 Console\: The tools can now be translated (it didn't work in the last release).
changelog_1007_h2=Version 1.0.70 (2008-04-20) changelog_1007_li=New traditional Chinese translation. Thanks a lot to Derek Chao\!
changelog_1008_li=The plan is to dual-license H2. The additional license is EPL (Eclipse Public License). The current license (MPL, Mozilla Public License) will stay. Current users are not affected because they can keep MPL. EPL is very similar to MPL, the only bigger difference is related to patents (EPL is a bit more business friendly in this regard). See also http\://opensource.org/licenses/eclipse-1.0.php, http\://www.eclipse.org/legal/eplfaq.php (FAQ), http\://blogs.zdnet.com/Burnette/?p\=131 changelog_1008_li=Indexes were not used when enabling the optimization for IN(SELECT...) (system property h2.optimizeInJoin).
changelog_1009_li=Multi version concurrency (MVCC)\: when a row was updated, and the updated column was not indexed, this update was visible sometimes for other sessions even if it was not committed. changelog_1009_h2=Version 1.0.70 (2008-04-20)
changelog_1010_li=Calling SHUTDOWN on one connection and starting a query on another connection concurrently could result in a Java level deadlock. changelog_1010_li=The plan is to dual-license H2. The additional license is EPL (Eclipse Public License). The current license (MPL, Mozilla Public License) will stay. Current users are not affected because they can keep MPL. EPL is very similar to MPL, the only bigger difference is related to patents (EPL is a bit more business friendly in this regard). See also http\://opensource.org/licenses/eclipse-1.0.php, http\://www.eclipse.org/legal/eplfaq.php (FAQ), http\://blogs.zdnet.com/Burnette/?p\=131
changelog_1011_li=New system property h2.enableAnonymousSSL (default\: true) to enable anonymous SSL connections. changelog_1011_li=Multi version concurrency (MVCC)\: when a row was updated, and the updated column was not indexed, this update was visible sometimes for other sessions even if it was not committed.
changelog_1012_li=The precision if SUBSTR is now calculated if possible. changelog_1012_li=Calling SHUTDOWN on one connection and starting a query on another connection concurrently could result in a Java level deadlock.
changelog_1013_li=The autocomplete in the H2 Console has been improved a bit. changelog_1013_li=New system property h2.enableAnonymousSSL (default\: true) to enable anonymous SSL connections.
changelog_1014_li=The tools in the H2 Console are now translatable. changelog_1014_li=The precision if SUBSTR is now calculated if possible.
changelog_1015_li=The servlet and lucene jar files are now automatically downloaded when building. changelog_1015_li=The autocomplete in the H2 Console has been improved a bit.
changelog_1016_li=The code switch tool has been replaced by a simpler tool called SwitchSource that just uses find and replace. changelog_1016_li=The tools in the H2 Console are now translatable.
changelog_1017_li=Started to write a Ant replacement ('JAnt') that uses pure Java build definitions. Advantages\: ability to debug the build, extensible, flexible, no XML, a bit faster. Future plan\: support creating custom h2 distributions (for embedded use). Maybe create a new project 'Jant' or 'Javen' if other people are interested. changelog_1017_li=The servlet and lucene jar files are now automatically downloaded when building.
changelog_1018_li=The jar file is now about 10% smaller because the variable debugging info is no longer included. The source file and line number debugging info is still included. If required, the jar file size of the full version can be further reduced to about 720 KB using 'build jarSmall' or even more by removing unneeded components. changelog_1018_li=The code switch tool has been replaced by a simpler tool called SwitchSource that just uses find and replace.
changelog_1019_li=Added shell scripts run.sh and build.sh. chmod +x is required, but otherwise it should work. Feedback or improvements are welcome\! changelog_1019_li=Started to write a Ant replacement ('JAnt') that uses pure Java build definitions. Advantages\: ability to debug the build, extensible, flexible, no XML, a bit faster. Future plan\: support creating custom h2 distributions (for embedded use). Maybe create a new project 'Jant' or 'Javen' if other people are interested.
changelog_1020_li=Databases in zip files\: large queries are now supported. Temp files are created in the temp directory if required. The documentation how to create the zip file has been corrected. changelog_1020_li=The jar file is now about 10% smaller because the variable debugging info is no longer included. The source file and line number debugging info is still included. If required, the jar file size of the full version can be further reduced to about 720 KB using 'build jarSmall' or even more by removing unneeded components.
changelog_1021_li=Invalid inline views threw confusing SQL exceptions. changelog_1021_li=Added shell scripts run.sh and build.sh. chmod +x is required, but otherwise it should work. Feedback or improvements are welcome\!
changelog_1022_li=The Japanese translation of the error messages and the H2 Console has been improved. Thanks a lot to Masahiro IKEMOTO. changelog_1022_li=Databases in zip files\: large queries are now supported. Temp files are created in the temp directory if required. The documentation how to create the zip file has been corrected.
changelog_1023_li=Optimization for MIN() and MAX() when using MVCC. changelog_1023_li=Invalid inline views threw confusing SQL exceptions.
changelog_1024_li=To protect against remote brute force password attacks, the delay after each unsuccessful login now gets double as long. New system properties h2.delayWrongPasswordMin and h2.delayWrongPasswordMax. changelog_1024_li=The Japanese translation of the error messages and the H2 Console has been improved. Thanks a lot to Masahiro IKEMOTO.
changelog_1025_li=After setting the query timeout and then resetting it, the next query would still timeout. Fixed. changelog_1025_li=Optimization for MIN() and MAX() when using MVCC.
changelog_1026_li=Adding a IDENTITY column to a table with data threw a lock timeout. changelog_1026_li=To protect against remote brute force password attacks, the delay after each unsuccessful login now gets double as long. New system properties h2.delayWrongPasswordMin and h2.delayWrongPasswordMax.
changelog_1027_li=OutOfMemoryError could occur when using EXISTS or IN(SELECT ..). changelog_1027_li=After setting the query timeout and then resetting it, the next query would still timeout. Fixed.
changelog_1028_li=The built-in connection pool is not called JdbcConnectionPool. The API and documentation has been changed. changelog_1028_li=Adding a IDENTITY column to a table with data threw a lock timeout.
changelog_1029_li=The ConvertTraceFile tool now generates SQL statement statistics at the end of the SQL script file (similar to the profiling data generated when using java -Xrunhprof). changelog_1029_li=OutOfMemoryError could occur when using EXISTS or IN(SELECT ..).
changelog_1030_li=Nested joins are now supported (A JOIN B JOIN C ON .. ON ..) changelog_1030_li=The built-in connection pool is not called JdbcConnectionPool. The API and documentation has been changed.
changelog_1031_h2=Version 1.0.69 (2008-03-29) changelog_1031_li=The ConvertTraceFile tool now generates SQL statement statistics at the end of the SQL script file (similar to the profiling data generated when using java -Xrunhprof).
changelog_1032_li=Most command line tools can now be called from within the H2 Console. changelog_1032_li=Nested joins are now supported (A JOIN B JOIN C ON .. ON ..)
changelog_1033_li=A new Shell tools is now included (org.h2.tools.Shell) to query a database from the command line. changelog_1033_h2=Version 1.0.69 (2008-03-29)
changelog_1034_li=The command line options in the tools have changed\: instead of '-log true' now '-trace' is used. Also, '-ifExists', '-tcpSSL' and '-tcpAllowOthers' and so on have changed\: now the 'true' is no longer needed. The old behavior is still supported. changelog_1034_li=Most command line tools can now be called from within the H2 Console.
changelog_1035_li=New system property h2.sortNullsHigh to invert the default sorting behavior for NULL. The default didn't change. changelog_1035_li=A new Shell tools is now included (org.h2.tools.Shell) to query a database from the command line.
changelog_1036_li=Performance was very slow when using LOG\=2 and deleting or updating all rows of a table in a loop. Fixed. changelog_1036_li=The command line options in the tools have changed\: instead of '-log true' now '-trace' is used. Also, '-ifExists', '-tcpSSL' and '-tcpAllowOthers' and so on have changed\: now the 'true' is no longer needed. The old behavior is still supported.
changelog_1037_li=ALTER TABLE or CREATE TABLE now support parameters for the password field. changelog_1037_li=New system property h2.sortNullsHigh to invert the default sorting behavior for NULL. The default didn't change.
changelog_1038_li=The linear hash has been removed. It was always slower than the b-tree index, and there were some bugs that would be hard to fix. changelog_1038_li=Performance was very slow when using LOG\=2 and deleting or updating all rows of a table in a loop. Fixed.
changelog_1039_li=TRACE_LEVEL_ settings are no longer persistent. This was a problem when database initialization code caused a lot of trace output. changelog_1039_li=ALTER TABLE or CREATE TABLE now support parameters for the password field.
changelog_1040_li=Fulltext search (native implementation)\: The words table is no longer an in-memory table because this caused memory problems in some cases. changelog_1040_li=The linear hash has been removed. It was always slower than the b-tree index, and there were some bugs that would be hard to fix.
changelog_1041_li=It was possible to create a role with the name as an existing user (but not vice versa). This is not allowed any more. changelog_1041_li=TRACE_LEVEL_ settings are no longer persistent. This was a problem when database initialization code caused a lot of trace output.
changelog_1042_li=The recovery tool didn't work correctly for tables without rows. changelog_1042_li=Fulltext search (native implementation)\: The words table is no longer an in-memory table because this caused memory problems in some cases.
changelog_1043_li=For years below 1, the YEAR method didn't return the correct value, and the conversion from date and timestamp to varchar was incorrect. changelog_1043_li=It was possible to create a role with the name as an existing user (but not vice versa). This is not allowed any more.
changelog_1044_li=CSVWRITE caused a NullPointerException when not specifying a nullString. changelog_1044_li=The recovery tool didn't work correctly for tables without rows.
changelog_1045_li=When a log file switch occured just after a truncate table or drop table statement, the database could not be started normally (RECOVER\=1 was required). Fixed. changelog_1045_li=For years below 1, the YEAR method didn't return the correct value, and the conversion from date and timestamp to varchar was incorrect.
changelog_1046_li=When a log file switch occured in the middle of a sequence flush (sequences are only flushed every 32 values by default), the sequence value was lost. Fixed. changelog_1046_li=CSVWRITE caused a NullPointerException when not specifying a nullString.
changelog_1047_li=Altering a sequence didn't unlock the system table when autocommit switched off. changelog_1047_li=When a log file switch occured just after a truncate table or drop table statement, the database could not be started normally (RECOVER\=1 was required). Fixed.
changelog_1048_h2=Version 1.0.68 (2008-03-18) changelog_1048_li=When a log file switch occured in the middle of a sequence flush (sequences are only flushed every 32 values by default), the sequence value was lost. Fixed.
changelog_1049_li=Very large SELECT DISTINCT and UNION EXCEPT queries are now supported, however this feature is disabled by default. To enable it, set the system property h2.maxMemoryRowsDistinct to a lower value, for example 10000. changelog_1049_li=Altering a sequence didn't unlock the system table when autocommit switched off.
changelog_1050_li=A error is now thrown when trying to call a method inside a trigger that implicitly commits the current transaction, if an object is locked. changelog_1050_h2=Version 1.0.68 (2008-03-18)
changelog_1051_li=Unused LOB files were deleted much too late. Now they are deleted if no longer referenced in memory. changelog_1051_li=Very large SELECT DISTINCT and UNION EXCEPT queries are now supported, however this feature is disabled by default. To enable it, set the system property h2.maxMemoryRowsDistinct to a lower value, for example 10000.
changelog_1052_li=ALTER SEQUENCE and ALTER TABLE ALTER COLUMN RESTART can now be used inside a transaction. changelog_1052_li=A error is now thrown when trying to call a method inside a trigger that implicitly commits the current transaction, if an object is locked.
changelog_1053_li=New system property h2.aliasColumnName. When enabled, aliased columns (as in SELECT ID AS I FROM TEST) return the real table and column name in ResultSetMetaData.getTableName() and getColumnName(). This is disabled by default for compatibility with other databases (HSQLDB, Apache Derby, PostgreSQL, some version of MySQL). In version 1.1 this setting will be enabled. changelog_1053_li=Unused LOB files were deleted much too late. Now they are deleted if no longer referenced in memory.
changelog_1054_li=When using encrypted databases, and using the wrong file password, the log file was renamed if the database was not already open. Fixed. changelog_1054_li=ALTER SEQUENCE and ALTER TABLE ALTER COLUMN RESTART can now be used inside a transaction.
changelog_1055_li=Improved performance when using lob files in directories (however this is still disabled by default) changelog_1055_li=New system property h2.aliasColumnName. When enabled, aliased columns (as in SELECT ID AS I FROM TEST) return the real table and column name in ResultSetMetaData.getTableName() and getColumnName(). This is disabled by default for compatibility with other databases (HSQLDB, Apache Derby, PostgreSQL, some version of MySQL). In version 1.1 this setting will be enabled.
changelog_1056_li=H2 Console\: autocomplete didn't work with very large scripts. Fixed. changelog_1056_li=When using encrypted databases, and using the wrong file password, the log file was renamed if the database was not already open. Fixed.
changelog_1057_li=Fulltext search\: new method SEARCH_DATA that returns the column names and primary keys as arrays. changelog_1057_li=Improved performance when using lob files in directories (however this is still disabled by default)
changelog_1058_li=New experimental optimization for GROUP BY queries if an index can be used that matches the group by columns. To enable this optimization, set the system property h2.optimizeGroupSorted to true. changelog_1058_li=H2 Console\: autocomplete didn't work with very large scripts. Fixed.
changelog_1059_li=When using multi-version concurrency (MVCC\=TRUE), duplicate rows could appear in the result set when running queries with uncommitted changes in the same session. changelog_1059_li=Fulltext search\: new method SEARCH_DATA that returns the column names and primary keys as arrays.
changelog_1060_li=H2 Console\: remote connections were very slow because getHostName/getRemoteHost was used. Fixed (now using getHostAddress/getRemoteAddr. changelog_1060_li=New experimental optimization for GROUP BY queries if an index can be used that matches the group by columns. To enable this optimization, set the system property h2.optimizeGroupSorted to true.
changelog_1061_li=H2 Console\: on Linux, Firefox, Konqueror, or Opera (in this order) are now started if available. This has been tested on Ubuntu. changelog_1061_li=When using multi-version concurrency (MVCC\=TRUE), duplicate rows could appear in the result set when running queries with uncommitted changes in the same session.
changelog_1062_li=H2 Console\: the start window works better with IKVM changelog_1062_li=H2 Console\: remote connections were very slow because getHostName/getRemoteHost was used. Fixed (now using getHostAddress/getRemoteAddr.
changelog_1063_li=H2 Console\: improved compatibility with Safari (Safari requires keep-alive) changelog_1063_li=H2 Console\: on Linux, Firefox, Konqueror, or Opera (in this order) are now started if available. This has been tested on Ubuntu.
changelog_1064_li=Random\: the process didn't stop if generating the random seed using the standard way (SecureRandom.generateSeed) was very slow. Now using a daemon thread to avoid this problem. changelog_1064_li=H2 Console\: the start window works better with IKVM
changelog_1065_li=SELECT UNION with a different number of ORDER BY columns did throw an ArrayIndexOutOfBoundsException. changelog_1065_li=H2 Console\: improved compatibility with Safari (Safari requires keep-alive)
changelog_1066_li=When using a view, the column precision was changed to the default scale for some data types. changelog_1066_li=Random\: the process didn't stop if generating the random seed using the standard way (SecureRandom.generateSeed) was very slow. Now using a daemon thread to avoid this problem.
changelog_1067_li=CSVWRITE now supports a 'null string' that is used for parsing and writing NULL. changelog_1067_li=SELECT UNION with a different number of ORDER BY columns did throw an ArrayIndexOutOfBoundsException.
changelog_1068_li=Some long running queries could not be cancelled. changelog_1068_li=When using a view, the column precision was changed to the default scale for some data types.
changelog_1069_li=Queries with many outer join tables were very slow. Fixed. changelog_1069_li=CSVWRITE now supports a 'null string' that is used for parsing and writing NULL.
changelog_1070_li=The performance of text comparison has been improved when using locale sensitive string comparison (SET COLLATOR). Now CollationKey is used with a LRU cache. The default cache size is 10000, and can be changed using the system property h2.collatorCacheSize. Use 0 to disable the cache. changelog_1070_li=Some long running queries could not be cancelled.
changelog_1071_li=UPDATE SET column\=DEFAULT is now supported. changelog_1071_li=Queries with many outer join tables were very slow. Fixed.
changelog_1072_h2=Version 1.0.67 (2008-02-22) changelog_1072_li=The performance of text comparison has been improved when using locale sensitive string comparison (SET COLLATOR). Now CollationKey is used with a LRU cache. The default cache size is 10000, and can be changed using the system property h2.collatorCacheSize. Use 0 to disable the cache.
changelog_1073_li=New function FILE_READ to read a file or from an URL. Both binary and text data is supported. changelog_1073_li=UPDATE SET column\=DEFAULT is now supported.
changelog_1074_li=CREATE TABLE AS SELECT now supports specifying the column list and data types. changelog_1074_h2=Version 1.0.67 (2008-02-22)
changelog_1075_li=Connecting to a TCP server and at shutting it down at the same time could cause a Java level deadlock. changelog_1075_li=New function FILE_READ to read a file or from an URL. Both binary and text data is supported.
changelog_1076_li=A user now has all rights on his own local temporary tables. changelog_1076_li=CREATE TABLE AS SELECT now supports specifying the column list and data types.
changelog_1077_li=The CSV tool now supports a custom lineSeparator. changelog_1077_li=Connecting to a TCP server and at shutting it down at the same time could cause a Java level deadlock.
changelog_1078_li=When using multiple connections, empty space was reused too early sometimes. This could corrupt the database when recovering. changelog_1078_li=A user now has all rights on his own local temporary tables.
changelog_1079_li=The H2 Console has been translated to Dutch. Thanks a lot to Remco Schoen\! changelog_1079_li=The CSV tool now supports a custom lineSeparator.
changelog_1080_li=Databases can now be opened even if trigger classes are not in the classpath. The exception is thrown when trying to fire the trigger. changelog_1080_li=When using multiple connections, empty space was reused too early sometimes. This could corrupt the database when recovering.
changelog_1081_li=Opening databases with ACCESS_MODE_DATA\=r is now supported. In this case the database is read-only, but the files don't not need to be read-only. changelog_1081_li=The H2 Console has been translated to Dutch. Thanks a lot to Remco Schoen\!
changelog_1082_li=Security\: The database now waits 200 ms before throwing an exception if the user name or password don't match, to slow down dictionary attacks. changelog_1082_li=Databases can now be opened even if trigger classes are not in the classpath. The exception is thrown when trying to fire the trigger.
changelog_1083_li=The value cache is now a soft reference cache. This should help save memory. changelog_1083_li=Opening databases with ACCESS_MODE_DATA\=r is now supported. In this case the database is read-only, but the files don't not need to be read-only.
changelog_1084_li=CREATE INDEX on a table with many rows could run out of memory. Fixed. changelog_1084_li=Security\: The database now waits 200 ms before throwing an exception if the user name or password don't match, to slow down dictionary attacks.
changelog_1085_li=Large result sets are now a bit faster. changelog_1085_li=The value cache is now a soft reference cache. This should help save memory.
changelog_1086_li=ALTER TABLE ALTER COLUMN RESTART and ALTER SEQUENCE now support parameters (any expressions). changelog_1086_li=CREATE INDEX on a table with many rows could run out of memory. Fixed.
changelog_1087_li=When setting the base directory on the command line, the user directory prefix ('~') was ignored. changelog_1087_li=Large result sets are now a bit faster.
changelog_1088_li=The DbStarter servlet didn't start the TCP listener even if configured. changelog_1088_li=ALTER TABLE ALTER COLUMN RESTART and ALTER SEQUENCE now support parameters (any expressions).
changelog_1089_li=Statement.setQueryTimeout() is now supported. changelog_1089_li=When setting the base directory on the command line, the user directory prefix ('~') was ignored.
changelog_1090_li=New session setting QUERY_TIMEOUT, and new system property h2.maxQueryTimeout. changelog_1090_li=The DbStarter servlet didn't start the TCP listener even if configured.
changelog_1091_li=Changing the transaction log level (SET LOG) is now written to the trace file by default. changelog_1091_li=Statement.setQueryTimeout() is now supported.
changelog_1092_li=In a SQL script, primary key constraints are now ordered before foreign key constraints. changelog_1092_li=New session setting QUERY_TIMEOUT, and new system property h2.maxQueryTimeout.
changelog_1093_li=It was not possible to create a referential constraint to a table in a different schema in some situations. changelog_1093_li=Changing the transaction log level (SET LOG) is now written to the trace file by default.
changelog_1094_li=The H2 Console was slow when the database contains many tables. Now the column names are not shown in this case. changelog_1094_li=In a SQL script, primary key constraints are now ordered before foreign key constraints.
changelog_1095_h2=Version 1.0.66 (2008-02-02) changelog_1095_li=It was not possible to create a referential constraint to a table in a different schema in some situations.
changelog_1096_li=There is a new online error analyzer tool. changelog_1096_li=The H2 Console was slow when the database contains many tables. Now the column names are not shown in this case.
changelog_1097_li=H2 Console\: stack traces are now links to the source code in the source repository (H2 database only). changelog_1097_h2=Version 1.0.66 (2008-02-02)
changelog_1098_li=CHAR data type equals comparison was case insensitive instead of case sensitive. changelog_1098_li=There is a new online error analyzer tool.
changelog_1099_li=The exception 'Value too long for column' now includes the data. changelog_1099_li=H2 Console\: stack traces are now links to the source code in the source repository (H2 database only).
changelog_1100_li=The table name was missing in the documentation of CREATE INDEX. changelog_1100_li=CHAR data type equals comparison was case insensitive instead of case sensitive.
changelog_1101_li=Better support for IKVM (www.ikvm.net)\: the H2 Console now opens a browser window. changelog_1101_li=The exception 'Value too long for column' now includes the data.
changelog_1102_li=The cache size was not correctly calculated for tables with large objects (specially if compression is used). This could lead to out-of-memory exceptions. changelog_1102_li=The table name was missing in the documentation of CREATE INDEX.
changelog_1103_li=The exception "Hexadecimal string contains non-hex character" was not always thrown when it should have been. Fixed. changelog_1103_li=Better support for IKVM (www.ikvm.net)\: the H2 Console now opens a browser window.
changelog_1104_li=The H2 Console now provides a link to the documentation when an error occurs (H2 databases only so far). changelog_1104_li=The cache size was not correctly calculated for tables with large objects (specially if compression is used). This could lead to out-of-memory exceptions.
changelog_1105_li=The acting as PostgreSQL server, when a base directory was set, and the H2 Console was started as well, the base directory was applied twice. changelog_1105_li=The exception "Hexadecimal string contains non-hex character" was not always thrown when it should have been. Fixed.
changelog_1106_li=Calling EXTRACT(HOUR FROM ...) or EXTRACT(HH FROM ...) returned the wrong values (0 to 11 instead of 0 to 23). All other tested databases return values from 0 to 23. Please check if your application relies on the old behavior before upgrading. changelog_1106_li=The H2 Console now provides a link to the documentation when an error occurs (H2 databases only so far).
changelog_1107_li=For compatibility with other databases the column default (COLUMN_DEF) for columns without default is now null (it was an empty string). changelog_1107_li=The acting as PostgreSQL server, when a base directory was set, and the H2 Console was started as well, the base directory was applied twice.
changelog_1108_li=Statements that contain very large subqueries (where the subquery result does not fit in memory) are now faster. changelog_1108_li=Calling EXTRACT(HOUR FROM ...) or EXTRACT(HH FROM ...) returned the wrong values (0 to 11 instead of 0 to 23). All other tested databases return values from 0 to 23. Please check if your application relies on the old behavior before upgrading.
changelog_1109_li=Variables\: large objects (CLOB and BLOB) that don't fit in memory did not work correctly when used as variables. changelog_1109_li=For compatibility with other databases the column default (COLUMN_DEF) for columns without default is now null (it was an empty string).
changelog_1110_li=Fulltext search is now supported in named in-memory databases. changelog_1110_li=Statements that contain very large subqueries (where the subquery result does not fit in memory) are now faster.
changelog_1111_li=H2 Console\: multiple consecutive spaces in the setting name did not work. Fixed. changelog_1111_li=Variables\: large objects (CLOB and BLOB) that don't fit in memory did not work correctly when used as variables.
changelog_1112_h2=Version 1.0.65 (2008-01-18) changelog_1112_li=Fulltext search is now supported in named in-memory databases.
changelog_1113_li=The build (ant) now automatically switches the source code to the correct version (JDK 1.4/1.5 or 1.6). changelog_1113_li=H2 Console\: multiple consecutive spaces in the setting name did not work. Fixed.
changelog_1114_li=A recovery bug has been fixed. With older versions, it was necessary to add ;RECOVER\=1 to the database URL in cases where it should not have been required. changelog_1114_h2=Version 1.0.65 (2008-01-18)
changelog_1115_li=The performance for DROP and DROP ALL OBJECTS has been improved. changelog_1115_li=The build (ant) now automatically switches the source code to the correct version (JDK 1.4/1.5 or 1.6).
changelog_1116_li=The ChangePassword API has been improved. changelog_1116_li=A recovery bug has been fixed. With older versions, it was necessary to add ;RECOVER\=1 to the database URL in cases where it should not have been required.
changelog_1117_li=User defined variables are now supported. Examples\: SET @VAR\=10;CALL @VAR. This can be used for running totals as in\: select x, set(@t, ifnull(@t, 0) + x) from system_range(1, 10) changelog_1117_li=The performance for DROP and DROP ALL OBJECTS has been improved.
changelog_1118_li=The Ukrainian translation has been improved. changelog_1118_li=The ChangePassword API has been improved.
changelog_1119_li=CALL statements can now be used in batch updates and called using Statement.executeUpdate. changelog_1119_li=User defined variables are now supported. Examples\: SET @VAR\=10;CALL @VAR. This can be used for running totals as in\: select x, set(@t, ifnull(@t, 0) + x) from system_range(1, 10)
changelog_1120_li=New read-only setting CREATE_BUILD (the build number of the database engine that created the database). changelog_1120_li=The Ukrainian translation has been improved.
changelog_1121_li=The optimizer did not use multi column indexes for range queries in some cases. Fixed. changelog_1121_li=CALL statements can now be used in batch updates and called using Statement.executeUpdate.
changelog_1122_li=The H2 Console now calls DataSource.getConnection() instead of DataSource.getConnection(user, password) when user name and password are not specified. changelog_1122_li=New read-only setting CREATE_BUILD (the build number of the database engine that created the database).
changelog_1123_li=The bind IP address can now be set when using multi-homed host (if multiple network adapters are available) using the system property h2.bindAddress. changelog_1123_li=The optimizer did not use multi column indexes for range queries in some cases. Fixed.
changelog_1124_li=Batch update\: Calling BatchUpdateException.printStackTrace() could result in out of memory. Fixed. changelog_1124_li=The H2 Console now calls DataSource.getConnection() instead of DataSource.getConnection(user, password) when user name and password are not specified.
changelog_1125_li=Indexes of unique or foreign constraints where not dropped when the constraint was dropped after altering the table (for example dropping a column). Fixed. changelog_1125_li=The bind IP address can now be set when using multi-homed host (if multiple network adapters are available) using the system property h2.bindAddress.
changelog_1126_li=The performance for large result sets in the server mode has been improved. changelog_1126_li=Batch update\: Calling BatchUpdateException.printStackTrace() could result in out of memory. Fixed.
changelog_1127_li=The setting h2.serverSmallResultSetSize has been renamed to h2.serverResultSetFetchSize. changelog_1127_li=Indexes of unique or foreign constraints where not dropped when the constraint was dropped after altering the table (for example dropping a column). Fixed.
changelog_1128_li=The SCRIPT command now uses multi-row insert statements to save space except if the option SIMPLE is used. changelog_1128_li=The performance for large result sets in the server mode has been improved.
changelog_1129_li=The SCRIPT command did not split up CLOB data correctly. Fixed. changelog_1129_li=The setting h2.serverSmallResultSetSize has been renamed to h2.serverResultSetFetchSize.
changelog_1130_li=Optimization for single column distinct queries with an index\: select distinct name from test. Can be disabled by setting the system property h2.optimizeDistinct to false. changelog_1130_li=The SCRIPT command now uses multi-row insert statements to save space except if the option SIMPLE is used.
changelog_1131_li=DROP ALL OBJECTS did not drop user defined aggregate functions and domains. changelog_1131_li=The SCRIPT command did not split up CLOB data correctly. Fixed.
changelog_1132_li=PostgreSQL compatibility\: COUNT(T.*) is now supported. changelog_1132_li=Optimization for single column distinct queries with an index\: select distinct name from test. Can be disabled by setting the system property h2.optimizeDistinct to false.
changelog_1133_li=LIKE comparisons are now faster. changelog_1133_li=DROP ALL OBJECTS did not drop user defined aggregate functions and domains.
changelog_1134_li=Encrypted databases are now faster. changelog_1134_li=PostgreSQL compatibility\: COUNT(T.*) is now supported.
changelog_1135_h2=Version 1.0.64 (2007-12-27) changelog_1135_li=LIKE comparisons are now faster.
changelog_1136_li=3-way union queries with prepared statement or views could return the wrong results. Fixed. changelog_1136_li=Encrypted databases are now faster.
changelog_1137_li=The PostgreSQL ODBC driver did not work in the last release due to a parser regression. Fixed. changelog_1137_h2=Version 1.0.64 (2007-12-27)
changelog_1138_li=CSV tool\: some escape/separator character combinations did not work. Fixed. changelog_1138_li=3-way union queries with prepared statement or views could return the wrong results. Fixed.
changelog_1139_li=CSV tool\: the character \# could not be used as a separator when reading. changelog_1139_li=The PostgreSQL ODBC driver did not work in the last release due to a parser regression. Fixed.
changelog_1140_li=Recovery\: when the index file is corrupt, now the database deletes it and re-creates it automatically. changelog_1140_li=CSV tool\: some escape/separator character combinations did not work. Fixed.
changelog_1141_li=The MVCC mode did not work well with in-memory databases. Fixed. changelog_1141_li=CSV tool\: the character \# could not be used as a separator when reading.
changelog_1142_li=The FTP server now supports a event listener. Thanks Fulvio Biondi for the help\! changelog_1142_li=Recovery\: when the index file is corrupt, now the database deletes it and re-creates it automatically.
changelog_1143_li=New system function CANCEL_SESSION to cancel the currently executing statement of another session. changelog_1143_li=The MVCC mode did not work well with in-memory databases. Fixed.
changelog_1144_li=The database now supports an exclusive mode. In exclusive mode, new connections are rejected. changelog_1144_li=The FTP server now supports a event listener. Thanks Fulvio Biondi for the help\!
changelog_1145_li=H2 Console\: when editing result sets, columns can now be set to null. The text 'null' must be escaped using '\=null'. changelog_1145_li=New system function CANCEL_SESSION to cancel the currently executing statement of another session.
changelog_1146_li=New built-in functions RPAD and LPAD. changelog_1146_li=The database now supports an exclusive mode. In exclusive mode, new connections are rejected.
changelog_1147_li=New meta data table INFORMATION_SCHEMA.SESSIONS and LOCKS to get information about active connections and locks. Admins will see all connections, non-admins only their own session. changelog_1147_li=H2 Console\: when editing result sets, columns can now be set to null. The text 'null' must be escaped using '\=null'.
changelog_1148_li=The Ukrainian translation was not working in the last release. Fixed. changelog_1148_li=New built-in functions RPAD and LPAD.
changelog_1149_li=Creating many tables (many hundreds) was slow. Fixed. changelog_1149_li=New meta data table INFORMATION_SCHEMA.SESSIONS and LOCKS to get information about active connections and locks. Admins will see all connections, non-admins only their own session.
changelog_1150_li=Opening a database with many indexes (thousands) was slow. Fixed. changelog_1150_li=The Ukrainian translation was not working in the last release. Fixed.
changelog_1151_li=H2 Console / autocomplete\: Ctrl+Space now shows the list in all modes. changelog_1151_li=Creating many tables (many hundreds) was slow. Fixed.
changelog_1152_li=The method Trigger.init has been changed\: the parameters 'before' and 'type', have been added to the init method. changelog_1152_li=Opening a database with many indexes (thousands) was slow. Fixed.
changelog_1153_li=The performance has been improved for ResultSet methods with column name. changelog_1153_li=H2 Console / autocomplete\: Ctrl+Space now shows the list in all modes.
changelog_1154_li=A stack trace was thrown if the system did not provide a quick secure random source and if there is no network or the network settings are not configured. Fixed. changelog_1154_li=The method Trigger.init has been changed\: the parameters 'before' and 'type', have been added to the init method.
changelog_1155_li=The H2 Console has been translated to Turkish. Thanks a lot to Ridvan Agar\! changelog_1155_li=The performance has been improved for ResultSet methods with column name.
changelog_1156_li=Improved debugging support\: toString methods of most object now return a meaningful text. changelog_1156_li=A stack trace was thrown if the system did not provide a quick secure random source and if there is no network or the network settings are not configured. Fixed.
changelog_1157_li=The classes DbStarter and WebServlet have been moved to src/main. changelog_1157_li=The H2 Console has been translated to Turkish. Thanks a lot to Ridvan Agar\!
changelog_1158_li=The column INFORMATION_SCHEMA.TRIGGERS.SQL now contains the CREATE TRIGGER statement. changelog_1158_li=Improved debugging support\: toString methods of most object now return a meaningful text.
changelog_1159_li=Loading classes and calling methods can be restricted using the new system property h2.allowedClasses. changelog_1159_li=The classes DbStarter and WebServlet have been moved to src/main.
changelog_1160_li=The database could not be used in Java applets due to security exceptions. Fixed. changelog_1160_li=The column INFORMATION_SCHEMA.TRIGGERS.SQL now contains the CREATE TRIGGER statement.
changelog_1161_h2=Version 1.0.63 (2007-12-02) changelog_1161_li=Loading classes and calling methods can be restricted using the new system property h2.allowedClasses.
changelog_1162_li=The SecurePassword example has been improved. changelog_1162_li=The database could not be used in Java applets due to security exceptions. Fixed.
changelog_1163_li=In time zones where the summer time saving limit is at midnight, some dates do not work in some virtual machines, for example 2007-10-14 in Chile, using the Sun JVM 1.6.0_03-b05. Fixed. changelog_1163_h2=Version 1.0.63 (2007-12-02)
changelog_1164_li=The native fulltext search was not working properly after re-connecting. changelog_1164_li=The SecurePassword example has been improved.
changelog_1165_li=Improved FTP server\: now the PORT command is supported. changelog_1165_li=In time zones where the summer time saving limit is at midnight, some dates do not work in some virtual machines, for example 2007-10-14 in Chile, using the Sun JVM 1.6.0_03-b05. Fixed.
changelog_1166_li=Temporary views (FROM(...)) with UNION didn't work if nested. Fixed. changelog_1166_li=The native fulltext search was not working properly after re-connecting.
changelog_1167_li=Performance optimization for IN(...) and IN(SELECT...), currently disabled by default. To enable, use java -Dh2.optimizeInJoin\=true changelog_1167_li=Improved FTP server\: now the PORT command is supported.
changelog_1168_li=The H2 Console has been translated to Ukrainian by Igor Dobrovolskyi. Thanks a lot\! changelog_1168_li=Temporary views (FROM(...)) with UNION didn't work if nested. Fixed.
changelog_1169_li=New function TABLE_DISTINCT. changelog_1169_li=Performance optimization for IN(...) and IN(SELECT...), currently disabled by default. To enable, use java -Dh2.optimizeInJoin\=true
changelog_1170_li=Using LIMIT with values close to Integer.MAX_VALUE didn't work correctly. changelog_1170_li=The H2 Console has been translated to Ukrainian by Igor Dobrovolskyi. Thanks a lot\!
changelog_1171_li=Certain setting in the Server didn't work (http\://code.google.com/p/h2database/issues/detail?id\=7). changelog_1171_li=New function TABLE_DISTINCT.
changelog_1172_h2=Version 1.0.62 (2007-11-25) changelog_1172_li=Using LIMIT with values close to Integer.MAX_VALUE didn't work correctly.
changelog_1173_li=Large updates and deletes are now supported by buffering data to disk if required. The threshold is currently set to 100'000 bytes and can be changed using SET MAX_OPERATION_MEMORY or using by appending ;MAX_OPERATION_MEMORY\=.. to the database URL. See also the docs. changelog_1173_li=Certain setting in the Server didn't work (http\://code.google.com/p/h2database/issues/detail?id\=7).
changelog_1174_li=MVCC\: now an exception is thrown when an application tries to change the MVCC setting while the database is already open. changelog_1174_h2=Version 1.0.62 (2007-11-25)
changelog_1175_li=Referential integrity checks didn't lock the referenced table, and thus could read uncommitted rows of other connections. In that way the referential constraints could get violated (except when using MVCC). changelog_1175_li=Large updates and deletes are now supported by buffering data to disk if required. The threshold is currently set to 100'000 bytes and can be changed using SET MAX_OPERATION_MEMORY or using by appending ;MAX_OPERATION_MEMORY\=.. to the database URL. See also the docs.
changelog_1176_li=Renaming or dropping a user with a schema, or removing the admin property of that user made the schema inaccessible after re-opening the database. Fixed. changelog_1176_li=MVCC\: now an exception is thrown when an application tries to change the MVCC setting while the database is already open.
changelog_1177_li=The H2 Console now also support the command line option -ifExists when started from the Server tool, but only when connecting to H2 databases. changelog_1177_li=Referential integrity checks didn't lock the referenced table, and thus could read uncommitted rows of other connections. In that way the referential constraints could get violated (except when using MVCC).
changelog_1178_li=Duplicate column names were not detected when renaming columns. Fixed. changelog_1178_li=Renaming or dropping a user with a schema, or removing the admin property of that user made the schema inaccessible after re-opening the database. Fixed.
changelog_1179_li=The console did not display multiple embedded spaces in text correctly. Fixed. changelog_1179_li=The H2 Console now also support the command line option -ifExists when started from the Server tool, but only when connecting to H2 databases.
changelog_1180_li=Google Android support\: use 'ant codeswitchAndroid' to switch the source code to Android. changelog_1180_li=Duplicate column names were not detected when renaming columns. Fixed.
changelog_1181_li=Values of type ARRAY are now sorted as in PostgreSQL. changelog_1181_li=The console did not display multiple embedded spaces in text correctly. Fixed.
changelog_1182_li=In the cluster mode, could not connect if only one server was running (last release only). Fixed. changelog_1182_li=Google Android support\: use 'ant codeswitchAndroid' to switch the source code to Android.
changelog_1183_li=The performance of large CSV operations has been improved. changelog_1183_li=Values of type ARRAY are now sorted as in PostgreSQL.
changelog_1184_li=Now using custom toString() for most JDBC objects and commands. changelog_1184_li=In the cluster mode, could not connect if only one server was running (last release only). Fixed.
changelog_1185_li=Nested temporary views (SELECT * FROM (SELECT ...)) with parameters didn't work in some cases. Fixed. changelog_1185_li=The performance of large CSV operations has been improved.
changelog_1186_li=CSV\: Using an empty field delimiter didn't work (a workaround was using char(0)). Fixed. changelog_1186_li=Now using custom toString() for most JDBC objects and commands.
changelog_1187_li=A patch for Apache DDL Utils is available at https\://issues.apache.org/jira/browse/DDLUTILS-185 changelog_1187_li=Nested temporary views (SELECT * FROM (SELECT ...)) with parameters didn't work in some cases. Fixed.
changelog_1188_li=The default value for h2.emergencySpaceInitial is now 256 KB (to speed up creating encrypted databases) changelog_1188_li=CSV\: Using an empty field delimiter didn't work (a workaround was using char(0)). Fixed.
changelog_1189_li=Eduardo Velasques has translated the H2 Console and the error messages to Brazilian Portuguese. Thanks a lot\! changelog_1189_li=A patch for Apache DDL Utils is available at https\://issues.apache.org/jira/browse/DDLUTILS-185
changelog_1190_li=Creating a table from GROUP_CONCAT didn't work if the data was longer than 255 characters changelog_1190_li=The default value for h2.emergencySpaceInitial is now 256 KB (to speed up creating encrypted databases)
changelog_1191_h2=Version 1.0.61 (2007-11-10) changelog_1191_li=Eduardo Velasques has translated the H2 Console and the error messages to Brazilian Portuguese. Thanks a lot\!
changelog_1192_li=The Lucene Fulltext implementation is now compiled and included in the h2.jar. Requires Lucene 2.2. changelog_1192_li=Creating a table from GROUP_CONCAT didn't work if the data was longer than 255 characters
changelog_1193_li=Added more tests. The code coverage is now at 83%. changelog_1193_h2=Version 1.0.61 (2007-11-10)
changelog_1194_li=ResultSetMetaData.getColumnDisplaySize was calculated as the longest display size for the given result set, but should be the maximum size that fits in the column. Fixed. changelog_1194_li=The Lucene Fulltext implementation is now compiled and included in the h2.jar. Requires Lucene 2.2.
changelog_1195_li=The MODE used to be a global setting, now it is a database level setting. changelog_1195_li=Added more tests. The code coverage is now at 83%.
changelog_1196_li=The database does now always round to the nearest number when converting a floating point to a integer\: CAST(1.5 AS INT) will now result in 2, like in PostgreSQL and MySQL. changelog_1196_li=ResultSetMetaData.getColumnDisplaySize was calculated as the longest display size for the given result set, but should be the maximum size that fits in the column. Fixed.
changelog_1197_li=Math operations using unknown data types (for example -? and ?+?) are now interpreted as decimal. changelog_1197_li=The MODE used to be a global setting, now it is a database level setting.
changelog_1198_li=INSTR, LOCATE\: backward searching is not supported by using a negative start position. changelog_1198_li=The database does now always round to the nearest number when converting a floating point to a integer\: CAST(1.5 AS INT) will now result in 2, like in PostgreSQL and MySQL.
changelog_1199_li=Can now open a database stored in a jar or zip file (for example, jdbc\:h2\:zip\:c\:/temp/h2.zip\!/test). changelog_1199_li=Math operations using unknown data types (for example -? and ?+?) are now interpreted as decimal.
changelog_1200_li=Files access now uses an API (FileSystem, FileObject), this will simplify adding other file systems and features (for example replication). changelog_1200_li=INSTR, LOCATE\: backward searching is not supported by using a negative start position.
changelog_1201_li=Vlad Alexahin has translated H2 Console to Russian. Thanks a lot\! changelog_1201_li=Can now open a database stored in a jar or zip file (for example, jdbc\:h2\:zip\:c\:/temp/h2.zip\!/test).
changelog_1202_li=Descending indexes are now supported. This is useful when sorting columns descending, for example by creation date. changelog_1202_li=Files access now uses an API (FileSystem, FileObject), this will simplify adding other file systems and features (for example replication).
changelog_1203_li=Solved a Java level deadlock in the DatabaseCloser. changelog_1203_li=Vlad Alexahin has translated H2 Console to Russian. Thanks a lot\!
changelog_1204_li=CREATE SEQUENCE\: New option CACHE (number of pre-allocated numbers). New column CACHE in the sequence meta data table. The default cache size is still 32. changelog_1204_li=Descending indexes are now supported. This is useful when sorting columns descending, for example by creation date.
changelog_1205_li=MVCC\: The system property h2.mvcc has been removed. A few bugs have been fixed, and new tests have been added. changelog_1205_li=Solved a Java level deadlock in the DatabaseCloser.
changelog_1206_h2=Version 1.0.60 (2007-10-20) changelog_1206_li=CREATE SEQUENCE\: New option CACHE (number of pre-allocated numbers). New column CACHE in the sequence meta data table. The default cache size is still 32.
changelog_1207_li=JdbcXAConnection\: starting a transaction before getting the connection didn't switch off autocommit. changelog_1207_li=MVCC\: The system property h2.mvcc has been removed. A few bugs have been fixed, and new tests have been added.
changelog_1208_li=User defined aggregate functions are not supported. changelog_1208_h2=Version 1.0.60 (2007-10-20)
changelog_1209_li=Server.shutdownTcpServer was blocked when first called with force\=false and then force\=true. Now documentation is improved, and it is no longer blocked. changelog_1209_li=JdbcXAConnection\: starting a transaction before getting the connection didn't switch off autocommit.
changelog_1210_li=Stack traces did not include the SQL statement in all cases where they could have. Also, stack traces with SQL statement are now shorter. changelog_1210_li=User defined aggregate functions are not supported.
changelog_1211_li=Linked tables\: now tables in non-default schemas are supported as well changelog_1211_li=Server.shutdownTcpServer was blocked when first called with force\=false and then force\=true. Now documentation is improved, and it is no longer blocked.
changelog_1212_li=New Italian translation from PierPaolo Ucchino. Thanks a lot\! changelog_1212_li=Stack traces did not include the SQL statement in all cases where they could have. Also, stack traces with SQL statement are now shorter.
changelog_1213_li=CSV\: New methods to set the escape character and field delimiter in the Csv tool and the CSVWRITE and CSVREAD methods. changelog_1213_li=Linked tables\: now tables in non-default schemas are supported as well
changelog_1214_li=Prepared statements could not be used after data definition statements (creating tables and so on). Fixed. changelog_1214_li=New Italian translation from PierPaolo Ucchino. Thanks a lot\!
changelog_1215_li=PreparedStatement.setMaxRows could not be changed to a higher value after the statement was executed. changelog_1215_li=CSV\: New methods to set the escape character and field delimiter in the Csv tool and the CSVWRITE and CSVREAD methods.
changelog_1216_li=The H2 Console could not connect twice to the same H2 embedded database at the same time. Fixed. changelog_1216_li=Prepared statements could not be used after data definition statements (creating tables and so on). Fixed.
changelog_1217_li=CSVREAD, RUNSCRIPT and so on now support URLs as well, using URL.openStream(). Example\: select * from csvread('jar\:file\:///c\:/temp/test.jar\!/test.csv'); changelog_1217_li=PreparedStatement.setMaxRows could not be changed to a higher value after the statement was executed.
changelog_1218_h2=Version 1.0.59 (2007-10-03) changelog_1218_li=The H2 Console could not connect twice to the same H2 embedded database at the same time. Fixed.
changelog_1219_li=When the data type was unknown in a subquery, sometimes the wrong exception (ArrayIndexOutOfBounds) was thrown. Fixed. changelog_1219_li=CSVREAD, RUNSCRIPT and so on now support URLs as well, using URL.openStream(). Example\: select * from csvread('jar\:file\:///c\:/temp/test.jar\!/test.csv');
changelog_1220_li=If the process was killed while the database was running, sometimes the database could not be opened ('double allocation') except when the system property h2.check was set to false. Fixed. changelog_1220_h2=Version 1.0.59 (2007-10-03)
changelog_1221_li=Multi-threaded kernel (MULTI_THREADED\=1)\: A synchronization problem has been fixed. changelog_1221_li=When the data type was unknown in a subquery, sometimes the wrong exception (ArrayIndexOutOfBounds) was thrown. Fixed.
changelog_1222_li=A PreparedStatement that was cancelled could not be reused. Fixed. changelog_1222_li=If the process was killed while the database was running, sometimes the database could not be opened ('double allocation') except when the system property h2.check was set to false. Fixed.
changelog_1223_li=H2 Console\: Progress information when logging into a H2 embedded database (useful when opening a database is slow). changelog_1223_li=Multi-threaded kernel (MULTI_THREADED\=1)\: A synchronization problem has been fixed.
changelog_1224_li=When the database was closed while logging was disabled (LOG 0), re-opening the database was slow. Fixed. changelog_1224_li=A PreparedStatement that was cancelled could not be reused. Fixed.
changelog_1225_li=Fulltext search is now documented (in the Tutorial). changelog_1225_li=H2 Console\: Progress information when logging into a H2 embedded database (useful when opening a database is slow).
changelog_1226_li=The Console did not refresh the table list if the CREATE TABLE statement started with a comment. Fixed. changelog_1226_li=When the database was closed while logging was disabled (LOG 0), re-opening the database was slow. Fixed.
changelog_1227_li=When creating a table using CREATE TABLE .. AS SELECT, the precision for some data types (for example VARCHAR) was set to the default precision. Fixed. changelog_1227_li=Fulltext search is now documented (in the Tutorial).
changelog_1228_li=When using the (undocumented) in-memory file system (jdbc\:h2\:memFS\:x or jdbc\:h2\:memLZF\:x), and using multiple connections, a ConcurrentModificationException could occur. Fixed. changelog_1228_li=The Console did not refresh the table list if the CREATE TABLE statement started with a comment. Fixed.
changelog_1229_li=REGEXP compatibility\: So far String.matches was used, but for compatibility with MySQL, now Matcher.find is used. changelog_1229_li=When creating a table using CREATE TABLE .. AS SELECT, the precision for some data types (for example VARCHAR) was set to the default precision. Fixed.
changelog_1230_li=SCRIPT\: the SQL statements in the result set now include the terminating semicolon as well. Simplifies copy and paste. changelog_1230_li=When using the (undocumented) in-memory file system (jdbc\:h2\:memFS\:x or jdbc\:h2\:memLZF\:x), and using multiple connections, a ConcurrentModificationException could occur. Fixed.
changelog_1231_li=When using a subquery with group by as a table, some columns could not be used in the where condition in the outer query. Example\: SELECT * FROM (SELECT ID, COUNT(*) C FROM TEST) WHERE C > 100. Fixed. changelog_1231_li=REGEXP compatibility\: So far String.matches was used, but for compatibility with MySQL, now Matcher.find is used.
changelog_1232_li=Views with subqueries as tables and queries with nested subqueries as tables did not always work. Fixed. changelog_1232_li=SCRIPT\: the SQL statements in the result set now include the terminating semicolon as well. Simplifies copy and paste.
changelog_1233_li=Compatibility\: comparing columns with constants that are out of range does not throw an exception. changelog_1233_li=When using a subquery with group by as a table, some columns could not be used in the where condition in the outer query. Example\: SELECT * FROM (SELECT ID, COUNT(*) C FROM TEST) WHERE C > 100. Fixed.
changelog_1234_h2=Version 1.0.58 (2007-09-15) changelog_1234_li=Views with subqueries as tables and queries with nested subqueries as tables did not always work. Fixed.
changelog_1235_li=System.exit is no longer called by the WebServer, the Console and the Server tool (except to set the exit code if required). This is important when using OSGi. changelog_1235_li=Compatibility\: comparing columns with constants that are out of range does not throw an exception.
changelog_1236_li=Optimization for independent subqueries. For example, this query can now an index\: SELECT * FROM TEST WHERE ID \= (SELECT MAX(ID) FROM TEST) This can be disabled by setting the system property h2.optimizeSubqueryCache to false. changelog_1236_h2=Version 1.0.58 (2007-09-15)
changelog_1237_li=The explain plan now says\: /* direct lookup query */ if the query can be processed directly without reading rows, for example when using MIN(indexed column), MAX(indexed column), or COUNT(*). changelog_1237_li=System.exit is no longer called by the WebServer, the Console and the Server tool (except to set the exit code if required). This is important when using OSGi.
changelog_1238_li=When using IFNULL, NULLIF, COALESCE, LEAST, or GREATEST, and the first parameter was ?, an exception was thrown. Now the highest data type of all parameters is used. changelog_1238_li=Optimization for independent subqueries. For example, this query can now an index\: SELECT * FROM TEST WHERE ID \= (SELECT MAX(ID) FROM TEST) This can be disabled by setting the system property h2.optimizeSubqueryCache to false.
changelog_1239_li=When comparing TINYINT or SMALLINT columns against constants, the index was not used. Fixed. changelog_1239_li=The explain plan now says\: /* direct lookup query */ if the query can be processed directly without reading rows, for example when using MIN(indexed column), MAX(indexed column), or COUNT(*).
changelog_1240_li=Maven 2\: new version are now automatically synced with the central repositories. changelog_1240_li=When using IFNULL, NULLIF, COALESCE, LEAST, or GREATEST, and the first parameter was ?, an exception was thrown. Now the highest data type of all parameters is used.
changelog_1241_li=The default value for MAX_MEMORY_UNDO is now 100000. changelog_1241_li=When comparing TINYINT or SMALLINT columns against constants, the index was not used. Fixed.
changelog_1242_li=The documentation indexer does no longer index Japanese pages. If somebody knows how to split Japanese into words please post it. changelog_1242_li=Maven 2\: new version are now automatically synced with the central repositories.
changelog_1243_li=Oracle compatibility\: SYSDATE now returns a timestamp. CHR(..) is now an alias for CHAR(..). changelog_1243_li=The default value for MAX_MEMORY_UNDO is now 100000.
changelog_1244_li=After deleting data, empty space in the database files was not efficiently reused (but it was reused when opening the database). This has been fixed. changelog_1244_li=The documentation indexer does no longer index Japanese pages. If somebody knows how to split Japanese into words please post it.
changelog_1245_li=About 230 bytes per database was leaked. This is a problem for applications opening and closing many thousand databases. The main problem\: a shutdown hook was added but never removed. Fixed. In JDK 1.4, there is <a href\="http\://bugs.sun.com/bugdatabase/view_bug.do?bug_id\=4197876">an additionally problem</a> . A workaround has been implemented. changelog_1245_li=Oracle compatibility\: SYSDATE now returns a timestamp. CHR(..) is now an alias for CHAR(..).
changelog_1246_li=Optimization for COLUMN IN(.., NULL) if the column does not allow NULL values. changelog_1246_li=After deleting data, empty space in the database files was not efficiently reused (but it was reused when opening the database). This has been fixed.
changelog_1247_li=Using spaces in column and table aliases was not supported when used inside a view or temporary view. changelog_1247_li=About 230 bytes per database was leaked. This is a problem for applications opening and closing many thousand databases. The main problem\: a shutdown hook was added but never removed. Fixed. In JDK 1.4, there is <a href\="http\://bugs.sun.com/bugdatabase/view_bug.do?bug_id\=4197876">an additionally problem</a> . A workaround has been implemented.
changelog_1248_li=The version (build) number is now included in the manifest file. changelog_1248_li=Optimization for COLUMN IN(.., NULL) if the column does not allow NULL values.
changelog_1249_li=In some systems, SecureRandom.generateSeed is very slow (taking one minute or more). For those cases, an alternative method is used that takes less than one second. changelog_1249_li=Using spaces in column and table aliases was not supported when used inside a view or temporary view.
changelog_1250_li=The database file sizes are now increased at most 32 MB at any time. changelog_1250_li=The version (build) number is now included in the manifest file.
changelog_1251_li=New method DatabaseEventListener.opened that is called just after opening a database. changelog_1251_li=In some systems, SecureRandom.generateSeed is very slow (taking one minute or more). For those cases, an alternative method is used that takes less than one second.
changelog_1252_li=When using the Console with Internet Explorer 6.0 or 7.0, a Javascript error was thrown after clearing the query. changelog_1252_li=The database file sizes are now increased at most 32 MB at any time.
changelog_1253_li=A database can now be opened even if class of a user defined function is not in the classpath. Trying to call the function will throws an exception. changelog_1253_li=New method DatabaseEventListener.opened that is called just after opening a database.
changelog_1254_li=User defined functions and constants may not overload built-in functions and constants. This didn't work before, but now trying to create such an object will fail. changelog_1254_li=When using the Console with Internet Explorer 6.0 or 7.0, a Javascript error was thrown after clearing the query.
changelog_1255_li=Improved MultiDimension tool (for spatial queries)\: in the last few releases the tool was actually slower than using a regular query (because index lookup got faster, and because the tool didn't support prepared statements) Now the tool generates prepared statements, and the performance is better again (about 5 times faster for a reasonable amount of data). changelog_1255_li=A database can now be opened even if class of a user defined function is not in the classpath. Trying to call the function will throws an exception.
changelog_1256_li=Adding a foreign key or when re-enabling referential integrity for a table failed when checking was enabled and the reference contained NULL. changelog_1256_li=User defined functions and constants may not overload built-in functions and constants. This didn't work before, but now trying to create such an object will fail.
changelog_1257_li=For PgServer, character encoding other than UTF-8 did not work correctly. Fixed. changelog_1257_li=Improved MultiDimension tool (for spatial queries)\: in the last few releases the tool was actually slower than using a regular query (because index lookup got faster, and because the tool didn't support prepared statements) Now the tool generates prepared statements, and the performance is better again (about 5 times faster for a reasonable amount of data).
changelog_1258_li=Using a function in a GROUP BY expression that is used in a view as a condition did not always work. changelog_1258_li=Adding a foreign key or when re-enabling referential integrity for a table failed when checking was enabled and the reference contained NULL.
changelog_1259_h2=Version 1.0.57 (2007-08-25) changelog_1259_li=For PgServer, character encoding other than UTF-8 did not work correctly. Fixed.
changelog_1260_li=New experimental feature MVCC (multi version concurrency control). Can be set as a option when opening the database (jdbc\:h2\:~/test;MVCC\=TRUE) or as a system property (-Dh2.mvcc\=true). This is work-in-progress, use it at your own risk. Feedback is welcome. changelog_1260_li=Using a function in a GROUP BY expression that is used in a view as a condition did not always work.
changelog_1261_li=The version number is now major.minor.micro where micro is the build number. Not all version are public, so there may be gaps in the micro. The minor changes when there is a file format change. changelog_1261_h2=Version 1.0.57 (2007-08-25)
changelog_1262_li=The backup tool (org.h2.tools.Backup) did not work. The restore tool did not work when the -db parameter was used. Fixed. The documentation of the backup tool has been changed\: only one database may be backed up at any time. changelog_1262_li=New experimental feature MVCC (multi version concurrency control). Can be set as a option when opening the database (jdbc\:h2\:~/test;MVCC\=TRUE) or as a system property (-Dh2.mvcc\=true). This is work-in-progress, use it at your own risk. Feedback is welcome.
changelog_1263_li=Opening large read-only databases was very slow. Fixed. changelog_1263_li=The version number is now major.minor.micro where micro is the build number. Not all version are public, so there may be gaps in the micro. The minor changes when there is a file format change.
changelog_1264_li=New Japanese translation of the error messages thanks to Ikemoto Masahiro. Thanks a lot\! changelog_1264_li=The backup tool (org.h2.tools.Backup) did not work. The restore tool did not work when the -db parameter was used. Fixed. The documentation of the backup tool has been changed\: only one database may be backed up at any time.
changelog_1265_li=Disabling / enabling referential integrity for a table can now be used inside a transaction. changelog_1265_li=Opening large read-only databases was very slow. Fixed.
changelog_1266_li=Rights checking for dynamic tables (SELECT * FROM (SELECT ...)) did not work. Fixed. changelog_1266_li=New Japanese translation of the error messages thanks to Ikemoto Masahiro. Thanks a lot\!
changelog_1267_li=Creating more than 10 views that depend on each other was very slow. Reconnecting was slow as well. Fixed. changelog_1267_li=Disabling / enabling referential integrity for a table can now be used inside a transaction.
changelog_1268_li=When used as as Servlet, the H2 Console did not work with SSL (using Tomcat). Fixed. changelog_1268_li=Rights checking for dynamic tables (SELECT * FROM (SELECT ...)) did not work. Fixed.
changelog_1269_li=When altering a table with foreign key constraint, if there was no manual index created for the referenced columns, the automatically created index was dropped while still being used. Fixed. changelog_1269_li=Creating more than 10 views that depend on each other was very slow. Reconnecting was slow as well. Fixed.
changelog_1270_li=Check and foreign key constraints now checks if the existing data is consistent (this can be disabled by appending NOCHECK). It is also possible to check existing data when re-enabling referential integrity for a table. changelog_1270_li=When used as as Servlet, the H2 Console did not work with SSL (using Tomcat). Fixed.
changelog_1271_li=Some unit tests failed on Linux because the file system works differently. The unit tests are fixed and should work now. changelog_1271_li=When altering a table with foreign key constraint, if there was no manual index created for the referenced columns, the automatically created index was dropped while still being used. Fixed.
changelog_1272_li=Can now incrementally translate the documentation. See also FAQ. changelog_1272_li=Check and foreign key constraints now checks if the existing data is consistent (this can be disabled by appending NOCHECK). It is also possible to check existing data when re-enabling referential integrity for a table.
changelog_1273_li=Improved error messages\: some tools can't show the root cause of an exception. Adding the message of the root cause to the message of the thrown exception now where it makes sense. changelog_1273_li=Some unit tests failed on Linux because the file system works differently. The unit tests are fixed and should work now.
changelog_1274_li=The H2 Console can now connect to databases using JNDI. The driver class name must be a javax.naming.Context, (for example javax.naming.InitialContext), and the URL the resource name (for example java\:comp/env/jdbc/Test). This should also work for linked tables. changelog_1274_li=Can now incrementally translate the documentation. See also FAQ.
changelog_1275_li=Google translate did not work for the H2 homepage. It should be fixed now. changelog_1275_li=Improved error messages\: some tools can't show the root cause of an exception. Adding the message of the root cause to the message of the thrown exception now where it makes sense.
changelog_1276_li=The CONVERT function did not work with views when using UNION. changelog_1276_li=The H2 Console can now connect to databases using JNDI. The driver class name must be a javax.naming.Context, (for example javax.naming.InitialContext), and the URL the resource name (for example java\:comp/env/jdbc/Test). This should also work for linked tables.
changelog_1277_li=The build now issues a warning if the source code is switched to the wrong version. changelog_1277_li=Google translate did not work for the H2 homepage. It should be fixed now.
changelog_1278_li=The default lock mode is now read committed instead of serialized. changelog_1278_li=The CONVERT function did not work with views when using UNION.
changelog_1279_li=PG server\: data was truncated when reading large VARCHAR columns and decimal columns. changelog_1279_li=The build now issues a warning if the source code is switched to the wrong version.
changelog_1280_li=PG server\: when the same database was accessed multiple times using the PostgreSQL ODBC driver, the pg_catalog schema update failed, and connecting to the database was not possible. Fixed. changelog_1280_li=The default lock mode is now read committed instead of serialized.
changelog_1281_li=Some file operations didn't work for files in the root directory. Fixed. changelog_1281_li=PG server\: data was truncated when reading large VARCHAR columns and decimal columns.
changelog_1282_li=In the Restore tool, the parameter -file did not work. Fixed. changelog_1282_li=PG server\: when the same database was accessed multiple times using the PostgreSQL ODBC driver, the pg_catalog schema update failed, and connecting to the database was not possible. Fixed.
changelog_1283_li=Two-phase commit\: commit with transaction name was only supported in the recovery scan. Now it is always supported. changelog_1283_li=Some file operations didn't work for files in the root directory. Fixed.
changelog_1284_li=The column name C_CURRENT_TIMESTAMP did not work in the last release. changelog_1284_li=In the Restore tool, the parameter -file did not work. Fixed.
changelog_1285_li=OpenOffice compatibility\: support database name in column names. changelog_1285_li=Two-phase commit\: commit with transaction name was only supported in the recovery scan. Now it is always supported.
changelog_1286_li=The column name C_CURRENT_TIMESTAMP did not work in the last release.
changelog_1287_li=OpenOffice compatibility\: support database name in column names.
download_1000_h1=Downloads download_1000_h1=Downloads
download_1001_h3=Version 1.0.69 (2008-04-20, Current) download_1001_h3=Version 1.0.71 (2008-04-25, Current)
download_1002_a=Windows Installer download_1002_a=Windows Installer
download_1003_a=Platform-Independent Zip download_1003_a=Platform-Independent Zip
download_1004_h3=Version 1.0.68 (2008-03-29, Last Stable) download_1004_h3=Version 1.0.69 (2008-03-29, Last Stable)
download_1005_a=Windows Installer download_1005_a=Windows Installer
download_1006_a=Platform-Independent Zip download_1006_a=Platform-Independent Zip
download_1007_h3=Download Mirror and Older Versions download_1007_h3=Download Mirror and Older Versions
...@@ -1174,6 +1176,7 @@ history_1030_li=Oliver Computing LLC, USA ...@@ -1174,6 +1176,7 @@ history_1030_li=Oliver Computing LLC, USA
history_1031_li=Harpal Grover Consulting Inc., USA history_1031_li=Harpal Grover Consulting Inc., USA
history_1032_li=Elisabetta Berlini, Italy history_1032_li=Elisabetta Berlini, Italy
history_1033_li=William Gilbert, USA history_1033_li=William Gilbert, USA
history_1034_li=Antonio Dieguez, Chile
installation_1000_h1=Installation installation_1000_h1=Installation
installation_1001_a=Requirements installation_1001_a=Requirements
installation_1002_a=Supported Platforms installation_1002_a=Supported Platforms
...@@ -1505,7 +1508,7 @@ mainWeb_1004_li=JDBC and ODBC API; browser based Console application ...@@ -1505,7 +1508,7 @@ mainWeb_1004_li=JDBC and ODBC API; browser based Console application
mainWeb_1005_li=Written in Java; can be compiled with GCJ and IKVM.NET mainWeb_1005_li=Written in Java; can be compiled with GCJ and IKVM.NET
mainWeb_1006_li=Small footprint\: around 1 MB mainWeb_1006_li=Small footprint\: around 1 MB
mainWeb_1007_h3=Download mainWeb_1007_h3=Download
mainWeb_1008_td=Version 1.0.70 (2008-04-20)\: mainWeb_1008_td=Version 1.0.71 (2008-04-25)\:
mainWeb_1009_a=Windows Installer (3.1 MB) mainWeb_1009_a=Windows Installer (3.1 MB)
mainWeb_1010_a=All platforms (zip, 4.5 MB) mainWeb_1010_a=All platforms (zip, 4.5 MB)
mainWeb_1011_a=All Downloads mainWeb_1011_a=All Downloads
...@@ -2350,9 +2353,10 @@ roadmap_1378_li=MVCC should not be memory bound (uncommitted data is kept in mem ...@@ -2350,9 +2353,10 @@ roadmap_1378_li=MVCC should not be memory bound (uncommitted data is kept in mem
roadmap_1379_li=Support CREATE TEMPORARY LINKED TABLE. roadmap_1379_li=Support CREATE TEMPORARY LINKED TABLE.
roadmap_1380_li=MySQL compatibility\: SELECT @variable \:\= x FROM SYSTEM_RANGE(1, 50); roadmap_1380_li=MySQL compatibility\: SELECT @variable \:\= x FROM SYSTEM_RANGE(1, 50);
roadmap_1381_li=Oracle compatibility\: support NLS_DATE_FORMAT. roadmap_1381_li=Oracle compatibility\: support NLS_DATE_FORMAT.
roadmap_1382_h2=Not Planned roadmap_1382_li=Support flashback queries as in Oracle.
roadmap_1383_li=HSQLDB (did) support this\: select id i from test where i>0 (other databases don't). Supporting it may break compatibility. roadmap_1383_h2=Not Planned
roadmap_1384_li=String.intern (so that Strings can be compared with \=\=) will not be used because some VMs have problems when used extensively. roadmap_1384_li=HSQLDB (did) support this\: select id i from test where i>0 (other databases don't). Supporting it may break compatibility.
roadmap_1385_li=String.intern (so that Strings can be compared with \=\=) will not be used because some VMs have problems when used extensively.
search_1000_b=Search\: search_1000_b=Search\:
search_1001_td=Highlight keyword(s) search_1001_td=Highlight keyword(s)
search_1002_a=Home search_1002_a=Home
......
...@@ -10,6 +10,7 @@ import java.io.IOException; ...@@ -10,6 +10,7 @@ import java.io.IOException;
import java.sql.SQLException; import java.sql.SQLException;
import org.h2.constant.SysProperties; import org.h2.constant.SysProperties;
import org.h2.engine.Constants;
import org.h2.engine.SessionRemote; import org.h2.engine.SessionRemote;
import org.h2.expression.ParameterInterface; import org.h2.expression.ParameterInterface;
import org.h2.expression.ParameterRemote; import org.h2.expression.ParameterRemote;
...@@ -42,28 +43,43 @@ public class CommandRemote implements CommandInterface { ...@@ -42,28 +43,43 @@ public class CommandRemote implements CommandInterface {
trace = session.getTrace(); trace = session.getTrace();
this.sql = sql; this.sql = sql;
parameters = new ObjectArray(); parameters = new ObjectArray();
prepare(session); prepare(session, true);
for (int i = 0; i < paramCount; i++) {
parameters.add(new ParameterRemote(i));
}
// set session late because prepare might fail - in this case we don't // set session late because prepare might fail - in this case we don't
// need to close the object // need to close the object
this.session = session; this.session = session;
this.fetchSize = fetchSize; this.fetchSize = fetchSize;
} }
private void prepare(SessionRemote session) throws SQLException { private void prepare(SessionRemote session, boolean createParams) throws SQLException {
id = session.getNextId(); id = session.getNextId();
paramCount = 0; paramCount = 0;
boolean readParams = session.getClientVersion() >= Constants.TCP_DRIVER_VERSION_6;
for (int i = 0; i < transferList.size(); i++) { for (int i = 0; i < transferList.size(); i++) {
try { try {
Transfer transfer = (Transfer) transferList.get(i); Transfer transfer = (Transfer) transferList.get(i);
if (readParams) {
session.traceOperation("SESSION_PREPARE_READ_PARAMS", id);
transfer.writeInt(SessionRemote.SESSION_PREPARE_READ_PARAMS).writeInt(id).writeString(sql);
} else {
session.traceOperation("SESSION_PREPARE", id); session.traceOperation("SESSION_PREPARE", id);
transfer.writeInt(SessionRemote.SESSION_PREPARE).writeInt(id).writeString(sql); transfer.writeInt(SessionRemote.SESSION_PREPARE).writeInt(id).writeString(sql);
}
session.done(transfer); session.done(transfer);
isQuery = transfer.readBoolean(); isQuery = transfer.readBoolean();
readonly = transfer.readBoolean(); readonly = transfer.readBoolean();
paramCount = transfer.readInt(); paramCount = transfer.readInt();
if (createParams) {
parameters.clear();
for (int j = 0; j < paramCount; j++) {
if (readParams) {
ParameterRemote p = new ParameterRemote(j);
p.read(transfer);
parameters.add(p);
} else {
parameters.add(new ParameterRemote(j));
}
}
}
} catch (IOException e) { } catch (IOException e) {
session.removeServer(i--); session.removeServer(i--);
} }
...@@ -86,7 +102,7 @@ public class CommandRemote implements CommandInterface { ...@@ -86,7 +102,7 @@ public class CommandRemote implements CommandInterface {
} }
if (id <= session.getCurrentId() - SysProperties.SERVER_CACHED_OBJECTS) { if (id <= session.getCurrentId() - SysProperties.SERVER_CACHED_OBJECTS) {
// object is too old - we need to prepare again // object is too old - we need to prepare again
prepare(session); prepare(session, false);
} }
int objectId = session.getNextId(); int objectId = session.getNextId();
ResultRemote result = null; ResultRemote result = null;
...@@ -115,7 +131,7 @@ public class CommandRemote implements CommandInterface { ...@@ -115,7 +131,7 @@ public class CommandRemote implements CommandInterface {
session.checkClosed(); session.checkClosed();
if (id <= session.getCurrentId() - SysProperties.SERVER_CACHED_OBJECTS) { if (id <= session.getCurrentId() - SysProperties.SERVER_CACHED_OBJECTS) {
// object is too old - we need to prepare again // object is too old - we need to prepare again
prepare(session); prepare(session, false);
} }
int objectId = session.getNextId(); int objectId = session.getNextId();
ResultRemote result = null; ResultRemote result = null;
...@@ -160,7 +176,7 @@ public class CommandRemote implements CommandInterface { ...@@ -160,7 +176,7 @@ public class CommandRemote implements CommandInterface {
session.checkClosed(); session.checkClosed();
if (id <= session.getCurrentId() - SysProperties.SERVER_CACHED_OBJECTS) { if (id <= session.getCurrentId() - SysProperties.SERVER_CACHED_OBJECTS) {
// object is too old - we need to prepare again // object is too old - we need to prepare again
prepare(session); prepare(session, false);
} }
int updateCount = 0; int updateCount = 0;
boolean autoCommit = false; boolean autoCommit = false;
......
...@@ -14,6 +14,7 @@ import org.h2.constant.ErrorCode; ...@@ -14,6 +14,7 @@ import org.h2.constant.ErrorCode;
import org.h2.engine.Right; import org.h2.engine.Right;
import org.h2.engine.Session; import org.h2.engine.Session;
import org.h2.expression.Expression; import org.h2.expression.Expression;
import org.h2.expression.Parameter;
import org.h2.log.UndoLogRecord; import org.h2.log.UndoLogRecord;
import org.h2.message.Message; import org.h2.message.Message;
import org.h2.result.LocalResult; import org.h2.result.LocalResult;
...@@ -184,7 +185,12 @@ public class Insert extends Prepared { ...@@ -184,7 +185,12 @@ public class Insert extends Prepared {
for (int i = 0; i < expr.length; i++) { for (int i = 0; i < expr.length; i++) {
Expression e = expr[i]; Expression e = expr[i];
if (e != null) { if (e != null) {
expr[i] = e.optimize(session); e = e.optimize(session);
if (e instanceof Parameter) {
Parameter p = (Parameter) e;
p.setColumn(columns[i]);
}
expr[i] = e;
} }
} }
} }
......
...@@ -13,6 +13,7 @@ import org.h2.constant.ErrorCode; ...@@ -13,6 +13,7 @@ import org.h2.constant.ErrorCode;
import org.h2.engine.Right; import org.h2.engine.Right;
import org.h2.engine.Session; import org.h2.engine.Session;
import org.h2.expression.Expression; import org.h2.expression.Expression;
import org.h2.expression.Parameter;
import org.h2.expression.ValueExpression; import org.h2.expression.ValueExpression;
import org.h2.message.Message; import org.h2.message.Message;
import org.h2.result.LocalResult; import org.h2.result.LocalResult;
...@@ -63,6 +64,10 @@ public class Update extends Prepared { ...@@ -63,6 +64,10 @@ public class Update extends Prepared {
.getName()); .getName());
} }
expressions[id] = expression; expressions[id] = expression;
if (expression instanceof Parameter) {
Parameter p = (Parameter) expression;
p.setColumn(column);
}
} }
public int update() throws SQLException { public int update() throws SQLException {
......
...@@ -35,8 +35,8 @@ package org.h2.engine; ...@@ -35,8 +35,8 @@ package org.h2.engine;
* - No " Message.get" (must be "throw Message.get") * - No " Message.get" (must be "throw Message.get")
* - No TODO in the docs, remove @~ in .utf8.txt files * - No TODO in the docs, remove @~ in .utf8.txt files
* - Run regression test with JDK 1.4 and 1.5 * - Run regression test with JDK 1.4 and 1.5
* * - Use latest versions of other dbs (Derby 10.4.1.3; PostgreSQL 8.3.1; MySQL 5.0.51)
* - Change version(s) in performance.html; use latest versions of other dbs * - Change version(s) in performance.html
* - Run 'ant benchmark' (with JDK 1.4 currently) * - Run 'ant benchmark' (with JDK 1.4 currently)
* - Copy the benchmark results and update the performance page and diagram * - Copy the benchmark results and update the performance page and diagram
* *
...@@ -76,8 +76,8 @@ package org.h2.engine; ...@@ -76,8 +76,8 @@ package org.h2.engine;
*/ */
public class Constants { public class Constants {
public static final int BUILD_ID = 71; public static final int BUILD_ID = 72;
private static final String BUILD = "2008-04-25"; private static final String BUILD = "2008-04-30";
public static final boolean ALLOW_EMPTY_BTREE_PAGES = true; public static final boolean ALLOW_EMPTY_BTREE_PAGES = true;
public static final int ALLOW_LITERALS_NONE = 0; public static final int ALLOW_LITERALS_NONE = 0;
...@@ -93,7 +93,8 @@ public class Constants { ...@@ -93,7 +93,8 @@ public class Constants {
public static final int FILE_BLOCK_SIZE = 16; public static final int FILE_BLOCK_SIZE = 16;
public static final String MAGIC_FILE_HEADER_TEXT = "-- H2 0.5/T -- ".substring(0, FILE_BLOCK_SIZE - 1) + "\n"; public static final String MAGIC_FILE_HEADER_TEXT = "-- H2 0.5/T -- ".substring(0, FILE_BLOCK_SIZE - 1) + "\n";
public static final String MAGIC_FILE_HEADER = "-- H2 0.5/B -- ".substring(0, FILE_BLOCK_SIZE - 1) + "\n"; public static final String MAGIC_FILE_HEADER = "-- H2 0.5/B -- ".substring(0, FILE_BLOCK_SIZE - 1) + "\n";
public static final int TCP_DRIVER_VERSION = 5; public static final int TCP_DRIVER_VERSION_5 = 5;
public static final int TCP_DRIVER_VERSION_6 = 6;
public static final int VERSION_JDBC_MAJOR = 3; public static final int VERSION_JDBC_MAJOR = 3;
public static final int VERSION_JDBC_MINOR = 0; public static final int VERSION_JDBC_MINOR = 0;
......
...@@ -472,7 +472,13 @@ public class Database implements DataHandler { ...@@ -472,7 +472,13 @@ public class Database implements DataHandler {
} catch (Throwable e) { } catch (Throwable e) {
if (recovery) { if (recovery) {
traceSystem.getTrace(Trace.DATABASE).error("opening index", e); traceSystem.getTrace(Trace.DATABASE).error("opening index", e);
fileIndex.close(); ArrayList list = new ArrayList(storageMap.values());
for (int i = 0; i < list.size(); i++) {
Storage s = (Storage) list.get(i);
if (s.getDiskFile() == fileIndex) {
removeStorage(s.getId(), fileIndex);
}
}
fileIndex.delete(); fileIndex.delete();
openFileIndex(); openFileIndex();
} else { } else {
...@@ -939,7 +945,11 @@ public class Database implements DataHandler { ...@@ -939,7 +945,11 @@ public class Database implements DataHandler {
private synchronized void closeOpenFilesAndUnlock() throws SQLException { private synchronized void closeOpenFilesAndUnlock() throws SQLException {
if (log != null) { if (log != null) {
stopWriter(); stopWriter();
try {
log.close(); log.close();
} catch (Throwable e) {
traceSystem.getTrace(Trace.DATABASE).error("close", e);
}
log = null; log = null;
} }
closeFiles(); closeFiles();
......
...@@ -15,10 +15,12 @@ import org.h2.command.CommandRemote; ...@@ -15,10 +15,12 @@ import org.h2.command.CommandRemote;
import org.h2.command.dml.SetTypes; import org.h2.command.dml.SetTypes;
import org.h2.constant.ErrorCode; import org.h2.constant.ErrorCode;
import org.h2.constant.SysProperties; import org.h2.constant.SysProperties;
import org.h2.expression.ParameterInterface;
import org.h2.jdbc.JdbcSQLException; import org.h2.jdbc.JdbcSQLException;
import org.h2.message.Message; import org.h2.message.Message;
import org.h2.message.Trace; import org.h2.message.Trace;
import org.h2.message.TraceSystem; import org.h2.message.TraceSystem;
import org.h2.result.ResultInterface;
import org.h2.store.DataHandler; import org.h2.store.DataHandler;
import org.h2.store.FileStore; import org.h2.store.FileStore;
import org.h2.util.FileUtils; import org.h2.util.FileUtils;
...@@ -29,6 +31,7 @@ import org.h2.util.SmallLRUCache; ...@@ -29,6 +31,7 @@ import org.h2.util.SmallLRUCache;
import org.h2.util.StringUtils; import org.h2.util.StringUtils;
import org.h2.value.Transfer; import org.h2.value.Transfer;
import org.h2.value.Value; import org.h2.value.Value;
import org.h2.value.ValueString;
/** /**
* The client side part of a session when using the server mode. * The client side part of a session when using the server mode.
...@@ -47,6 +50,7 @@ public class SessionRemote implements SessionInterface, DataHandler { ...@@ -47,6 +50,7 @@ public class SessionRemote implements SessionInterface, DataHandler {
public static final int COMMAND_COMMIT = 8; public static final int COMMAND_COMMIT = 8;
public static final int CHANGE_ID = 9; public static final int CHANGE_ID = 9;
public static final int COMMAND_GET_META_DATA = 10; public static final int COMMAND_GET_META_DATA = 10;
public static final int SESSION_PREPARE_READ_PARAMS = 11;
public static final int STATUS_ERROR = 0; public static final int STATUS_ERROR = 0;
public static final int STATUS_OK = 1; public static final int STATUS_OK = 1;
...@@ -64,13 +68,14 @@ public class SessionRemote implements SessionInterface, DataHandler { ...@@ -64,13 +68,14 @@ public class SessionRemote implements SessionInterface, DataHandler {
private String cipher; private String cipher;
private byte[] fileEncryptionKey; private byte[] fileEncryptionKey;
private Object lobSyncObject = new Object(); private Object lobSyncObject = new Object();
private int clientVersion = Constants.TCP_DRIVER_VERSION_5;
private Transfer initTransfer(ConnectionInfo ci, String db, String server) throws IOException, SQLException { private Transfer initTransfer(ConnectionInfo ci, String db, String server) throws IOException, SQLException {
Socket socket = NetUtils.createSocket(server, Constants.DEFAULT_SERVER_PORT, ci.isSSL()); Socket socket = NetUtils.createSocket(server, Constants.DEFAULT_SERVER_PORT, ci.isSSL());
Transfer trans = new Transfer(this); Transfer trans = new Transfer(this);
trans.setSocket(socket); trans.setSocket(socket);
trans.init(); trans.init();
trans.writeInt(Constants.TCP_DRIVER_VERSION); trans.writeInt(clientVersion);
trans.writeString(db); trans.writeString(db);
trans.writeString(ci.getOriginalURL()); trans.writeString(ci.getOriginalURL());
trans.writeString(ci.getUserName()); trans.writeString(ci.getUserName());
...@@ -228,6 +233,28 @@ public class SessionRemote implements SessionInterface, DataHandler { ...@@ -228,6 +233,28 @@ public class SessionRemote implements SessionInterface, DataHandler {
traceSystem.close(); traceSystem.close();
throw e; throw e;
} }
upgradeClientVersionIfPossible();
}
private void upgradeClientVersionIfPossible() {
try {
// TODO check if a newer client version can be used - not required when sending TCP_DRIVER_VERSION_6
CommandInterface command = prepareCommand("SELECT VALUE FROM INFORMATION_SCHEMA.SETTINGS WHERE NAME=?", 1);
ParameterInterface param = (ParameterInterface) command.getParameters().get(0);
param.setValue(ValueString.get("info.BUILD_ID"));
ResultInterface result = command.executeQuery(1, false);
if (result.next()) {
Value[] v = result.currentRow();
String version = v[0].getString();
if (version.compareTo("71") > 0) {
clientVersion = Constants.TCP_DRIVER_VERSION_6;
}
}
result.close();
} catch (Exception e) {
trace.error("Error trying to upgrade client version", e);
// ignore
}
} }
private void switchOffCluster() throws SQLException { private void switchOffCluster() throws SQLException {
...@@ -439,4 +466,8 @@ public class SessionRemote implements SessionInterface, DataHandler { ...@@ -439,4 +466,8 @@ public class SessionRemote implements SessionInterface, DataHandler {
return null; return null;
} }
public int getClientVersion() {
return clientVersion;
}
} }
...@@ -11,6 +11,7 @@ import java.sql.SQLException; ...@@ -11,6 +11,7 @@ import java.sql.SQLException;
import org.h2.constant.ErrorCode; import org.h2.constant.ErrorCode;
import org.h2.engine.Session; import org.h2.engine.Session;
import org.h2.message.Message; import org.h2.message.Message;
import org.h2.table.Column;
import org.h2.table.ColumnResolver; import org.h2.table.ColumnResolver;
import org.h2.table.TableFilter; import org.h2.table.TableFilter;
import org.h2.value.Value; import org.h2.value.Value;
...@@ -23,6 +24,7 @@ import org.h2.value.ValueNull; ...@@ -23,6 +24,7 @@ import org.h2.value.ValueNull;
public class Parameter extends Expression implements ParameterInterface { public class Parameter extends Expression implements ParameterInterface {
private Value value; private Value value;
private Column column;
private int index; private int index;
public Parameter(int index) { public Parameter(int index) {
...@@ -51,7 +53,13 @@ public class Parameter extends Expression implements ParameterInterface { ...@@ -51,7 +53,13 @@ public class Parameter extends Expression implements ParameterInterface {
} }
public int getType() { public int getType() {
return value == null ? Value.UNKNOWN : value.getType(); if (value != null) {
return value.getType();
}
if (column != null) {
return column.getType();
}
return Value.UNKNOWN;
} }
public void mapColumns(ColumnResolver resolver, int level) { public void mapColumns(ColumnResolver resolver, int level) {
...@@ -81,15 +89,33 @@ public class Parameter extends Expression implements ParameterInterface { ...@@ -81,15 +89,33 @@ public class Parameter extends Expression implements ParameterInterface {
} }
public int getScale() { public int getScale() {
return value == null ? 0 : value.getScale(); if (value != null) {
return value.getScale();
}
if (column != null) {
return column.getScale();
}
return 0;
} }
public long getPrecision() { public long getPrecision() {
return value == null ? 0 : value.getPrecision(); if (value != null) {
return value.getPrecision();
}
if (column != null) {
return column.getPrecision();
}
return 0;
} }
public int getDisplaySize() { public int getDisplaySize() {
return value == null ? 0 : value.getDisplaySize(); if (value != null) {
return value.getDisplaySize();
}
if (column != null) {
return column.getDisplaySize();
}
return 0;
} }
public void updateAggregate(Session session) { public void updateAggregate(Session session) {
...@@ -128,4 +154,8 @@ public class Parameter extends Expression implements ParameterInterface { ...@@ -128,4 +154,8 @@ public class Parameter extends Expression implements ParameterInterface {
return new Comparison(session, Comparison.EQUAL, this, ValueExpression.get(ValueBoolean.get(false))); return new Comparison(session, Comparison.EQUAL, this, ValueExpression.get(ValueBoolean.get(false)));
} }
public void setColumn(Column column) {
this.column = column;
}
} }
...@@ -35,4 +35,34 @@ public interface ParameterInterface { ...@@ -35,4 +35,34 @@ public interface ParameterInterface {
* @throws SQLException if not set. * @throws SQLException if not set.
*/ */
void checkSet() throws SQLException; void checkSet() throws SQLException;
/**
* Get the expected data type of the parameter if no value is set, or the
* data type of the value if one is set.
*
* @return the data type
*/
int getType();
/**
* Get the expected precision of this parameter.
*
* @return the expected precision
*/
long getPrecision();
/**
* Get the expected scale of this parameter.
*
* @return the expected scale
*/
int getScale();
/**
* Check if this column is nullable.
*
* @return Column.NULLABLE_*
*/
int getNullable();
} }
...@@ -6,10 +6,13 @@ ...@@ -6,10 +6,13 @@
*/ */
package org.h2.expression; package org.h2.expression;
import java.io.IOException;
import java.sql.ResultSetMetaData;
import java.sql.SQLException; import java.sql.SQLException;
import org.h2.constant.ErrorCode; import org.h2.constant.ErrorCode;
import org.h2.message.Message; import org.h2.message.Message;
import org.h2.value.Transfer;
import org.h2.value.Value; import org.h2.value.Value;
/** /**
...@@ -19,6 +22,10 @@ public class ParameterRemote implements ParameterInterface { ...@@ -19,6 +22,10 @@ public class ParameterRemote implements ParameterInterface {
private Value value; private Value value;
private int index; private int index;
private int dataType = Value.UNKNOWN;
private long precision;
private int scale;
private int nullable = ResultSetMetaData.columnNullableUnknown;
public ParameterRemote(int index) { public ParameterRemote(int index) {
this.index = index; this.index = index;
...@@ -38,4 +45,35 @@ public class ParameterRemote implements ParameterInterface { ...@@ -38,4 +45,35 @@ public class ParameterRemote implements ParameterInterface {
} }
} }
public int getType() {
return value == null ? dataType : value.getType();
}
public long getPrecision() {
return value == null ? precision : value.getPrecision();
}
public int getScale() {
return value == null ? scale : value.getScale();
}
public int getNullable() {
return nullable;
}
public void read(Transfer transfer) throws IOException {
dataType = transfer.readInt();
precision = transfer.readLong();
scale = transfer.readInt();
nullable = transfer.readInt();
}
public static void write(Transfer transfer, ParameterInterface p) throws IOException {
transfer.writeInt(p.getType());
transfer.writeLong(p.getPrecision());
transfer.writeInt(p.getScale());
transfer.writeInt(p.getNullable());
}
} }
...@@ -2039,11 +2039,11 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -2039,11 +2039,11 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
/** /**
* Returns whether own updates are visible. * Returns whether own updates are visible.
* *
* @return false * @return true
*/ */
public boolean ownUpdatesAreVisible(int type) { public boolean ownUpdatesAreVisible(int type) {
debugCodeCall("ownUpdatesAreVisible", type); debugCodeCall("ownUpdatesAreVisible", type);
return false; return true;
} }
/** /**
......
...@@ -7,14 +7,17 @@ ...@@ -7,14 +7,17 @@
package org.h2.jdbc; package org.h2.jdbc;
import java.sql.ParameterMetaData; import java.sql.ParameterMetaData;
import java.sql.ResultSetMetaData;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.Types;
import org.h2.command.CommandInterface; import org.h2.command.CommandInterface;
import org.h2.engine.SessionInterface; import org.h2.engine.SessionInterface;
import org.h2.expression.ParameterInterface;
import org.h2.message.Message; import org.h2.message.Message;
import org.h2.message.TraceObject; import org.h2.message.TraceObject;
import org.h2.util.MathUtils;
import org.h2.util.ObjectArray;
import org.h2.value.DataType;
import org.h2.value.Value;
/** /**
* Information about the parameters of a prepared statement. * Information about the parameters of a prepared statement.
...@@ -27,6 +30,7 @@ implements ParameterMetaData ...@@ -27,6 +30,7 @@ implements ParameterMetaData
private JdbcPreparedStatement prep; private JdbcPreparedStatement prep;
private int paramCount; private int paramCount;
private ObjectArray parameters;
/** /**
* Returns the number of parameters. * Returns the number of parameters.
...@@ -45,15 +49,16 @@ implements ParameterMetaData ...@@ -45,15 +49,16 @@ implements ParameterMetaData
/** /**
* Returns the parameter mode. * Returns the parameter mode.
* Always returns parameterModeIn * Always returns parameterModeIn.
* *
* @param param the column index (1,2,...)
* @return parameterModeIn * @return parameterModeIn
*/ */
//## Java 1.4 begin ## //## Java 1.4 begin ##
public int getParameterMode(int param) throws SQLException { public int getParameterMode(int param) throws SQLException {
try { try {
debugCodeCall("getParameterMode", param); debugCodeCall("getParameterMode", param);
checkParameterIndex(param); getParameter(param);
return parameterModeIn; return parameterModeIn;
} catch (Throwable e) { } catch (Throwable e) {
throw logAndConvert(e); throw logAndConvert(e);
...@@ -63,15 +68,20 @@ implements ParameterMetaData ...@@ -63,15 +68,20 @@ implements ParameterMetaData
/** /**
* Returns the parameter type. * Returns the parameter type.
* Always returns Types.VARCHAR as everything can be passed as a VARCHAR. * java.sql.Types.VARCHAR is returned if the data type is not known.
* *
* @return Types.VARCHAR * @param param the column index (1,2,...)
* @return the data type
*/ */
public int getParameterType(int param) throws SQLException { public int getParameterType(int param) throws SQLException {
try { try {
debugCodeCall("getParameterType", param); debugCodeCall("getParameterType", param);
checkParameterIndex(param); ParameterInterface p = getParameter(param);
return Types.VARCHAR; int type = p.getType();
if (type == Value.UNKNOWN) {
type = Value.STRING;
}
return DataType.getDataType(type).sqlType;
} catch (Throwable e) { } catch (Throwable e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
...@@ -79,31 +89,33 @@ implements ParameterMetaData ...@@ -79,31 +89,33 @@ implements ParameterMetaData
/** /**
* Returns the parameter precision. * Returns the parameter precision.
* Always returns 0. * 0 is returned if the precision is not known.
* *
* @return 0 * @param param the column index (1,2,...)
* @return the precision
*/ */
public int getPrecision(int param) throws SQLException { public int getPrecision(int param) throws SQLException {
try { try {
debugCodeCall("getPrecision", param); debugCodeCall("getPrecision", param);
checkParameterIndex(param); ParameterInterface p = getParameter(param);
return 0; return MathUtils.convertLongToInt(p.getPrecision());
} catch (Throwable e) { } catch (Throwable e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
/** /**
* Returns the parameter precision. * Returns the parameter scale.
* Always returns 0. * 0 is returned if the scale is not known.
* *
* @return 0 * @param param the column index (1,2,...)
* @return the scale
*/ */
public int getScale(int param) throws SQLException { public int getScale(int param) throws SQLException {
try { try {
debugCodeCall("getScale", param); debugCodeCall("getScale", param);
checkParameterIndex(param); ParameterInterface p = getParameter(param);
return 0; return p.getScale();
} catch (Throwable e) { } catch (Throwable e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
...@@ -113,13 +125,13 @@ implements ParameterMetaData ...@@ -113,13 +125,13 @@ implements ParameterMetaData
* Checks if this is nullable parameter. * Checks if this is nullable parameter.
* Returns ResultSetMetaData.columnNullableUnknown.. * Returns ResultSetMetaData.columnNullableUnknown..
* *
* @param param the column index (1,2,...)
* @return ResultSetMetaData.columnNullableUnknown * @return ResultSetMetaData.columnNullableUnknown
*/ */
public int isNullable(int param) throws SQLException { public int isNullable(int param) throws SQLException {
try { try {
debugCodeCall("isNullable", param); debugCodeCall("isNullable", param);
checkParameterIndex(param); return getParameter(param).getNullable();
return ResultSetMetaData.columnNullableUnknown;
} catch (Throwable e) { } catch (Throwable e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
...@@ -129,12 +141,13 @@ implements ParameterMetaData ...@@ -129,12 +141,13 @@ implements ParameterMetaData
* Checks if this parameter is signed. * Checks if this parameter is signed.
* It always returns true. * It always returns true.
* *
* @param param the column index (1,2,...)
* @return true * @return true
*/ */
public boolean isSigned(int param) throws SQLException { public boolean isSigned(int param) throws SQLException {
try { try {
debugCodeCall("isSigned", param); debugCodeCall("isSigned", param);
checkParameterIndex(param); getParameter(param);
return true; return true;
} catch (Throwable e) { } catch (Throwable e) {
throw logAndConvert(e); throw logAndConvert(e);
...@@ -142,16 +155,21 @@ implements ParameterMetaData ...@@ -142,16 +155,21 @@ implements ParameterMetaData
} }
/** /**
* Returns the parameter class name. * Returns the Java class name of the parameter.
* Always returns java.lang.String. * "java.lang.String" is returned if the type is not known.
* *
* @return "java.lang.String" * @param param the column index (1,2,...)
* @return the Java class name
*/ */
public String getParameterClassName(int param) throws SQLException { public String getParameterClassName(int param) throws SQLException {
try { try {
debugCodeCall("getParameterClassName", param); debugCodeCall("getParameterClassName", param);
checkParameterIndex(param); ParameterInterface p = getParameter(param);
return String.class.getName(); int type = p.getType();
if (type == Value.UNKNOWN) {
type = Value.STRING;
}
return DataType.getTypeClassName(type);
} catch (Throwable e) { } catch (Throwable e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
...@@ -159,15 +177,20 @@ implements ParameterMetaData ...@@ -159,15 +177,20 @@ implements ParameterMetaData
/** /**
* Returns the parameter type name. * Returns the parameter type name.
* Always returns VARCHAR. * "VARCHAR" is returned if the type is not known.
* *
* @return "VARCHAR" * @param param the column index (1,2,...)
* @return the type name
*/ */
public String getParameterTypeName(int param) throws SQLException { public String getParameterTypeName(int param) throws SQLException {
try { try {
debugCodeCall("getParameterTypeName", param); debugCodeCall("getParameterTypeName", param);
checkParameterIndex(param); ParameterInterface p = getParameter(param);
return "VARCHAR"; int type = p.getType();
if (type == Value.UNKNOWN) {
type = Value.STRING;
}
return DataType.getDataType(type).name;
} catch (Throwable e) { } catch (Throwable e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
...@@ -176,17 +199,19 @@ implements ParameterMetaData ...@@ -176,17 +199,19 @@ implements ParameterMetaData
JdbcParameterMetaData(SessionInterface session, JdbcPreparedStatement prep, CommandInterface command, int id) { JdbcParameterMetaData(SessionInterface session, JdbcPreparedStatement prep, CommandInterface command, int id) {
setTrace(session.getTrace(), TraceObject.PARAMETER_META_DATA, id); setTrace(session.getTrace(), TraceObject.PARAMETER_META_DATA, id);
this.prep = prep; this.prep = prep;
this.paramCount = command.getParameters().size(); this.parameters = command.getParameters();
this.paramCount = parameters.size();
} }
void checkParameterIndex(int param) throws SQLException { private ParameterInterface getParameter(int param) throws SQLException {
checkClosed(); checkClosed();
if (param < 1 || param > paramCount) { if (param < 1 || param > paramCount) {
throw Message.getInvalidValueException("" + param, "param"); throw Message.getInvalidValueException("" + param, "param");
} }
return (ParameterInterface) parameters.get(param - 1);
} }
void checkClosed() throws SQLException { private void checkClosed() throws SQLException {
prep.checkClosed(); prep.checkClosed();
} }
......
...@@ -2818,7 +2818,9 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2818,7 +2818,9 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
} }
checkOnValidRow(); checkOnValidRow();
if (updateRow != null) { if (updateRow != null) {
getUpdatableRow().updateRow(result.currentRow(), updateRow); UpdatableRow row = getUpdatableRow();
row.updateRow(result.currentRow(), updateRow);
row.refreshRow(result.currentRow());
updateRow = null; updateRow = null;
} }
} catch (Throwable e) { } catch (Throwable e) {
......
...@@ -14,6 +14,7 @@ import org.h2.api.DatabaseEventListener; ...@@ -14,6 +14,7 @@ import org.h2.api.DatabaseEventListener;
import org.h2.engine.Constants; import org.h2.engine.Constants;
import org.h2.engine.Database; import org.h2.engine.Database;
import org.h2.engine.Session; import org.h2.engine.Session;
import org.h2.message.Message;
import org.h2.message.Trace; import org.h2.message.Trace;
import org.h2.store.DataPage; import org.h2.store.DataPage;
import org.h2.store.DiskFile; import org.h2.store.DiskFile;
...@@ -156,6 +157,9 @@ public class LogSystem { ...@@ -156,6 +157,9 @@ public class LogSystem {
} }
} catch (SQLException e) { } catch (SQLException e) {
closeException = e; closeException = e;
} catch (Throwable e) {
// for example out of memory exception
closeException = Message.convert(e);
} }
for (int i = 0; i < activeLogs.size(); i++) { for (int i = 0; i < activeLogs.size(); i++) {
LogFile l = (LogFile) activeLogs.get(i); LogFile l = (LogFile) activeLogs.get(i);
......
...@@ -21,6 +21,7 @@ import org.h2.engine.Engine; ...@@ -21,6 +21,7 @@ import org.h2.engine.Engine;
import org.h2.engine.Session; import org.h2.engine.Session;
import org.h2.engine.SessionRemote; import org.h2.engine.SessionRemote;
import org.h2.expression.Parameter; import org.h2.expression.Parameter;
import org.h2.expression.ParameterRemote;
import org.h2.jdbc.JdbcSQLException; import org.h2.jdbc.JdbcSQLException;
import org.h2.message.Message; import org.h2.message.Message;
import org.h2.result.LocalResult; import org.h2.result.LocalResult;
...@@ -42,6 +43,7 @@ public class TcpServerThread implements Runnable { ...@@ -42,6 +43,7 @@ public class TcpServerThread implements Runnable {
private Command commit; private Command commit;
private SmallMap cache = new SmallMap(SysProperties.SERVER_CACHED_OBJECTS); private SmallMap cache = new SmallMap(SysProperties.SERVER_CACHED_OBJECTS);
private int id; private int id;
private int clientVersion;
public TcpServerThread(Socket socket, TcpServer server, int id) { public TcpServerThread(Socket socket, TcpServer server, int id) {
this.server = server; this.server = server;
...@@ -61,13 +63,16 @@ public class TcpServerThread implements Runnable { ...@@ -61,13 +63,16 @@ public class TcpServerThread implements Runnable {
// TODO server: should support a list of allowed databases and a // TODO server: should support a list of allowed databases and a
// list of allowed clients // list of allowed clients
try { try {
int version = transfer.readInt(); clientVersion = transfer.readInt();
if (!server.allow(transfer.getSocket())) { if (!server.allow(transfer.getSocket())) {
throw Message.getSQLException(ErrorCode.REMOTE_CONNECTION_NOT_ALLOWED); throw Message.getSQLException(ErrorCode.REMOTE_CONNECTION_NOT_ALLOWED);
} }
if (version != Constants.TCP_DRIVER_VERSION) { if (clientVersion == Constants.TCP_DRIVER_VERSION_6) {
throw Message.getSQLException(ErrorCode.DRIVER_VERSION_ERROR_2, new String[] { "" + version, // version 6 and newer: read max version (currently not used)
"" + Constants.TCP_DRIVER_VERSION }); transfer.readInt();
} else if (clientVersion != Constants.TCP_DRIVER_VERSION_5) {
throw Message.getSQLException(ErrorCode.DRIVER_VERSION_ERROR_2, new String[] { "" + clientVersion,
"" + Constants.TCP_DRIVER_VERSION_5 });
} }
String db = transfer.readString(); String db = transfer.readString();
String originalURL = transfer.readString(); String originalURL = transfer.readString();
...@@ -93,7 +98,12 @@ public class TcpServerThread implements Runnable { ...@@ -93,7 +98,12 @@ public class TcpServerThread implements Runnable {
Engine engine = Engine.getInstance(); Engine engine = Engine.getInstance();
session = engine.getSession(ci); session = engine.getSession(ci);
transfer.setSession(session); transfer.setSession(session);
transfer.writeInt(SessionRemote.STATUS_OK).flush(); transfer.writeInt(SessionRemote.STATUS_OK);
if (clientVersion >= Constants.TCP_DRIVER_VERSION_6) {
// version 6: reply what version to use
transfer.writeInt(Constants.TCP_DRIVER_VERSION_6);
}
transfer.flush();
server.addConnection(id, originalURL, ci.getUserName()); server.addConnection(id, originalURL, ci.getUserName());
trace("Connected"); trace("Connected");
} catch (Throwable e) { } catch (Throwable e) {
...@@ -179,6 +189,7 @@ public class TcpServerThread implements Runnable { ...@@ -179,6 +189,7 @@ public class TcpServerThread implements Runnable {
private void process() throws IOException, SQLException { private void process() throws IOException, SQLException {
int operation = transfer.readInt(); int operation = transfer.readInt();
switch (operation) { switch (operation) {
case SessionRemote.SESSION_PREPARE_READ_PARAMS:
case SessionRemote.SESSION_PREPARE: { case SessionRemote.SESSION_PREPARE: {
int id = transfer.readInt(); int id = transfer.readInt();
String sql = transfer.readString(); String sql = transfer.readString();
...@@ -186,9 +197,17 @@ public class TcpServerThread implements Runnable { ...@@ -186,9 +197,17 @@ public class TcpServerThread implements Runnable {
boolean readonly = command.isReadOnly(); boolean readonly = command.isReadOnly();
cache.addObject(id, command); cache.addObject(id, command);
boolean isQuery = command.isQuery(); boolean isQuery = command.isQuery();
int paramCount = command.getParameters().size(); ObjectArray params = command.getParameters();
int paramCount = params.size();
transfer.writeInt(SessionRemote.STATUS_OK).writeBoolean(isQuery).writeBoolean(readonly) transfer.writeInt(SessionRemote.STATUS_OK).writeBoolean(isQuery).writeBoolean(readonly)
.writeInt(paramCount).flush(); .writeInt(paramCount);
if (operation == SessionRemote.SESSION_PREPARE_READ_PARAMS) {
for (int i = 0; i < paramCount; i++) {
Parameter p = (Parameter) params.get(i);
ParameterRemote.write(transfer, p);
}
}
transfer.flush();
break; break;
} }
case SessionRemote.SESSION_CLOSE: { case SessionRemote.SESSION_CLOSE: {
......
...@@ -649,7 +649,7 @@ public class Recover extends Tool implements DataHandler { ...@@ -649,7 +649,7 @@ public class Recover extends Tool implements DataHandler {
writeDataError(writer, "blockCount<0", s.getBytes(), 1); writeDataError(writer, "blockCount<0", s.getBytes(), 1);
blockCount = 1; blockCount = 1;
continue; continue;
} else if ((blockCount * blockSize) >= Integer.MAX_VALUE / 4) { } else if (((long) blockCount * blockSize) >= Integer.MAX_VALUE / 4) {
writeDataError(writer, "blockCount=" + blockCount, s.getBytes(), 1); writeDataError(writer, "blockCount=" + blockCount, s.getBytes(), 1);
blockCount = 1; blockCount = 1;
continue; continue;
...@@ -688,6 +688,7 @@ public class Recover extends Tool implements DataHandler { ...@@ -688,6 +688,7 @@ public class Recover extends Tool implements DataHandler {
writer.close(); writer.close();
} catch (Throwable e) { } catch (Throwable e) {
writeError(writer, e); writeError(writer, e);
e.printStackTrace();
} finally { } finally {
IOUtils.closeSilently(writer); IOUtils.closeSilently(writer);
closeSilently(store); closeSilently(store);
...@@ -744,7 +745,7 @@ public class Recover extends Tool implements DataHandler { ...@@ -744,7 +745,7 @@ public class Recover extends Tool implements DataHandler {
writeDataError(writer, "blockCount<0", s.getBytes(), 1); writeDataError(writer, "blockCount<0", s.getBytes(), 1);
blockCount = 1; blockCount = 1;
continue; continue;
} else if ((blockCount * blockSize) >= Integer.MAX_VALUE / 4 || (blockCount * blockSize) < 0) { } else if (((long) blockCount * blockSize) >= Integer.MAX_VALUE / 4 || (blockCount * blockSize) < 0) {
writeDataError(writer, "blockCount=" + blockCount, s.getBytes(), 1); writeDataError(writer, "blockCount=" + blockCount, s.getBytes(), 1);
blockCount = 1; blockCount = 1;
continue; continue;
......
...@@ -154,20 +154,33 @@ public class Shell { ...@@ -154,20 +154,33 @@ public class Shell {
} else if (upper.startsWith("DESCRIBE")) { } else if (upper.startsWith("DESCRIBE")) {
String tableName = upper.substring("DESCRIBE".length()).trim(); String tableName = upper.substring("DESCRIBE".length()).trim();
if (tableName.length() == 0) { if (tableName.length() == 0) {
out.println("Usage: describe <table name>"); out.println("Usage: describe [<schema name>.]<table name>");
} else { } else {
String schemaName = null;
int dot = tableName.indexOf('.');
if (dot >= 0) {
schemaName = tableName.substring(0, dot);
tableName = tableName.substring(dot + 1);
}
PreparedStatement prep = null; PreparedStatement prep = null;
ResultSet rs = null; ResultSet rs = null;
try { try {
prep = conn.prepareStatement( String sql = "SELECT CAST(COLUMN_NAME AS VARCHAR(32)) \"Column Name\", " +
"SELECT CAST(COLUMN_NAME AS VARCHAR(32)) \"Column Name\", " +
"CAST(TYPE_NAME AS VARCHAR(14)) \"Type\", " + "CAST(TYPE_NAME AS VARCHAR(14)) \"Type\", " +
"NUMERIC_PRECISION \"Precision\", " + "NUMERIC_PRECISION \"Precision\", " +
"CAST(IS_NULLABLE AS VARCHAR(8)) \"Nullable\", " + "CAST(IS_NULLABLE AS VARCHAR(8)) \"Nullable\", " +
"CAST(COLUMN_DEFAULT AS VARCHAR(20)) \"Default\" " + "CAST(COLUMN_DEFAULT AS VARCHAR(20)) \"Default\" " +
"FROM INFORMATION_SCHEMA.COLUMNS " + "FROM INFORMATION_SCHEMA.COLUMNS " +
"WHERE UPPER(TABLE_NAME)=? ORDER BY ORDINAL_POSITION"); "WHERE UPPER(TABLE_NAME)=?";
if (schemaName != null) {
sql += " AND UPPER(TABLE_SCHEMA)=?";
}
sql += " ORDER BY ORDINAL_POSITION";
prep = conn.prepareStatement(sql);
prep.setString(1, tableName.toUpperCase()); prep.setString(1, tableName.toUpperCase());
if (schemaName != null) {
prep.setString(2, schemaName.toUpperCase());
}
rs = prep.executeQuery(); rs = prep.executeQuery();
printResult(rs, false); printResult(rs, false);
} catch (SQLException e) { } catch (SQLException e) {
......
...@@ -140,6 +140,7 @@ public class CompareMode { ...@@ -140,6 +140,7 @@ public class CompareMode {
result = Collator.getInstance(locale); result = Collator.getInstance(locale);
} }
} else if (name.length() == 5) { } else if (name.length() == 5) {
// LL_CC (language_country)
int idx = name.indexOf('_'); int idx = name.indexOf('_');
if (idx >= 0) { if (idx >= 0) {
String language = name.substring(0, idx).toLowerCase(); String language = name.substring(0, idx).toLowerCase();
......
...@@ -160,10 +160,16 @@ java org.h2.test.TestAll timer ...@@ -160,10 +160,16 @@ java org.h2.test.TestAll timer
/* /*
upload jazoon
deactivate triggers during alter table (during re-creating a table) deactivate triggers during alter table (during re-creating a table)
improve javadocs
Pluggable tracing system
test japanese translation
upload jazoon
test case for out of memory (try to corrupt the database using out of memory) test case for out of memory (try to corrupt the database using out of memory)
analyzer configuration option for the fulltext search analyzer configuration option for the fulltext search
...@@ -211,6 +217,16 @@ Add where required // TODO: change in version 1.1 ...@@ -211,6 +217,16 @@ Add where required // TODO: change in version 1.1
http://www.w3schools.com/sql/ http://www.w3schools.com/sql/
History: History:
Some databases could not be opened when appending
;RECOVER=1 to the database URL.
The Japanese translation of the error messages and the H2 Console has been completed
by Masahiro Ikemoto (Arizona Design Inc.)
Updates made to updatable rows are now visible within the same result set.
DatabaseMetaData.ownUpdatesAreVisible now returns true.
ParameterMetaData now returns the correct data
for INSERT and UPDATE statements.
H2 Shell: DESCRIBE now supports an schema name.
Roadmap: Roadmap:
...@@ -417,48 +433,48 @@ Roadmap: ...@@ -417,48 +433,48 @@ Roadmap:
beforeTest(); beforeTest();
// db // db
new TestScriptSimple().runTest(this); // new TestScriptSimple().runTest(this);
new TestScript().runTest(this); // new TestScript().runTest(this);
new TestAutoRecompile().runTest(this); // new TestAutoRecompile().runTest(this);
new TestBackup().runTest(this); // new TestBackup().runTest(this);
new TestBigDb().runTest(this); // new TestBigDb().runTest(this);
new TestBigResult().runTest(this); // new TestBigResult().runTest(this);
new TestCases().runTest(this); // new TestCases().runTest(this);
new TestCheckpoint().runTest(this); // new TestCheckpoint().runTest(this);
new TestCluster().runTest(this); // new TestCluster().runTest(this);
new TestCompatibility().runTest(this); // new TestCompatibility().runTest(this);
new TestCsv().runTest(this); // new TestCsv().runTest(this);
new TestEncryptedDb().runTest(this); // new TestEncryptedDb().runTest(this);
new TestExclusive().runTest(this); // new TestExclusive().runTest(this);
new TestFullText().runTest(this); // new TestFullText().runTest(this);
new TestFunctions().runTest(this); // new TestFunctions().runTest(this);
new TestIndex().runTest(this); // new TestIndex().runTest(this);
new TestLinkedTable().runTest(this); // new TestLinkedTable().runTest(this);
new TestListener().runTest(this); // new TestListener().runTest(this);
new TestLob().runTest(this); // new TestLob().runTest(this);
new TestLogFile().runTest(this); // new TestLogFile().runTest(this);
new TestMemoryUsage().runTest(this); // new TestMemoryUsage().runTest(this);
new TestMultiConn().runTest(this); // new TestMultiConn().runTest(this);
new TestMultiDimension().runTest(this); // new TestMultiDimension().runTest(this);
new TestMultiThread().runTest(this); // new TestMultiThread().runTest(this);
new TestOpenClose().runTest(this); // new TestOpenClose().runTest(this);
new TestOptimizations().runTest(this); // new TestOptimizations().runTest(this);
new TestPowerOff().runTest(this); // new TestPowerOff().runTest(this);
new TestReadOnly().runTest(this); // new TestReadOnly().runTest(this);
new TestRights().runTest(this); // new TestRights().runTest(this);
new TestRunscript().runTest(this); // new TestRunscript().runTest(this);
new TestSQLInjection().runTest(this); // new TestSQLInjection().runTest(this);
new TestSessionsLocks().runTest(this); // new TestSessionsLocks().runTest(this);
new TestSequence().runTest(this); // new TestSequence().runTest(this);
new TestSpaceReuse().runTest(this); // new TestSpaceReuse().runTest(this);
new TestSpeed().runTest(this); // new TestSpeed().runTest(this);
new TestTempTables().runTest(this); // new TestTempTables().runTest(this);
new TestTransaction().runTest(this); // new TestTransaction().runTest(this);
new TestTriggersConstraints().runTest(this); // new TestTriggersConstraints().runTest(this);
new TestTwoPhaseCommit().runTest(this); // new TestTwoPhaseCommit().runTest(this);
new TestView().runTest(this); // new TestView().runTest(this);
//
// jdbc // // jdbc
new TestBatchUpdates().runTest(this); new TestBatchUpdates().runTest(this);
new TestCallableStatement().runTest(this); new TestCallableStatement().runTest(this);
new TestCancel().runTest(this); new TestCancel().runTest(this);
...@@ -473,57 +489,57 @@ Roadmap: ...@@ -473,57 +489,57 @@ Roadmap:
new TestUpdatableResultSet().runTest(this); new TestUpdatableResultSet().runTest(this);
new TestZloty().runTest(this); new TestZloty().runTest(this);
// jdbcx // // jdbcx
new TestConnectionPool().runTest(this); // new TestConnectionPool().runTest(this);
new TestDataSource().runTest(this); // new TestDataSource().runTest(this);
new TestXA().runTest(this); // new TestXA().runTest(this);
new TestXASimple().runTest(this); // new TestXASimple().runTest(this);
//
// server // // server
new TestNestedLoop().runTest(this); // new TestNestedLoop().runTest(this);
new TestWeb().runTest(this); // new TestWeb().runTest(this);
new TestPgServer().runTest(this); // new TestPgServer().runTest(this);
//
// mvcc // // mvcc
new TestMvcc1().runTest(this); // new TestMvcc1().runTest(this);
new TestMvcc2().runTest(this); // new TestMvcc2().runTest(this);
new TestMvcc3().runTest(this); // new TestMvcc3().runTest(this);
//
// synth // // synth
new TestCrashAPI().runTest(this); // new TestCrashAPI().runTest(this);
new TestRandomSQL().runTest(this); // new TestRandomSQL().runTest(this);
new TestKillRestart().runTest(this); // new TestKillRestart().runTest(this);
new TestKillRestartMulti().runTest(this); // new TestKillRestartMulti().runTest(this);
//
// unit // // unit
new TestBitField().runTest(this); // new TestBitField().runTest(this);
new TestCache().runTest(this); // new TestCache().runTest(this);
new TestCompress().runTest(this); // new TestCompress().runTest(this);
new TestDataPage().runTest(this); // new TestDataPage().runTest(this);
new TestDate().runTest(this); // new TestDate().runTest(this);
new TestExit().runTest(this); // new TestExit().runTest(this);
new TestFile().runTest(this); // new TestFile().runTest(this);
new TestFileLock().runTest(this); // new TestFileLock().runTest(this);
new TestFtp().runTest(this); // new TestFtp().runTest(this);
new TestFileSystem().runTest(this); // new TestFileSystem().runTest(this);
new TestIntArray().runTest(this); // new TestIntArray().runTest(this);
new TestIntIntHashMap().runTest(this); // new TestIntIntHashMap().runTest(this);
new TestMultiThreadedKernel().runTest(this); // new TestMultiThreadedKernel().runTest(this);
new TestOverflow().runTest(this); // new TestOverflow().runTest(this);
new TestPattern().runTest(this); // new TestPattern().runTest(this);
new TestReader().runTest(this); // new TestReader().runTest(this);
new TestRecovery().runTest(this); // new TestRecovery().runTest(this);
new TestSampleApps().runTest(this); // new TestSampleApps().runTest(this);
new TestScriptReader().runTest(this); // new TestScriptReader().runTest(this);
runTest("org.h2.test.unit.TestServlet"); // runTest("org.h2.test.unit.TestServlet");
new TestSecurity().runTest(this); // new TestSecurity().runTest(this);
new TestStreams().runTest(this); // new TestStreams().runTest(this);
new TestStringCache().runTest(this); // new TestStringCache().runTest(this);
new TestStringUtils().runTest(this); // new TestStringUtils().runTest(this);
new TestTools().runTest(this); // new TestTools().runTest(this);
new TestValue().runTest(this); // new TestValue().runTest(this);
new TestValueHashMap().runTest(this); // new TestValueHashMap().runTest(this);
new TestValueMemory().runTest(this); // new TestValueMemory().runTest(this);
afterTest(); afterTest();
} }
......
...@@ -414,9 +414,9 @@ public class TestMetaData extends TestBase { ...@@ -414,9 +414,9 @@ public class TestMetaData extends TestBase {
checkFalse(meta.ownInsertsAreVisible(ResultSet.TYPE_FORWARD_ONLY)); checkFalse(meta.ownInsertsAreVisible(ResultSet.TYPE_FORWARD_ONLY));
checkFalse(meta.ownInsertsAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)); checkFalse(meta.ownInsertsAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE));
checkFalse(meta.ownInsertsAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)); checkFalse(meta.ownInsertsAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE));
checkFalse(meta.ownUpdatesAreVisible(ResultSet.TYPE_FORWARD_ONLY)); check(meta.ownUpdatesAreVisible(ResultSet.TYPE_FORWARD_ONLY));
checkFalse(meta.ownUpdatesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)); check(meta.ownUpdatesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE));
checkFalse(meta.ownUpdatesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)); check(meta.ownUpdatesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE));
checkFalse(meta.storesLowerCaseIdentifiers()); checkFalse(meta.storesLowerCaseIdentifiers());
checkFalse(meta.storesLowerCaseQuotedIdentifiers()); checkFalse(meta.storesLowerCaseQuotedIdentifiers());
checkFalse(meta.storesMixedCaseIdentifiers()); checkFalse(meta.storesMixedCaseIdentifiers());
......
...@@ -361,6 +361,27 @@ public class TestPreparedStatement extends TestBase { ...@@ -361,6 +361,27 @@ public class TestPreparedStatement extends TestBase {
} catch (SQLException e) { } catch (SQLException e) {
checkNotGeneralException(e); checkNotGeneralException(e);
} }
Statement stat = conn.createStatement();
stat.execute("CREATE TABLE TEST3(ID INT, NAME VARCHAR(255), DATA DECIMAL(10,2))");
PreparedStatement prep1 = conn.prepareStatement("UPDATE TEST3 SET ID=?, NAME=?, DATA=?");
PreparedStatement prep2 = conn.prepareStatement("INSERT INTO TEST3 VALUES(?, ?, ?)");
checkParameter(prep1, 1, "java.lang.Integer", 4, "INTEGER", 10, 0);
checkParameter(prep1, 2, "java.lang.String", 12, "VARCHAR", 255, 0);
checkParameter(prep1, 3, "java.math.BigDecimal", 3, "DECIMAL", 10, 2);
checkParameter(prep2, 1, "java.lang.Integer", 4, "INTEGER", 10, 0);
checkParameter(prep2, 2, "java.lang.String", 12, "VARCHAR", 255, 0);
checkParameter(prep2, 3, "java.math.BigDecimal", 3, "DECIMAL", 10, 2);
stat.execute("DROP TABLE TEST3");
}
private void checkParameter(PreparedStatement prep, int index, String className, int type, String typeName, int precision, int scale) throws Exception {
ParameterMetaData meta = prep.getParameterMetaData();
check(className, meta.getParameterClassName(index));
check(type, meta.getParameterType(index));
check(typeName, meta.getParameterTypeName(index));
check(precision, meta.getPrecision(index));
check(scale, meta.getScale(index));
} }
private void testLikeIndex(Connection conn) throws Exception { private void testLikeIndex(Connection conn) throws Exception {
......
...@@ -13,6 +13,7 @@ import java.io.InputStreamReader; ...@@ -13,6 +13,7 @@ import java.io.InputStreamReader;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.sql.Array; import java.sql.Array;
import java.sql.Connection; import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.Date; import java.sql.Date;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
...@@ -40,6 +41,7 @@ public class TestResultSet extends TestBase { ...@@ -40,6 +41,7 @@ public class TestResultSet extends TestBase {
stat = conn.createStatement(); stat = conn.createStatement();
testOwnUpdates();
testFindColumn(); testFindColumn();
testSubstringPrecision(); testSubstringPrecision();
testColumnLength(); testColumnLength();
...@@ -65,6 +67,29 @@ public class TestResultSet extends TestBase { ...@@ -65,6 +67,29 @@ public class TestResultSet extends TestBase {
} }
private void testOwnUpdates() throws Exception {
DatabaseMetaData meta = conn.getMetaData();
for (int i = 0; i < 3; i++) {
int type = i == 0 ? ResultSet.TYPE_FORWARD_ONLY : i == 1 ? ResultSet.TYPE_SCROLL_INSENSITIVE : ResultSet.TYPE_SCROLL_SENSITIVE;
check(meta.ownUpdatesAreVisible(type));
checkFalse(meta.ownDeletesAreVisible(type));
checkFalse(meta.ownInsertsAreVisible(type));
}
Statement stat = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE);
stat.execute("CREATE TABLE TEST(ID INT PRIMARY KEY, NAME VARCHAR(255))");
stat.execute("INSERT INTO TEST VALUES(1, 'Hello')");
stat.execute("INSERT INTO TEST VALUES(2, 'World')");
ResultSet rs;
rs = stat.executeQuery("SELECT ID, NAME FROM TEST ORDER BY ID");
rs.next();
rs.next();
rs.updateString(2, "Hallo");
rs.updateRow();
check("Hallo", rs.getString(2));
stat.execute("DROP TABLE TEST");
}
private void checkPrecision(int expected, String sql) throws Exception { private void checkPrecision(int expected, String sql) throws Exception {
ResultSetMetaData meta = stat.executeQuery(sql).getMetaData(); ResultSetMetaData meta = stat.executeQuery(sql).getMetaData();
check(expected, meta.getPrecision(1)); check(expected, meta.getPrecision(1));
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论