[h2] getParameterMetaData data type is not valid for LIMIT ? clause

2015-03-09 Thread Vojtěch Hordějčuk
Hi, is this a correct behavior? If I prepare statement with a limit statement, e.g. *SELECT * FROM system_range(1,10) LIMIT ?* and then get the parameter meta data, I would get VARCHAR as a data type of the limit related placeholder. I am expecting a numeric data type, because *LIMIT 'abc' *is

[h2] Re: getParameterMetaData data type is not valid for LIMIT ? clause

2015-03-09 Thread Vojtěch Hordějčuk
update: the same behavior applies to OFFSET ? Dne pondělí 9. března 2015 10:43:32 UTC+1 Vojtěch Hordějčuk napsal(a): > > Hi, is this a correct behavior? > > If I prepare statement with a limit statement, e.g. *SELECT * FROM > system_range(1,10) LIMIT ?* and then get the parameter meta data, I wou

Re: [h2] Re: Insert with multi column constraint issue

2015-03-09 Thread Mike Goodwin
Ah, I see :S Sorry, SQL blindness. I think especially when it comes to DDL I will copy something and once it works not worry about the SQL (I mean it is unlikely I put the NOCHECK in on purpose). Thanks for taking a look. On Thu, Mar 5, 2015 at 5:45 PM, Noel Grandin wrote: > On Thu, Mar 5, 20

[h2] Query index selection with 'sub types'

2015-03-09 Thread Mike Goodwin
Hi, I have a query performance problem that has come, gone away and come back again. The issue seems to be when using what are sometimes referred to as sub types. A sub type is a table that share a primary key with the super type table. This explains the scheme a bit better. http://blogs.msdn.c

Re: [h2] Re: getParameterMetaData data type is not valid for LIMIT ? clause

2015-03-09 Thread
Hi, I think is that correct. According to documentation, the compatibility mode feature allows to write expressions that are not necessarily a number value. In Mysql mode, you can write the expression LIMIT , and in the DB2 you can write OFFSET {ROW | ROWS}. However, the limit expression is not

Re: [h2] Query index selection with 'sub types'

2015-03-09 Thread
Hi Mike, I would like to try to help you. So, can you provide schema/test data to reproduce the cited situation? Regards, Fred 2015-03-09 10:24 GMT-03:00 Mike Goodwin : > Hi, > > I have a query performance problem that has come, gone away and come back > again. > > The issue seems to be when u

Re: [h2] java embedded h2 questions

2015-03-09 Thread Thomas Mueller
Hi, You would need to use the server mode, or the automatic mixed mode. Regards, Thomas On Saturday, January 31, 2015, Peter Cheung wrote: > Hi > I use java the start connect to h2 using jdbc. Because all threads in > java are in one single process. So I can connect to the H2 concurrently.

[h2] getParameterMetaData data type is not valid for LIMIT ? clause

2015-03-09 Thread Thomas Mueller
Hi, I agree this is incorrect. A patch is welcome. However, could you explain what problem you want to solve? Regards, Thomas On Mon, Mar 9, 2015 at 11:20 AM, Vojtěch Hordějčuk < vojtech.hordej...@gmail.com > wrote: > update: the same behavior applies to OFFSET ? > > Dne pondělí 9. března 201

Re: [h2] grouped by timestamp

2015-03-09 Thread Thomas Mueller
Hi, Such questions are typically best asked at StackOverflow.com. You would need a function that converts the timestamp to a value with a 5 minute delay. Regards, Thomas On Wednesday, January 14, 2015, Hannes Hörting wrote: > Hello! > > I write each minute in the databse: > timestamp ; uid ;

[h2] BUG,use single quote in jpa column name will not woke correctly.

2015-03-09 Thread Thomas Mueller
Hi, I don't know where it is converted to lowercase, so I'm afraid I can't help here. However, I would not use the column names "FROM" and "TO" (quoted or unquoted). Regards, Thomas On Sun, Mar 8, 2015 at 7:09 PM, wener > wrote: > @Data > @Accessors(chain = true, fluent = true) > @Entity > @T

Re: [h2] MVStore - Statistics

2015-03-09 Thread Thomas Mueller
Hi, That sounds like a good idea! On the API side, I would probably make it a key-value list, by extending the existing table information_schema.settings. Otherwise the table will get a *lot* of columns if we add other data. Of course, the problem of a key-value list is that the datatype for both

Re: [h2] I want to build a shared table based on TableLink, any ideas ?

2015-03-09 Thread Thomas Mueller
Hi, I'm not sure what features you want to add so I can't be certain, but I think it is possible. I suggest to read all the documentation about linked tables. Then, you may want to read (part of) the implementation of that feature. It is probably more complex for what you need. Regards, Thomas

Re: [h2] DROP in SCRIPT command don't drop sequences

2015-03-09 Thread Thomas Mueller
Hi, The "belongs_to_table" is not part of the official API. It is used internally mark sequences as belonging to tables. The issue is, in your case, that you forgot(?) to link the table to the sequence. It should be: create table test(id identity); script drop; CREATE SEQUENCE PUBLIC.SYSTEM_SEQU

Re: [h2] Error updating database. Cause: org.h2.jdbc.JdbcSQLException: Timeout trying to lock table ;

2015-03-09 Thread Thomas Mueller
Hi, Well the error message says timeout, are sure it is not a timeout? Regards, Thomas On Tuesday, January 27, 2015, wrote: > I am using the H2 1.4.185. > > The url is jdbc:h2:tcp:// > 127.0.0.1/activiti?TRACE_LEVEL_FILE=4;WRITE_DELAY=10;CACHE_SIZE=4096;MAX_COMPACT_TIME=5000 > ; > > ### Er

Re: [h2] Query index selection with 'sub types'

2015-03-09 Thread Mike Goodwin
Hi, I replied off list with the data. Thanks Fred. I did a little bit of investigation myself. I could see in the optimizer that for whatever reason it was not giving the plan which used the index a better score. Actually the costs were all very similar (+/- 1%). I added in an extra heuristic whi

Re: [h2] No database in the Console

2015-03-09 Thread Thomas Mueller
Hi, One way to debug is to look at the stack trace, and then set a breakpoint there, and then check what the parameters / variables are. Regards, Thomas On Thu, Mar 5, 2015 at 11:46 AM, Max Telfer wrote: > Hi again > > I get the same result with any browser - Chrome, IE, Firefox. This used

Re: [h2] DROP in SCRIPT command don't drop sequences

2015-03-09 Thread Daniele Renda
Thanks very much Thomas! 2015-03-09 18:14 GMT+01:00 Thomas Mueller : > Hi, > > The "belongs_to_table" is not part of the official API. It is used > internally mark sequences as belonging to tables. The issue is, in your > case, that you forgot(?) to link the table to the sequence. It should be: >

Re: [h2] INSERT ... ON DUPLICATE KEY UPDATE with specified schema not working

2015-03-09 Thread Alessio Della Motta
Dear Thomas, you can find attached a groovy file with the error reproduced. Just launch from your command line: $> groovy example.groovy My current environment is: Groovy Version: 2.1.6 JVM: 1.8.0_05 Best, Alessio Il giorno domenica 1 marzo 2015 01:58:35 UTC-8, Thomas Mueller ha scritto: > >

Re: [h2] Database corruption after upgrade to 1.3.176 (from 1.3.169)

2015-03-09 Thread Thomas Mueller
Hi, The "FileLock" is the mechanism to ensure only one process accesses the database file. If there is a "concurrent update" exception, the problem is most likely a file system that is not supported by this mechanism. I think operating system file level locking is required, and the FileLock mecha