[h2] Re: No SYSTEM TABLE in TABLE_TYPE column returned by DatabaseMetaData.getTables()

2022-06-22 Thread Evgenij Ryazanov
Hello. JDBC doesn't have any actual requirements for returned table types, the provided list is only an example. H2 returns table types as required by the SQL Standard for INFORMATION_SCHEMA.TABLES.TABLE_TYPE column. But each JDBC driver should return its own table types from

[h2] Re: Strange order varchar column

2022-06-18 Thread Evgenij Ryazanov
Hello. The default sort order when database collation wasn't specified or was specified as OFF is LUTZ, JOSEF LUTZ, JOSEF ANTON LUTZ, JOSEFA because this is how java.lang.String.compareTo() works. If database collation was specified, for example, as EN, the sort order is LUTZ, JOSEF LUTZ,

[h2] Re: Cannot drop primary key - primary key belongs to a constraint

2022-05-28 Thread Evgenij Ryazanov
Hello. There is no such table as INFORMATION_SCHEMA.CONSTRAINTS in supported version of H2, unless legacy information schema was enabled explicitly or due to remote connection from an old driver. Only outdated unsupported versions of H2 have such table. They all have various bugs with

[h2] Re: h2 trigger

2022-05-27 Thread Evgenij Ryazanov
Hello! If you use an embedded database and your application doesn't use multiple classloaders, your trigger needs to be located in its classpath. If it uses multiple classloaders, make sure H2 and this trigger are loaded by the same classloader. If your tests are loaded separately and other

[h2] Re: What'd the db_class of com.h2Engine

2022-04-21 Thread Evgenij Ryazanov
Hello! It should be DB_CLASS=org.h2.Driver And I think you shouldn't specify INFORMATION_SCHEMA in DB_SCHEMA parameter, this is a system schema, it isn't suitable to create your own objects in it. -- You received this message because you are subscribed to the Google Groups "H2 Database"

[h2] Re: Terrible synchronized method blocking in application.

2022-04-21 Thread Evgenij Ryazanov
Hello! This method is implemented since H2 1.4.181 Beta released in 2014, only older versions call TraceObject.unsupported() from it. It means that application uses some outdated and unsupported version of H2. -- You received this message because you are subscribed to the Google Groups "H2

[h2] Re: Updating File password

2022-04-18 Thread Evgenij Ryazanov
Hello. java -cp h2-*.jar org.h2.tools.ChangeFileEncryption -dir -db -cipher AES -decrypt -encrypt is the tool you need. Database shouldn't be opened anywhere when this command is launched. -- You received this message because you are subscribed to the Google Groups "H2 Database" group.

[h2] Re: H2 in LibreOffice Base

2022-04-18 Thread Evgenij Ryazanov
Hello! Recent versions of H2 fully support identity columns from the SQL Standard and their retrieving functionality from the JDBC specification. What exactly doesn't work for you? How these columns are defined? How rows are inserted? How exactly LibreOffice tries to read generated values with

[h2] Re: Security Vulnerability

2022-02-16 Thread Evgenij Ryazanov
Hello! 1. H2 is not a secure container, if some application provides direct access to H2 for untrusted users in any way, you should report it to its developers. 2. Users with ADMIN privileges may do anything by design and they have full access to JVM and may interact with the host operating

Re: [h2] Statement.execute throws Syntax error (206/210)

2022-02-02 Thread Evgenij Ryazanov
Hello! INT GENERATED BY DEFAULT AS IDENTITY should be used for identity column of INT (INTEGER) data type. Additional NOT NULL clause isn't needed, but may be specified. H2 intentionally supports this standard-compliant syntax in all compatibility modes to have possibility to use the same

[h2] Re: H2 2.1.210 SQL output of SCRIPT not backward compatible with 1.4.200

2022-01-27 Thread Evgenij Ryazanov
> did the same for the TIMESTAMP prefix You don't need that. H2 1.4.200 is able to read all datetime literals properly. > U&'Co-effici\00ebnt' > which looks like an obscure escape syntax H2 always quotes exported character string literals with non-printable on non-ASCII characters, I don't know

[h2] Re: Using field value as part of expression??

2022-01-22 Thread Evgenij Ryazanov
Hello! Do you want to read a column name from some different column and read the value of a column with that name immediately? It isn't possible. You can only read this name and construct a new query to read the value. If database schema requires such operations, it has serious design flaws

[h2] Re: H2 2.1.210 SQL output of SCRIPT not backward compatible with 1.4.200

2022-01-19 Thread Evgenij Ryazanov
Hello! H2 doesn't support and never supported downgrades. The oldest version that can open database files or SQL scripts from 2.1.210 is H2 2.0.202. You need to edit the exported SQL by yourself. For example, you can use a stream editor: sed "s/UUID '/'/" source.sql > target.sql But due to

[h2] Re: H2 usage in test scope: v2.0.x not compatible to JPA autogenerated database modell

2022-01-16 Thread Evgenij Ryazanov
You can compile H2 from its current sources or wait for release of H2 2.1.210 and try the LEGACY mode again. I added IDENTITY() and SCOPE_IDENTITY() to this mode. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group

[h2] Re: H2 usage in test scope: v2.0.x not compatible to JPA autogenerated database modell

2022-01-16 Thread Evgenij Ryazanov
You cannot use dialects from Hibernate ORM with EclipseLink. EclipseLink has own H2Platform and perhaps its supportsIdentity() method should return false until these issues will be fixed in a some proper way: https://bugs.eclipse.org/bugs/show_bug.cgi?id=578086

[h2] Re: H2 usage in test scope: v2.0.x not compatible to JPA autogenerated database modell

2022-01-16 Thread Evgenij Ryazanov
Hello! What implementation of JPA do you use? Hibernate ORM 5.x doesn't support H2 2.0. Hibernate ORM 6.0 is under development, it already has some fixes and others are on the way. There are two possible temporary workarounds: 1. You can add ;MODE=LEGACY to JDBC URL of H2 (you need H2 2.0.204

[h2] Re: LIMIT keyword no longer supported

2022-01-13 Thread Evgenij Ryazanov
Hello! This issue was fixed in sources of Hibernate ORM two years ago, but version 6.0 is still under development. You can execute the following code during initialization of your application: org.h2.engine.Mode mode = org.h2.engine.Mode.getInstance("ORACLE"); mode.limit = true; Please note

[h2] Re: Create alias if not exists threw exception

2022-01-13 Thread Evgenij Ryazanov
Hello! You can append ;BUILTIN_ALIAS_OVERRIDE=TRUE to JDBC connection URL. But actually you shouldn't expect that these compatibility modes are compatible with each other, every command that works in one mode may not work or work in a different way in another. -- You received this message

[h2] Re: Possible mitigation for CVE-2021-42392

2022-01-11 Thread Evgenij Ryazanov
If you have Java triggers or function aliases, database event listeners, table engines or use JAVA_OBJECT data type you need to list your classes in that setting. If you use org.locationtech.jts.geom.Geometry it also needs to be listed. Otherwise, you don't need anything else to be included.

[h2] Re: H2DB upgrade from 1.4.195 to 2.0.206 - Breaks - Version mismatch, driver version is "0" but server version is "16"

2022-01-11 Thread Evgenij Ryazanov
On Tuesday, 11 January 2022 at 20:37:40 UTC+8 Silvio wrote: > Can you elaborate on that? As I described in another recent post we plan > to use at least two H2 versions (1.4.200 for legacy databases and 2.0.20x > for all new ones) from the same application by using 2.0.20x in the > application

[h2] Re: Possible mitigation for CVE-2021-42392

2022-01-11 Thread Evgenij Ryazanov
Hello. You don't need any mitigations if you use H2 correctly. If you use H2 Console, it must be either not available from external network (by default only connections from localhost are accepted), or it must be protected in some other way, a possible way is described in documentation and

[h2] Re: 2.0.202 and hibernate: boolean field regression?

2022-01-10 Thread Evgenij Ryazanov
Hello. This vulnerability affects only the H2 Console and it may harm you only if you run it with -webAllowOthers parameter without additional protection. You shouldn't do that with any version of H2. https://github.com/h2database/h2database/security/advisories/GHSA-h376-j262-vhq6 It doesn't

[h2] Re: Illegal seek

2022-01-10 Thread Evgenij Ryazanov
Hello! How value of -script parameter looks like? It is a regular file, pipe, or some other special object? I cannot reproduce this issue with regular files, but BufferedInputStream, unfortunately, may fail if underlying InputStream thrown exceptions from its available() method. Maybe H2

Re: [h2] H2DB breaks GraalVM native image production

2022-01-10 Thread Evgenij Ryazanov
Hello! I think you need to force inclusion of org.h2.store.fs.disk.* classes into compiled program somehow, H2 loads them dynamically through reflection and NPE here mean they weren't found. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To

[h2] Re: SQLWarnings in Profiler

2022-01-10 Thread Evgenij Ryazanov
Hello! H2 database doesn't support warnings and cannot produce java.sql.SQLWarning, if you see them, they came from some other software. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails

[h2] Re: H2DB upgrade from 1.4.195 to 2.0.206 - Breaks - Version mismatch, driver version is "0" but server version is "16"

2022-01-10 Thread Evgenij Ryazanov
Hello! You still have 1.4.195 somewhere. TCP protocol in H2 2.0.206 provides backward compatibility for 1.4.197 and newer versions only. Client with 1.4.195 cannot connect to server with 2.0.206 and client with 2.0.206 cannot connect to server with 1.4.195; these versions are too different

[h2] Re: usage of "runscript" feature

2022-01-06 Thread Evgenij Ryazanov
Hello. FROM_1X flag of RUNSCRIPT command allows keywords to be used as identifiers only in the imported script. This option doesn't change behavior of database after data import. If your application tries to misuse VALUE as unquoted identifier it needs to be fixed anyway, you need to quote it

[h2] Re: H2 (1.4.200) seems to misinterpret a valid join clause

2021-12-29 Thread Evgenij Ryazanov
Hello. Yes, it is a bug. I filled a new issue: https://github.com/h2database/h2database/issues/3311 -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[h2] Re: error version 2.0.204

2021-12-27 Thread Evgenij Ryazanov
Hello. H2 2.0 allows up to 1048576 characters for this data type: https://h2database.com/html/datatypes.html#character_varying_type For larger values you need to use CLOB: https://h2database.com/html/datatypes.html#character_large_object_type Please note that PreparedStatement.setString() and

[h2] Re: Data conversion error converting "NULL to assigned row value"

2021-12-08 Thread Evgenij Ryazanov
Yes, I completely forget that empty multi-column subquery should produce a row with null values, just like empty single-column subquery produces a null value. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and

[h2] Re: Overriding TO_DATE function

2021-12-08 Thread Evgenij Ryazanov
Hello. You cannot drop a built-in function and they are not aliases. But you can override them with alias. You need to append ;BUILTIN_ALIAS_OVERRIDE=TRUE to JDBC connection URL. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe

[h2] Re: Data conversion error converting "NULL to assigned row value"

2021-12-07 Thread Evgenij Ryazanov
With 20 rows H2 should throw Scalar subquery contains more than one row You need to provide a complete standalone test case. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send

[h2] Re: Data conversion error converting "NULL to assigned row value"

2021-12-07 Thread Evgenij Ryazanov
Hello. It is a wrong error message indicating that no rows were selected in a subquery. I filled a new issue about it: https://github.com/h2database/h2database/issues/3249 -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from

[h2] Re: V 1.4.200 LAST_INSERT_ID() don't work

2021-12-07 Thread Evgenij Ryazanov
Hello. This function is a part of MSSQLServer compatibility mode and is not available in other modes anymore. For identity columns In Regular mode you need to ask an insert or merge operation about the inserted data. With JDBC you can use Statement.getGeneratedKeys() if

[h2] Re: 2.0.202 and hibernate: boolean field regression?

2021-12-04 Thread Evgenij Ryazanov
Hello. It looks like a bug of Hibernate ORM. The basic Dialect class has the following method: public String toBooleanValueString(boolean bool) { return bool ? "1" : "0"; } It is obliviously wrong for any database system that has BOOLEAN data type. H2Dialect should override this method to

Re: [h2] Re: hibernate migration an MODE=PostgreSQL

2021-12-02 Thread Evgenij Ryazanov
Hello. Hibernate produces wrong SQL for H2 because H2IdentityColumnSupport.getIdentityInsertString() incorrectly returns "null" instead of "default" for a some historic reason. `getIdentitySelectString() also needs to be updated. There is a workaround described in another thread, but actually

[h2] Re: identity colomn

2021-11-30 Thread Evgenij Ryazanov
Hello. Mode mode = Mode.getRegular(); mode.updateSequenceOnManualIdentityInsertion = true; mode.identityColumnsHaveDefaultOnNull = true; should restore old incorrect behavior (influenced by historic versions of MySQL and others), but it would be better to fix your application instead. Please

[h2] Re: hibernate migration an MODE=PostgreSQL

2021-11-29 Thread Evgenij Ryazanov
Hello. H2 2.0.202 has INFORMATION_SCHEMA.SEQUENCES.START_VALUE, but usage of PostgreSQL***Dialect with H2 may still fail at any point, H2 should only be used with H2Dialect. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from

[h2] Re: information on how to report a vulnerability

2021-09-05 Thread Evgenij Ryazanov
Hello. H2 is not a secure container. Users with ADMIN privileges may do anything with your JVM and host system as far as your JVM allows by design. If remote database creation is enabled (remote access is completely disabled by default and remote database creation is disabled by default

[h2] Re: Unexpected join results

2021-08-31 Thread Evgenij Ryazanov
Hello. No, it doesn't look like a bug. Your subquery contains a non-deterministic expression, so it cannot be materialized and may be evaluated multiple times during execution of this query depending on execution plan, so the result of the whole query is undefined. You need to rewrite it

[h2] Re: Unexpetced result when calculate with fields

2021-08-15 Thread Evgenij Ryazanov
Hello. You can add a cast to REAL or DOUBLE PRECISION: cast(sum(minutes) / 60 as double precision). Actually it's a bug, it was fixed after the last published release of H2. H2 compiled from current sources returns 20.00 as expected. -- You received this message because

[h2] Re: concurrent mod error with h2mem

2021-08-02 Thread Evgenij Ryazanov
Hello You're using an entirely outdated version of H2 database, so it would be reasonable to test a latest version first. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an

[h2] Re: springboot-load-a-h2-table-from-an-oracle-database

2021-06-01 Thread Evgenij Ryazanov
Hello. You can register a linked table https://h2database.com/html/commands.html#create_linked_table and create its copy as a normal table with CREATE TABLE tableName AS TABLE linkedTableName After that the linked table may be dropped. Indexes and constraints will not be copied, so if they're

[h2] Re: Error Building H2 Console Servlet

2021-05-31 Thread Evgenij Ryazanov
Hello. Unfortunately, if you want to compile H2 1.4.200 or older versions from their sources you have to patch them by yourself or you can pre-download their dependencies. Current H2 can be compiled without any changes or additional actions. H2 1.4.200 should normally be compiled with

Re: [h2] Re: Getting error after upgrading to H2 DB 1.4.200 from 1.4.199 and deploying on Tomcat 9.x

2021-05-22 Thread Evgenij Ryazanov
Hello. First of all you need to ensure that your tools and your web application really use the same version of H2 and a new database file is created, in some cases build systems may fetch an unexpected version. And it would be much safer not to use AUTO_SERVER anywhere. If H2 is in classpath

[h2] Re: Same query, sometimes I get JdbcSQLSyntaxErrorException, sometimes not :o

2021-05-22 Thread Evgenij Ryazanov
Hello. It may be surprising, but validity of some queries depends on the data. H2 and some other DBMS support optional feature T301, “Functional dependencies” from the SQL Standard. When this feature is supported select expressions and where clause may reference non-aggregated columns when

Re: [h2] Re: Getting error after upgrading to H2 DB 1.4.200 from 1.4.199 and deploying on Tomcat 9.x

2021-05-17 Thread Evgenij Ryazanov
Hello. 1. H2 is a small database engine and doesn't have an automatic upgrade procedure for database files. Unfortunately, latest releases also didn't mark their files as incompatible with older versions, so if you tried to open a database file created by one version in another it may lead to

Re: [h2] Re: Getting error after upgrading to H2 DB 1.4.200 from 1.4.199 and deploying on Tomcat 9.x

2021-05-05 Thread Evgenij Ryazanov
Hello. Don't use AUTO_SERVER in web applications, their lifecycle is different from standalone applications. Web applications should either use an embedded database or connections to a separate H2 Server process. -- You received this message because you are subscribed to the Google Groups "H2

[h2] Re: CREATE ALIAS and local temporary files

2021-04-26 Thread Evgenij Ryazanov
Hello > According to the documentation of alias ( > https://www.h2database.com/html/commands.html#create_alias): > *Creates a new function alias. If this is a ResultSet returning function, > by default the return value is cached in a local temporary file.* > This line of documentation seems

[h2] Re: Best practises for Android (trying to compile for 7, getting class file version errors)

2021-04-25 Thread Evgenij Ryazanov
Hello. Android is far behind regular Java, some its parts, especially the JDBC API are still somewhere on Java 6 level, so you cannot use current H2 on this platform, it is not supported by H2 any more. Android API 26 got various significant improvements for better compatibility with Java 7

Re: [h2] Re: What about add support of COMMENT for table to CREATE TABLE statement?

2021-04-04 Thread Evgenij Ryazanov
Various internal clauses are usually poorly designed and sometimes they're changed due to revealed problems or other reasons. They need to be carefully redesigned first, and even if we'll do so, most likely nobody will try to implement the same syntax in other DBMS. -- You received this

[h2] Re: What about add support of COMMENT for table to CREATE TABLE statement?

2021-04-04 Thread Evgenij Ryazanov
Hello. Syntax of comments on columns in their definitions exists mostly for a some limited compatibility with MySQL, but it was included into documentation for some bad historic reason. Actually it shouldn't be documented and should be accepted only in the related compatibility modes, but

[h2] Re: Best Practice using H2

2021-03-23 Thread Evgenij Ryazanov
If you need the H2 Console only, you can embed it as a servlet into your application: https://h2database.com/html/tutorial.html#usingH2ConsoleServlet Don't forget to configure the security constraints to prevent access to it from untrusted and unauthorized users. If you need to accept

[h2] Re: Getting error after upgrading to H2 DB 1.4.200 from 1.4.199 and deploying on Tomcat 9.x

2021-03-23 Thread Evgenij Ryazanov
Hello. Your application shouldn't normally start TCP server of H2. If you need it, it should be launched as a separate process outside of your web / application server or at least in its process, but not on the web application level. Maybe you accidentally added AUTO_SERVER to JDBC URL of H2?

[h2] Re: Isolation level per connection or global?

2021-03-03 Thread Evgenij Ryazanov
Hello. H2 with default MVStore engine supports different isolation levels only since the version 1.4.200, it looks like you use some older version. Note that SERIALIZABLE isolation level in H2 is only partially supported, it prevents all three read phenomena, but doesn't ensure equivalence of

[h2] Re: H2 / TCP over SSL setting truststore system property alternatve

2021-03-03 Thread Evgenij Ryazanov
Hello. H2 has anonymous SSL, but it works only with outdated JREs. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To

Re: [h2] Re: PostgreSQL range type and functions

2021-02-18 Thread Evgenij Ryazanov
New data types will definitely require massive changes everywhere. I mentioned UDTs because their implementation may significantly reduce impact and complexity of such compatibility features, but we don't have them yet. -- You received this message because you are subscribed to the Google

[h2] Re: PostgreSQL range type and functions

2021-02-18 Thread Evgenij Ryazanov
Hello. I think it would be better to implement UDTs from the SQL Standard instead of non-standard and not compatible with anything feature of another DBMS with esoteric syntax. Contributions with non-standard operators most likely will be rejected, we don't want to have all this mess in H2.

[h2] Re: Nested loop join implementation

2021-02-15 Thread Evgenij Ryazanov
Why you think that this method is only about nested joins? It iterates over tables or subqueries, including joined and nested ones (if there are any) and their table filters do the same recursively. Index conditions are used when possible to avoid iteration over the whole tables. They are

[h2] Re: Nested loop join implementation

2021-02-15 Thread Evgenij Ryazanov
Hello. Take a look on the TableFilter.next() and other related code: https://github.com/h2database/h2database/blob/888e2284ffc5a76ebc1cf7346144e815b9c44813/h2/src/main/org/h2/table/TableFilter.java#L397 -- You received this message because you are subscribed to the Google Groups "H2 Database"

[h2] For everyone who use snapshot builds of upcoming H2 2.0

2021-02-14 Thread Evgenij Ryazanov
Please note that database files created by one snapshot build should not be opened with another snapshot build to avoid data loss or corruption. Always export your data to SQL with your current build and import it into new empty database with a new build if you want to use a more recent (or

[h2] Re: Table not found after ALTER table - leftover "_COPY_" table

2021-02-04 Thread Evgenij Ryazanov
Hello. Error code 42102-200 is from H2 1.4.200, you should not try to use both 1.4.199 and 1.4.200 with the same database file. If you have a database with corrupted metadata, you can add ;DATABASE_EVENT_LISTENER='path.to.Listener' to the connection url, where path.to.Listener is a

[h2] Re: Number Format exception for search by uuid column, when uuid value is fetched from another table uuid column..

2021-02-04 Thread Evgenij Ryazanov
Hello. Your issue is not related with H2 in any way. Your application tries to read an UUID value with ResultSet.getLong() method, with this method you can read only numeric values. It looks like your column has different incompatible data types in your entity and in your table or something

[h2] Re: MAX function does not return updated value until commit in SERIALIZABLE isolation level

2021-01-29 Thread Evgenij Ryazanov
If you can reproduce this bug with H2 compiled from the current sources, please provide a complete standalone test case. I can reproduce it with 1.4.200, but the same queries return correct results with current H2. -- You received this message because you are subscribed to the Google Groups

[h2] Re: MAX function does not return updated value until commit in SERIALIZABLE isolation level

2021-01-26 Thread Evgenij Ryazanov
Hello. I can reproduce this issue in presence of index on aggregated column with H2 1.4.200, but I can't reproduce this issue with H2 compiled from the current sources. You can compile H2 from the current sources and test it in your application if you wish. Note that H2 doesn't have true

[h2] Re: Name for Constraint Unique

2021-01-19 Thread Evgenij Ryazanov
On Tuesday, 19 January 2021 at 21:34:58 UTC+8 pylo...@gmail.com wrote: > I need to put a single value constraint on a column. So you advise me to > create an index and then assign it the unique constraint? > You normally should create only the constraint, unless you need something special from

[h2] Re: Name for Constraint Unique

2021-01-19 Thread Evgenij Ryazanov
Hello. H2 preserves the specified name of constraint as is. Your command creates a constraint with the name GS_PAYS_UN1_1. This constraint in H2 needs a compatible index on column GS_PAYS_LIB. If such index wasn't found, H2 creates its automatically and name of such index is autogenerated. In

[h2] Re: what does the H2 Console Auto Select [ On/Off ] control do??

2021-01-07 Thread Evgenij Ryazanov
Hello. Run Selected button or Shift+Enter key combination runs the selected code only. When selection is empty and Auto Select is enabled, the current block of code (separated with empty lines from other blocks) is selected and executed. When selection is empty and Auto Select is disabled,

[h2] Re: Database consistency check after SET REFERENTIAL_INTEGRITY FALSE;

2021-01-05 Thread Evgenij Ryazanov
Hello. Check of existing data on individual table can be enforced with ALTER TABLE tableName SET REFERENTIAL_INTEGRITY TRUE CHECK. Unfortunately, there is no built-in command to force such check on all tables at once. -- You received this message because you are subscribed to the Google

Re: [h2] Re: Linked table fetch size

2021-01-04 Thread Evgenij Ryazanov
Yes, if you don't have better ideas. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To view this discussion on the web

Re: [h2] Re: Linked table fetch size

2020-12-31 Thread Evgenij Ryazanov
On Thursday, 31 December 2020 at 22:55:44 UTC+8 bocher wrote: > It would be better to specify the new additional parameters of Connection > and Statement outside of these parentheses. > > Do you have an idea in mind ? I'd like to set the parameters from the SQL > engine. > I think you can add

Re: [h2] Re: Linked table fetch size

2020-12-31 Thread Evgenij Ryazanov
On Thursday, 31 December 2020 at 21:52:10 UTC+8 bocher wrote: > I have a doubt on how to define the fetch_size from the create linked > table signature. What do you think about adding an option like this > > CREATE LINKED TABLE LINK('org.h2.Driver', 'jdbc:h2:./test2', > 'sa', 'sa', 'TEST',

[h2] Re: H2 EOL Versions?

2020-12-21 Thread Evgenij Ryazanov
Hello. There are no “supported” versions of H2, you can use any version you wish, but you should understand that nobody cares about any previous releases, there will be no patch releases for them. Releases are simply numbered sequentially. Sometimes for some applications the latest available

[h2] Re: Database file is deleted when create a cluster

2020-12-04 Thread Evgenij Ryazanov
Hello. The cluster support is unmaintained for years and can have any issues. Here you need to add -ifNotExists parameters to your TCP servers and make sure they aren't available outside of your network, because combination of -tcpAllowOthers with -ifNotExists effectively creates a remote

[h2] Re: File_lock=NO not working

2020-11-25 Thread Evgenij Ryazanov
Hello. You cannot connect to the same file from multiple instances of H2. You need to use the standalone H2 Server process and use remote connections to it (this way is safer), or you can use the automatic mixed mode ( https://h2database.com/html/features.html#auto_mixed_mode), but with mixed

[h2] Re: Fun with URIs and Windows: jdbc:h2:C:/ vs. jdbc:h2:/C:/

2020-11-24 Thread Evgenij Ryazanov
Hello. JDBC connection URLs for H2 aren't related with URIs in any way. jdbc:h2:, jdbc:h2:file:, and jdbc:h2:nio: mean the same in the current H2 and there are no good reasons to use file: or nio: prefixes. In older versions they were different (and they also were different between PageStore

Re: [h2] Re: Getting vulnerability as HTTP header not detected,

2020-11-24 Thread Evgenij Ryazanov
You can't add anything to build-in server of H2. Just don't use it in production. If you're using a some other web server (Tomcat, Jetty, etc.) and H2 Console servlet on it, you can add a javax.servlet.Filter implementation with @javax.servlet.annotation.WebFilter annotation and add all

[h2] Re: Getting vulnerability as HTTP header not detected,

2020-11-24 Thread Evgenij Ryazanov
Hello. H2 is a DBMS, it's not an HTTP server. H2 has a simple built-in web server for H2 Console, but it shouldn't be used in production. If you want to have H2 Console in production, normally you should use the H2 Console servlet and add proper security configuration for it to your web

[h2] Re: Bug: Trivial query returns result in wrong order

2020-11-19 Thread Evgenij Ryazanov
Hello. Thank you for the test case! I sent a PR with a fix: https://github.com/h2database/h2database/pull/2955 The fix will be included into the next release. If you'll find more bugs, please use the issue tracker: https://github.com/h2database/h2database/issues When unsure whether some

[h2] Re: Does H2's built in connection pool work with other JDBC dbs?

2020-11-14 Thread Evgenij Ryazanov
Hello. No, it is for H2 only. Hypothetically it may work if you specify a custom third-party ConnectionPoolDataSource instead of URL, user, and password, but it isn't guaranteed anyway. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To

Re: [h2] Re: Time To First Row on large ResultSet

2020-11-10 Thread Evgenij Ryazanov
Hello. There is nothing to do with temporary results in H2. If you have large queries and they may return parts of results early, use `LAZY_QUERY_EXECUTION=TRUE`. If some query doesn't support lazy execution, there is nothing to do with it in H2 itself. With `LAZY_QUERY_EXECUTION=TRUE` H2

[h2] Re: NPE when running query with timestamp conversion in 1.4.200

2020-11-02 Thread Evgenij Ryazanov
Hello. Yes, it's a known regression, it was found after release of 1.4.200 and was fixed in development sources, but, unfortunately, a patch release was not published in time. You can cast the passed value to a TIMESTAMP explicitly as a workaround, or you can compile H2 from the sources by

[h2] Re: H2 Database Linked table Performance

2020-10-29 Thread Evgenij Ryazanov
If you need to know their performance, you need to measure it by yourself with your real queries and your real data. But in all or almost all cases linked tables are slower than own regular tables. They aren't about performance, they are for access to data stored in other database. -- You

[h2] Re: H2 Database Linked table Performance

2020-10-29 Thread Evgenij Ryazanov
Hello. > 1. How does Linked Table work? > It simply redirects all queries and data modification commands to the target database. > When i create a Linked Table in H2 Database - does it continuously monitor > the actual database table that it is linked to - for changes? > No. > and if

Re: [h2] How to access the H2 parser and AST?

2020-10-11 Thread Evgenij Ryazanov
Hello. 1. I suggest you not to use any internals of H2 for your own purposes. But if you have no other choice, you need to write an own implementation of org.h2.bnf.BnfVisitor, see org.h2.build.doc.BnfRailroad and org.h2.build.doc.BnfSyntax for examples. 2. BNF of H2 isn't really usable for

[h2] Re: Encrypted password and password in clear text

2020-09-21 Thread Evgenij Ryazanov
Hello. Your problem is not related with H2 and is not related with your web server. The problem is in CommonsRequestLoggingFilter from the Spring or in its configuration. Why it logs requests to H2 Console? You need to exclude H2 Console URLs and possibly other unrelated URLs for that filter.

[h2] Re: release date : 1.4.201 version

2020-09-21 Thread Evgenij Ryazanov
Hello. The next version is 2.0.202, but it can be released only when some critical known regressions since the version 1.4.200 will be fixed and migration guide will be ready. 1.4.200 was the last release in 1.4 series of releases. Current H2 is very different from it. -- You received this

[h2] Re: errors trying to create an alias

2020-09-18 Thread Evgenij Ryazanov
Hello. It looks like you run H2 in JRE instead of JDK and you don't have a javac from JDK in the path. JRE doesn't have a Java compiler. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails

[h2] Re: different behavior between h2 and oracle

2020-09-08 Thread Evgenij Ryazanov
Hello. Your question was already answered in another topic: https://groshouldn'tups.google.com/forum/#!topic/h2-database/mricrmhHQ8k You can't use H2 to check validity of your queries for Oracle, each DBMS is different. -- You

[h2] Re: Error only if there is some value

2020-09-08 Thread Evgenij Ryazanov
Hello. There is an optional feature T301, “Functional dependencies” in the SQL Standard. H2 and some other DBMS support this feature. Only DBMS without its support may throw an exception immediately. In DBMS with its support select expressions and where cause may reference non-aggregated

[h2] Re: ALTER TABLE "table-name" MODIFY "columne" NOT NULL; fail with Unknown data type: "NOT";

2020-09-08 Thread Evgenij Ryazanov
Hello. In the SQL Standard the following command is defined: ALTER TABLE tableName ALTER COLUMN columnName DROP NOT NULL H2 supports it properly. Other commands are vendor-specific and H2 obliviously doesn't support them all. -- You received this message because you are subscribed to the

[h2] Re: VARBINARY / LOB limitations

2020-09-02 Thread Evgenij Ryazanov
In this issue references to a LOB values expire too early in multi-threaded application. Applications with a single connection (session) shouldn't be affected, but you can run some own tests to be sure. -- You received this message because you are subscribed to the Google Groups "H2 Database"

[h2] Re: VARBINARY / LOB limitations

2020-09-02 Thread Evgenij Ryazanov
> > 1) Is an in-place LOB different from VARBINARY? Does it - like a > non-in-place LOB - require additional read operation? > In-place BLOBs are similar to BINARY VARYING and in-place CLOBs are similar to CHARACTER VARYING in terms of their storage, but they use API of LOBs. You can set

[h2] Re: VARBINARY / LOB limitations

2020-09-02 Thread Evgenij Ryazanov
H2 ensures consistence of transactions for LOB values too, they aren't special. But H2 has a long-standing issue with LOBs: https://github.com/h2database/h2database/issues/1808 In-place LOBs aren't affected, however. -- You received this message because you are subscribed to the Google Groups

[h2] Re: VARBINARY / LOB limitations

2020-09-01 Thread Evgenij Ryazanov
Yes, LOB values are stored separately in H2 and in many other DBMS, unlike other values. When you read a row, all non-LOB values are read, presence of some large value may slow down the whole operation even when it doesn't need to read them. Presence of large LOB value is cheap here, because

[h2] Re: VARBINARY / LOB limitations

2020-08-31 Thread Evgenij Ryazanov
PreparedStatement.setBytes() and PreparedStatement.setObject() with byte[] argument pass a BINARY VARYING value to H2 (in some other drivers they may pass a BINARY value, the JDBC specification allows such behavior too). It obliviously can't be used for very long arrays.

[h2] Re: VARBINARY / LOB limitations

2020-08-31 Thread Evgenij Ryazanov
Hello. For larger objects you normally should use BLOB or CLOB data type in any version of H2 and the most of other DBMS. These data types aren't affected by the new limitations. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe

[h2] Re: Release Schedule

2020-08-27 Thread Evgenij Ryazanov
If a third-party tool uses those legacy classes, you may want to submit a feature request in its bugtracker about usage of modern API with compatible drivers. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and

[h2] Re: Release Schedule

2020-08-27 Thread Evgenij Ryazanov
Please, read the documentation: https://h2database.com/html/datatypes.html#date_type Current behavior is a compromise between bugs of legacy datetime API and we don't want to change it again. Just don't use it any more, Java 8 and JDBC 4.2 have much better classes without horrible design flaws.

[h2] Re: Release Schedule

2020-08-23 Thread Evgenij Ryazanov
Hello. 1. 1.4.200 was the last release in 1.4 series of releases and upcoming 2.0.202 has significant changes everywhere and shouldn't be considered as drop-in replacement, you may need some adjustments for it. 2. We have some known unintended regressions that need to be fixed before the

<    1   2   3   4   5   6   >