Re: [h2] using h2 servlet console with embedded derby

2014-06-18 Thread Thomas Mueller
Hi, If the Derby JDBC driver is in the classpath, then I'm afraid I don't know what the problem could be. Should the h2 console work with derby? > Sure. > Am I doing something wrong? > I would double check if the Derby JDBC driver is really in the classpath. Where exactly did you put the D

Re: [h2] Provide an Servlet-based Http-Transport

2014-06-18 Thread Thomas Mueller
Hi, in hsqldb, a servlet-based http transport can be used to communicate > between server and client. > Yes, I know. I think I originally wrote that feature :-) when migrate to h2, i don't find any information about it. is H2 provides > one? > I'm afraid not. There are no plans to add this feat

Re: [h2] I've got something wrong h2 index.

2014-06-18 Thread Thomas Mueller
Hi, Could you post or send me the database file please? Regards, Thomas On Tuesday, June 17, 2014, Frank Liu wrote: > select * from TSV_LTE_CAUSE where protocolid=14 > when i do not create index on tsv_lte_cause(protocolid) ,i can get a 14 > data. > but i create index,i can not get a 14 data

Re: [h2] question abount MVStore: does MVStore support multithread?

2014-06-18 Thread Thomas Mueller
Hi, With version 1.4, you can use both MVCC and multi-threaded at the same time (as documented). In version 1.4, the MVCC behavior is the same as with PostgreSQL, as far as I can tell (or as far as my randomized tests can tell). Regards, Thomas On Sunday, June 15, 2014, Wen Bob wrote: > In

[h2] H2 Database Engine: New version 1.4.179 (Beta) available

2014-06-22 Thread Thomas Mueller
Hello, A new version of H2 is available at http://www.h2database.com (you may have to click 'Refresh'). For details, see the 'Change Log' at http://www.h2database.com/html/changelog.html For future plans, see the 'Roadmap' page at http://www.h2database.com/html/roadmap.html P.S. If you reply to

Re: [h2] Is multithreading safe or not? ... IndexOutOfBoundsException

2014-06-23 Thread Thomas Mueller
Hi, Could you try again with H2 version 1.4.179 please? (You are currently using 1.4.178.) If it's still a problem, could you send me the test case so I can try to reproduce the problem? > The documentation says that multi-threading is safe ... Wit H2: yes. > ... and that applications do not ne

Re: [h2] some data size increase tests

2014-06-23 Thread Thomas Mueller
Hi, Did you try with the latest version of H2 (1.4.x)? Please note you will need to compact the database using "shutdown defrag" after you finished. And apppend ";compress=true" to the database URL, as Noel wrote. Regards, Thomas On Saturday, June 21, 2014, Noel Grandin wrote: > If you're wo

Re: [h2] h2 console usability

2014-06-23 Thread Thomas Mueller
Hi, It doesn't do that for me. What version of H2, and which browser do you use? Regards, Thomas On Saturday, June 21, 2014, Silvio wrote: > My number one irrittion whith the console is that it resets the database > path to the pointless default whenever "Test connection" fails. This > prevent

Re: [h2] How do you do a point query with a TIMESTAMP ? Cannot find anything senerio that works.

2014-06-23 Thread Thomas Mueller
Hi, How do you format the output ("Results: name=...")? I guess you don't print the nanoseconds part. Yes, you can't use SimpleDateFormat as it doesn't support nanoseconds, but toString() and "cast(.. as varchar)" should work, see below. What version of H2 do you use? Class.forName("org.h2.Driver

Re: [h2] error [90112-178] when executing delete statements

2014-06-23 Thread Thomas Mueller
Hi, I think the problem was "Issue 566: MVStore: unique indexes that were created later on did not work correctly if there were over 5000 rows in the table.". This is fixed with version 1.4.179. But you will need to re-create the database I'm afraid (via export to SQL script for example). Regards

[h2] jdbc 4.1 and java 8

2014-06-23 Thread Thomas Mueller
Hi, That's one issue I have with Maven: it doesn't use content hashes by default. In theory, a mirror of the Maven repo could even inject a virus into a library. See also http://stackoverflow.com/questions/7094035/how-secure-is-using-maven The H2 build contains the content hashes of all reference

Re: [h2] exporting SQL script for creating tables and inserting data

2014-06-23 Thread Thomas Mueller
Hi, Use "script" (see the documentation). Regards, Thomas On Monday, June 23, 2014, waseem wrote: > How can we export SQL script in H2 Database ? > > Thanks. > > -- > You received this message because you are subscribed to the Google Groups > "H2 Database" group. > To unsubscribe from this gr

Re: [h2] Running H2 in mixed mode with a connection pool

2014-06-23 Thread Thomas Mueller
Hi, All connections to the same database within the same process are either open in embedded mode, or in server mode. Regards, Thomas On Sunday, June 22, 2014, Kenton Garner wrote: > Simple question... > I am Running H2 in mixed mode: when using a connection pool does that mean > the applicat

Re: [h2] how to create and access database using h2 via cfml ?

2014-06-23 Thread Thomas Mueller
Hi, What did you try exactly? Regards, Thomas On Monday, June 23, 2014, waseem wrote: > hi, > > I am having MySQL database with several tables already now i want to have > same tables in the h2 database, i have tried creating the database with > same name as of MySQL database but not able to

Re: [h2] How do you do a point query with a TIMESTAMP ? Cannot find anything senerio that works.

2014-06-23 Thread Thomas Mueller
8:09 AM, Thomas Mueller < thomas.tom.muel...@gmail.com> wrote: > Hi, > > How do you format the output ("Results: name=...")? I guess you don't > print the nanoseconds part. Yes, you can't use SimpleDateFormat as it > doesn't support nanoseconds, but toSt

Re: [h2] some data size increase tests

2014-06-24 Thread Thomas Mueller
ress=true" URL option in the > documentation. > Are there levels of compression that can be specified on the URL or simply > true/false? > > > On Tuesday, June 24, 2014 2:09:20 AM UTC-4, Thomas Mueller wrote: > >> Hi, >> >> Did you try with the latest v

Re: [h2] Problem with JDBC Url (h2 server mode)

2014-06-24 Thread Thomas Mueller
> at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:91) > at org.h2.Driver.connect(Driver.java:74) > at java.sql.DriverManager.getConnection(Unknown Source) > at java.sql.DriverManager.getConnection(Unknown Source) > at Test.main(Test.java:7) > > > This

Re: [h2] Looking for best practices to control DB File size - indexes seem to be an issue...

2014-06-24 Thread Thomas Mueller
Hi, The MVStore doesn't re-use the disk space as efficiently as the PageStore. Version 1.4.x uses the MVStore by default. To shrink a database with version 1.4.x, you need to run "shutdown defrag". What you did ("shutdown compact") doesn't have a big effect yet, it only frees up about 16 MB per se

Re: [h2] Feature Request: Transparent Password Security

2014-06-27 Thread Thomas Mueller
Hi, To me it sounds like everything could be implemented on top of the database. That would make using it database independent. The implementation would be dependent on the database somewhat (user defined functions). Regards, Thomas On Friday, June 27, 2014, Noel Grandin wrote: > Does any oth

Re: [h2] Re: org.h2.jdbc.JdbcSQLException: General error: "java.lang.RuntimeException: page[5528] data leaf table

2014-06-27 Thread Thomas Mueller
Hi, If the database is already corrupt, then I'm afraid you will need to re-create it (for example, via export to SQL script and re-import). Bug fixed since version 1.3.168: With version 1.3.171 and older: when using local temporary tables and not dropping them manually before closing the session

Re: [h2] using h2 servlet console with embedded derby

2014-06-27 Thread Thomas Mueller
Adam > > > > > On Thursday, June 19, 2014 1:42:35 AM UTC-4, Thomas Mueller wrote: >> >> Hi, >> >> If the Derby JDBC driver is in the classpath, then I'm afraid I don't >> know what the problem could be. >> >> Should the h2 console wor

Re: [h2] Problem still persist on latest release(1.4.179) IndexOutOfBoundsException during executeBatch.

2014-06-28 Thread Thomas Mueller
Hi, Do you have a simple, reproducible test case? If not, could you describe what your application does exactly? Regards, Thomas On Sun, Jun 29, 2014 at 5:34 AM, Vishwa wrote: > I have been getting this exception on 1.4.178 and 1.4.179. > Problem still persist on latest release > No issue wi

Re: [h2] Problem still persist on latest release(1.4.179) IndexOutOfBoundsException during executeBatch.

2014-06-30 Thread Thomas Mueller
Hi, Even thought I couldn't reproduce the problem on the database level, I think I found the problem. I have a test case on the MVStore level, and a fix for it. Regards, Thomas On Sunday, June 29, 2014, Vishwa wrote: > I have around 100M row in each tables/views and loading from MySQL. I > ca

[h2] MAX of multiple columns

2014-06-30 Thread Thomas Mueller
Hi, Do you mean "greatest"? http://h2database.com/html/functions.html#greatest Regards, Thomas On Mon, Jun 30, 2014 at 1:59 PM, Chandra DhulipalaV < c.dhulipa...@surveybe.com > wrote: > I was looking for a single function that does the required.. > Your union query works fine for me. > Thanks

Re: [h2] return NON-auto generated keys

2014-07-03 Thread Thomas Mueller
Hi, Why can't you use a sequence? Sure, there might be a gap if the process is killed (or on power failure), but is that really a problem for you? Why? You will anyway have gaps if you ever remove entries. A patch for H2 would be nice! The best solution in my view (but probably also the most comp

Re: [h2] Problem with JDBC Url (h2 server mode)

2014-07-03 Thread Thomas Mueller
Hi, OK, I didn't think that would be the problem. I will add this to the documentation "For Windows, an absolute path also needs to include the drive ("C:/...").". Regards, Thomas On Friday, June 27, 2014, Matthew Lohbihler wrote: > Windows. And yes, that solves the problem. Thanks Noel. > >

Re: [h2] curious join result

2014-07-03 Thread Thomas Mueller
Hi, select * from table(a int = (1,2,3)), table(b int = (3,4,5)) > In this case, both tables have the name "table", and H2 gets confused. I consider that a bug. A similar case is: drop table table_a; drop table table_b; create table table_a(a int); insert into table_a values(1); create table ta

Re: [h2] return NON-auto generated keys

2014-07-03 Thread Thomas Mueller
Hi, Sequences are SQL standard: http://www.linuxnetworks.de/doc/index.php/Portable_SQL/Statements/IDs/Generating_IDs > Yes the returning clause of PostgreSQL is nice. It's the one I expected to be SQL Standard ;-) I'm not sure if the PostgreSQL "returning" clause is part of the SQL standard. I t

Re: [h2] Got exception ("...Illegal Capacity: -1")... What are the pros/cons to disabling the MVStore? I am not comfortable with it yet.

2014-07-03 Thread Thomas Mueller
Hi, I'm working on this issue right now. > Can you tell me if disabling the MVStore ( MV_STORE=FALSE; ) would take me to a more stable version Yes. That way, the old "page store" is used. > or should I download an older version? That's an option as well. See the change log for bugs that were f

Re: [h2] References to other tables

2014-07-04 Thread Thomas Mueller
Hi, To find the changed source code, you can go to https://code.google.com/p/h2database/source/list . This case is https://code.google.com/p/h2database/source/detail?r=5707 - test case is here: https://code.google.com/p/h2database/source/diff?spec=svn5707&r=5707&format=side&path=/trunk/h2/src/test

Re: [h2] Unique index or primary key violation: "SYS_ID ON PUBLIC.SYS(ID)" [23505-168] (using 1.3.168)

2014-07-04 Thread Thomas Mueller
Hi, To re-create the database, you can use the "Recover" tool. Regards, Thomas On Sun, Jun 29, 2014 at 11:38 PM, Ravindra Gullapalli < sharewithra...@gmail.com> wrote: > Another input (might be useful) > > I did a checkout of source code of revision # 5751 and tried to generate > script. Howe

Re: [h2] Reduce space usage with repeated strings column values

2014-07-09 Thread Thomas Mueller
Hi, There are two areas: data de-duplication, and data compression. ** Data De-Duplication ** For BLOB and CLOB, data de-duplication is used for version 1.3.x, but only up to some point. Version 1.4.x does not use it, as it deceases write performance, and only helps for fairly small databases. F

Re: [h2] IO Exception: "java.io.IOException: Stream Closed"; [90031-168]

2014-07-09 Thread Thomas Mueller
Hi, For write performance reasons, even for Linux, I would avoid keeping the database files on a network drive, for H2 version 1.3.x. Version 1.4.x (the MVStore) should be be less problematic, as the number of write operations is much lower. It would be worth a try. The number of read operations

[h2] Problem with create index in table large

2014-07-10 Thread Thomas Mueller
Hi, How fast is it in Firebird, how fast in H2? What version of Firebird and H2 do you use, and which options (for H2, specially whether you are using MV_STORE or not)? Regards, Thomas On Thu, Jul 10, 2014 at 4:31 PM, Claudiney Marques > wrote: > I dont know why the firebird is more fast. Used

[h2] Problem with latest release(1.4.179) - java.lang.UnsupportedOperationException

2014-07-10 Thread Thomas Mueller
Hi, I think I know what the problem is. I'm still working on it, but the trunk is probably already more stable. Regards, Thomas On Thu, Jul 10, 2014 at 8:25 AM, Noel Grandin > wrote: > Sigh. Where is the rest of the exception? > > > On 2014-07-10 01:29 AM, Vishwa wrote: > >> 2014-07-09 15:26:3

Re: [h2] parser uses quotes around schema name?

2014-07-11 Thread Thomas Mueller
Hi, > It looks like the parser uses the quotes (") around the schema name It's not the parser that "uses" double quotes. It's you that should use double quotes, or backticks (it doesn't matter which one), if you to use case sensitive identifiers. Case sensitive identifiers are used in these cases

Re: [h2] ArrayIndexOutOfBoundsException with multiple Threads using h2-1.3.176

2014-07-11 Thread Thomas Mueller
Hi, I can reproduce the problem with version 1.3.x, or with version 1.4.x when disabling the MVStore (append ";mv_store=false" to the database URL). With version 1.4.x (beta), that is with the MVStore, it does not occur. I'm not quite sure what the problem is, it looks like the LOB is removed a b

Re: [h2] Re: Problem with create index in table large

2014-07-11 Thread Thomas Mueller
Hi, Could you try version 1.4.x (beta), and create the index after inserting the data? Version 1.4 (the MVStore) should be much faster creating indexes. If it's still too slow, could you provide a few (about 20 or so) full thread dumps? (To get them, use "jstack -l ".) Regards, Thomas On Thu,

Re: [h2] parser uses quotes around schema name?

2014-07-11 Thread Thomas Mueller
ith a fresh database. Regards, Thomas On Fri, Jul 11, 2014 at 4:28 PM, Karl Pietrzak wrote: > On Friday, July 11, 2014 7:43:30 AM UTC-4, Thomas Mueller wrote: >> >> Hi, >> >> > It looks like the parser uses the quotes (") around the schema name >> >>

Re: [h2] Re: Problem still persist on latest release(1.4.179) IndexOutOfBoundsException during executeBatch.

2014-07-11 Thread Thomas Mueller
Hi, Yes, this should be fixed now (today) in the trunk. Regards, Thomas On Thu, Jul 10, 2014 at 1:27 AM, Vishwa wrote: > Again one more exception after build from trunk. > Can anyone help here? > > 2014-07-09 15:26:30,531 ERROR [Job Manager 10] > b.t.i.d.m.MemoryDatabaseLoader [MemoryDatabase

Re: [h2] Got exception ("...Illegal Capacity: -1")... What are the pros/cons to disabling the MVStore? I am not comfortable with it yet.

2014-07-11 Thread Thomas Mueller
Hi, This should be fixed now in the trunk. Regards, Thomas On Thu, Jul 3, 2014 at 10:47 PM, Kenton Garner wrote: > > Thanks again for your quick response. > > > On Thursday, July 3, 2014 2:36:57 PM UTC-4, Thomas Mueller wrote: > >> Hi, >> >> I'm wor

Re: [h2] Re: Problem with create index in table large

2014-07-11 Thread Thomas Mueller
ODE=0;LOG=0;UNDO_LOG=0;PAGE_SIZE=1024"; > > Test to create index: > time 1:21:42 > > Test with Query using index in table > time: 0:4:46 > > > Em sexta-feira, 11 de julho de 2014 09h39min25s UTC-3, Thomas Mueller > escreveu: >> >> Hi, >> >

[h2] H2 Database Engine: New version 1.4.180 (Beta) available

2014-07-13 Thread Thomas Mueller
Hello, A new version of H2 is available at http://www.h2database.com (you may have to click 'Refresh'). For details, see the 'Change Log' at http://www.h2database.com/html/changelog.html For future plans, see the 'Roadmap' page at http://www.h2database.com/html/roadmap.html P.S. If you reply to

Re: [h2] Server side cursors

2014-07-16 Thread Thomas Mueller
Hi, I don't think server side cursors are really needed, but still want to implement them at some point, hoping the code gets a bit simpler and more flexible. I expect it will take a few month. First, the MVStore needs to get stable. Regards, Thomas On Tue, Jul 15, 2014 at 12:22 PM, Rinse Lems

Re: [h2] "OutOfMemoryError"... What is the best way to Delete alot of rows?

2014-07-16 Thread Thomas Mueller
Hi, > The MSGDATE field is part of the primary key Well, what *exactly* is the primary key? It's not enough if it's _part_ of the primary key, it needs to be the first column of an index. Out of memory: The problem could be MVCC in combination with the PageStore, I think this can run out of memo

Re: [h2] Changing Encryption Password with "ChangeFileEncryption"

2014-07-16 Thread Thomas Mueller
Hi, The problem is that the order of passwords is swapped. See http://h2database.com/html/features.html#file_encryption : "filepwd userpwd", so in your case that's "a" instead of "a". Regards, Thomas On Wed, Jul 16, 2014 at 4:57 PM, Thomas Förster wrote: > Hi! > > In a Java programm I am imp

Re: [h2] DATEDIFF H2 and MSSQL compatibility

2014-07-18 Thread Thomas Mueller
Hi, Could you try without double quotes and single quotes? That should work without both MS SQL Server and H2. @Formula("DATEDIFF(DAY, GETDATE(), contract_date_end)") Regards, Thomas On Fri, Jul 18, 2014 at 9:52 AM, Jean-Philippe Prade wrote: > Hello > > I am using SQL server for my applica

Re: [h2] "OutOfMemoryError"... What is the best way to Delete alot of rows?

2014-07-19 Thread Thomas Mueller
database. I tested >> with the PageStore version and was impressed with the compression I was >> getting. >> I am however, concerned with the MVStore version trying to store the same >> files. >> >> I can post this question as a new thread if you prefer. >>

Re: [h2] DEFRAG_ALWAYS option

2014-07-23 Thread Thomas Mueller
Hi, You are right, this option is not working with version 1.4.x (with the MVStore). This is a bug, I fixed it in the trunk now. Thanks for reporting! If you want, you can build H2 yourself and test that: https://code.google.com/p/h2database/source/checkout Regards, Thomas On Wed, Jul 23, 2014

Re: [h2] Cannot parse "DATE" constant when using JDBC escape syntax

2014-07-23 Thread Thomas Mueller
Hi, You are right, this is unexpected. I have fixed this now (in the trunk). Regards, Thomas On Mon, Jul 21, 2014 at 6:20 PM, Lukas Eder wrote: > Hello, > > Please consider the following test case: > > try (PreparedStatement s1 = connection.prepareStatement("select 1 where > date '2000-01-01'

Re: [h2] Cannot parse "DATE" constant when using JDBC escape syntax

2014-07-25 Thread Thomas Mueller
Hi, Thanks a lot for reporting the issue! Regards, Thomas On Thu, Jul 24, 2014 at 6:59 AM, Lukas Eder wrote: > Thanks, Thomas! > > Cheers, > Lukas > > Am Mittwoch, 23. Juli 2014 21:01:36 UTC+2 schrieb Thomas Mueller: >> >> Hi, >> >> You are right,

Re: [h2] "USE SCHEMA" not supported in MySQL mode?

2014-07-26 Thread Thomas Mueller
Hi, As far as I can tell, you are the first person to ask for this feature. I think it should be relatively easy to change the parser to support this ("use schema" would just be an alias for "set schema"). Patches are welcome! Regards, Thomas On Sat, Jul 26, 2014 at 1:13 AM, Karl Pietrzak wr

Re: [h2] "USE SCHEMA" not supported in MySQL mode?

2014-07-27 Thread Thomas Mueller
Hi, I can definitely submit a patch, especially if someone can send me the > name of the class/unit test to look at to point me in the right direction. > Yes, that would be the Parser class, method parsePrepared. The statement "use schema x" would be the same as "set schema x" I believe. A simpl

Re: [h2] "USE SCHEMA" not supported in MySQL mode?

2014-07-28 Thread Thomas Mueller
Hi, Thanks! The patch is merged now. Regards, Thomas On Mon, Jul 28, 2014 at 4:39 PM, Karl Pietrzak wrote: > > On Mon, Jul 28, 2014 at 2:10 AM, Thomas Mueller < > thomas.tom.muel...@gmail.com> wrote: > >> Hi, >> >> I can definitely submit a patch, e

Re: [h2] Re: Error using merge on a table that has a column with a default value.

2014-07-28 Thread Thomas Mueller
Hi, > Why is this not accepted? I don't know. Sometimes messages are marked as spam by the Google Group system. Usually I get a notification if that happens and can approve the email. But in this case, I didn't get a notification. Not sure why, maybe it's related to using Nabble.com? ---

Re: [h2] Updating all rows in a table.

2014-07-29 Thread Thomas Mueller
Hi, What about using a joined table "variable_node_2", where you store changes to the default values. At startup, truncate that table. I guess you will get additional ideas if you ask at StackOverflow.com Regards, Thomas On Tuesday, July 29, 2014, Dani Fernandez wrote: > We have a table conta

Re: [h2] Error in 'merge into' for empty table with a column with a default value

2014-07-29 Thread Thomas Mueller
Hi, I'm afraid you need to use MERGE INTO VERSION_NUM (LOCK, VERSION, LOADED_FLAG) VALUES('X', 123,TRUE); > I am using version: 1.3.173 Actually, according to the error code (90081-166) you are using version 1.3.166. Regards, Thomas On Tuesday, July 29, 2014, Dani Fernandez wrote: > Hi all

Re: [h2] org.h2.jdbc.jdbcSQLException - unique index or primary key violation: "sys_id on public.sys(id)" 23505-169

2014-07-29 Thread Thomas Mueller
Hi, I don't know what the problem is, but quite many bugs have been fixed since version 1.3.169 (see the change log). With version 1.3.171 and older: when using local temporary tables and not dropping them manually before closing the session, and then killing the process could result in a databas

Re: [h2] Unique index or primary key violation: "SYS_ID ON PUBLIC.SYS(ID)" [23505-168] (using 1.3.168)

2014-07-29 Thread Thomas Mueller
Hi, I'm afraid you will need to manually edit the SQL script file. > 1.3.160 That's quite old, many bugs have been fixed since then. I suggest to upgrade to a more recent (1.3.x) version. Regards, Thomas On Saturday, July 26, 2014, Sanchand wrote: > Having the same problem any solution to

Re: [h2] Error in 'merge into' for empty table with a column with a default value

2014-07-30 Thread Thomas Mueller
Hi, I'm afraid you need to use MERGE INTO VERSION_NUM (LOCK, VERSION, LOADED_FLAG) VALUES('X', 123,TRUE); > I am using version: 1.3.173 Actually, according to the error code (90081-166) you are using version 1.3.166. Regards, Thomas On Tue, Jul 29, 2014 at 8:25 AM, danielfb wrote: > Hi all,

[h2] Write an output as a text file.

2014-08-04 Thread Thomas Mueller
Hi, You could use a "java.util.Writer" of course, possibly in a user defined function. Or you could still use the CSV tool, but disable the header, put everything in one single column, and use a formula for that column (for example "select 'Customer name ' || name || ' have a salary ' || salary f

[h2] java.lang.RuntimeException: [50000-139]

2014-08-04 Thread Thomas Mueller
Hi, According to the error code, you are using quite an old version of H2 (build 139, which is from 2009 or 2010). I suggest to upgrade to a more recent version. Regards, Thomas On Mon, Aug 4, 2014 at 10:24 AM, Noel Grandin > wrote: > http://h2database.com/html/advanced.html#using_recover_too

[h2] Duplicate records of the table

2014-08-04 Thread Thomas Mueller
Hi, > Is there any way with sql query to do so. Yes, you need to fix the 'insert into ... select' statement, so that the column count matches :-) Regards, Thomas On Mon, Aug 4, 2014 at 1:29 PM, vinay saharan > wrote: > I want to test my application performance for large database so i want

Re: [h2] [MVStore] Rollback after removing a map leaves map empty

2014-08-04 Thread Thomas Mueller
Hi, Hm, this is a tricky problem. I understand one would expect a rollback should restore the data. As for the in-memory case: the roots pages of all maps are currently kept in the map object itself, and removing a map will remove the reference from the store to the map, that means the references

[h2] Write an output as a text file.

2014-08-05 Thread Thomas Mueller
IKE, REGEXP, IS, IN, BETWEEN, AND, OR, >> ,, )"; SQL statement: >> CALL CSVWRITE('nag_log.csv', 'SELECT 'icetea--NagLogApplicationError--' >> || SPOOLER_ID || '--critical--JOB ' || Job_NAME || ' status ERROR at time ' >> || END_TI

[h2] Time is slower because of time zone

2014-08-05 Thread Thomas Mueller
Hi, Sorry, you need to provide some sample code. Regards, Thomas On Tue, Aug 5, 2014 at 12:28 PM, Phamorn Hongsawat > wrote: > I have a problem with time column. In my table has a column named > 'End_Time' record from the program. > > Unfortunately the program can't change the time zone. So t

[h2] H2 Database Engine: New version 1.4.181 available

2014-08-06 Thread Thomas Mueller
Hello, A new version of H2 is available at http://www.h2database.com (you may have to click 'Refresh'). For details, see the 'Change Log' at http://www.h2database.com/html/changelog.html For future plans, see the 'Roadmap' page at http://www.h2database.com/html/roadmap.html P.S. If you reply to

[h2] h2 1.4.181 and Slick 2.1.0

2014-08-11 Thread Thomas Mueller
Hi, I see. The problem is that there was a change in version 1.4.181 with the processing of JDBC escape sequences. This change affected both the parser (which is running on the server) and the JDBC API (which is running on the client). So I'm afraid if you (or a tool you use) use the syntax "{t '}

[h2] weird javadocs

2014-08-11 Thread Thomas Mueller
Hi, I'm quite sure there are people that "miss" the number keypad on those "weird" modern cellphones :-) The terms "weird" and "missing" are relative. I don't "miss" the type hierarchy, and for me, the _default_ javadocs are "weird" :-) If you are looking for JDBC javadocs, see http://docs.oracl

[h2] pageStore: Transaction log could not be truncated - anything to worry about?

2014-08-11 Thread Thomas Mueller
Hi, This message is just to inform that there is probably a long running transaction that was not committed. I'm not quite sure currently whether this message is sometimes logged even if there is no such transaction (meaning that the message is sometimes logged in error). What you should check is

Re: [h2] JdbcConnection default connection in function calls

2014-08-15 Thread Thomas Mueller
Hi, This is documented in http://h2database.com/html/features.html#user_defined_functions See also http://docs.oracle.com/javadb/10.5.1.1/devguide/cdevspecial29620.html Regards, Thomas On Tue, Aug 12, 2014 at 1:30 AM, Brian Craft wrote: > Opening a connection, I get an object like > > JdbcC

Re: [h2] Issue during execution of alter table with driver version 1.4.181 on an existing DB version 1.3.X

2014-08-15 Thread Thomas Mueller
Hi, > or someting is wrong on my side? Yes, I think so. According to the stack trace, you have executed a script that tries to alter a table in a way that is not allowed (convert a column to "timestamp" that already contains values such as "3"). Unfortunately, the statement is not in the .trace

Re: [h2] Re: How to open split .h2 database using java -cp option

2014-08-15 Thread Thomas Mueller
Hi, See also the documentation of the split file system at http://h2database.com/html/advanced.html#file_system_split Regards, Thomas On Thu, Aug 14, 2014 at 6:46 AM, Vineet wrote: > Forgot to mention, > 30 is the split size and that can vary. > > > On Thursday, 14 August 2014 10:15:12 UTC+5:

Re: [h2] Maven shade minimizejar shreds H2 even when configured not to touch H2

2014-08-15 Thread Thomas Mueller
Hi, If you want to ignore the H2 classes, I think you need to use "exclude", not "include". Regards, Thomas On Thu, Aug 14, 2014 at 5:18 PM, Chris Anilao wrote: > Has anybody ever used maven shade's minimize jar feature while using H2? > > Like the documentation >

Re: [h2] BigInt[IDENTITY] field not incrementing correctly

2014-08-16 Thread Thomas Mueller
Hi, Some more detail: numbers are only skipped if the process is killed. Regards Thomas On Saturday, August 16, 2014, Noel Grandin wrote: > You can't is the short answer. > IDENTITY columns and their underling SEQUENCEs are not guaranteed to > always increase by one. > For optimisation reasons

[h2] Version 1.4.181 has changed the temp file location?

2014-08-25 Thread Thomas Mueller
Hi, The newest version of H2 has a new mechanism to compact files (when using "shutdown defrag"), which is creating this type of temp file ("*.db.tempFile"). There is currently no documentation on the files that H2 creates. I guess you need that, right? Regards, Thomas On Mon, Aug 25, 2014 at

Re: [h2] Text comparision case insensitive by default?

2014-08-26 Thread Thomas Mueller
Hi, What is your database URL? And if you run the statement "script nodata", what is the result? Specially the settings and the "create table" statement for this table. Regards, Thomas On Wednesday, August 27, 2014, Michal Zubkowicz wrote: > Nope, it's also in H2 Console. > > W dniu wtorek, 26

Re: [h2] Alternate for SCOPE_IDENTITY()

2014-08-26 Thread Thomas Mueller
Hi, Most likely the problem is not scope_identity. What (other) SQL statements do you run? Regards, Thomas On Wednesday, August 27, 2014, Iyyasamy Murugesan wrote: > Namaskaram, > I am using SCOPE_IDENTITY() for a table, which has more than 25k rows. The > scan count shows very high, while cal

Re: [h2] Re: Off-by-one bug for auto-incremented BIGINT columns?

2014-08-30 Thread Thomas Mueller
Hi, I know what the problem is. readLong will first try to convert 9223372036854775808 to a long (that doesn't work), and then negate it (that would work, but it's too late). One solution is to first negate it, and then convert to a long. See below for a possible patch (not tested). > It seems an

Re: [h2] Why doesn't JdbcConnection implement JDK 7?

2014-09-01 Thread Thomas Mueller
Hi, The default jar file of H2 is compiled for Java 6, not Java 7. To use the JDBC methods that were added in Java 7, you need to compile H2 using Java 7. But please note that many such new methods are not yet supported (for example getSchema). Patches for new JDBC features introduced in Java 7 a

Re: [h2] Roadmap for clustering support

2014-09-01 Thread Thomas Mueller
Hi, Yes, I'd like to implement clustering, but there is no fixed timeline. For high availability, see https://github.com/shesse/h2ha/wiki Regards, Thomas On Tuesday, September 2, 2014, Gili wrote: > Hi, > > A question for Thomas and Noel... > > I've been using H2 for many years but the main

Re: [h2] H2 db getting corrupt on mac

2014-09-02 Thread Thomas Mueller
Hi, If you copy the file while the database is open, then the backup can be corrupt in some cases (it's not so easy to reproduce it). Online backup is supported, but you have to use the "backup" SQL statement (see the documentation for details). In theory the corruption can have other reasons. Wi

Re: [h2] H2 1.4.181 system column _ROWID_ slow with MVSTORE

2014-09-02 Thread Thomas Mueller
Hi, Yes, this is possible. It looks like there is no special test case for this feature, that's why it's not yet implemented for the MVStore. I will fix that. Regards, Thomas On Tuesday, September 2, 2014, Nicolas Fortin (OrbisGIS) < nico.de...@gmail.com> wrote: > Hi, > > Using H2 1.4.181 (20

Re: [h2] Support for BigDecimal extensions

2014-09-03 Thread Thomas Mueller
Hi, Could you tell me more about your use case? Why do you want to use a subclass of BigDecimal, and why can't you use the default BigDecimal? Regards, Thomas On Wednesday, September 3, 2014, Andrea Panattoni < panattoni.and...@gmail.com> wrote: > Hi, > > With revision 4028 the system property

Re: [h2] Offset reserved word

2014-09-03 Thread Thomas Mueller
Hi, You are right, this is not well documented yet, I will fix that. The reason for the change is added support for "select ... fetch first 1 row only" in the regular mode. In version 1.3.x, this was only supported in the DB2, Derby, and PostgreSQL mode. Actually this also applies to "fetch". At l

Re: [h2] Offset reserved word

2014-09-03 Thread Thomas Mueller
Hi, I see Noel already replied, sorry for sending (at least partially) the same info. The reason is that I sometimes prepare & send mails offline, which are then sent later on... so I didn't see Noels email. Regards, Thomas On Wednesday, September 3, 2014, Thomas Mueller < tho

Re: [h2] Improving error message for value out of bounds

2014-09-05 Thread Thomas Mueller
Hi, Adding a star is not so easy as it's not a parsing error, but an execution error. But maybe at least some more data could be added. Could you provide the stack trace? Regards, Thomas On Fri, Sep 5, 2014 at 4:07 AM, Gili wrote: > Hi, > > I'd like to propose improving the following error me

Re: [h2] H2 db getting corrupt on mac

2014-09-05 Thread Thomas Mueller
Hi, > to do a test after the backup and copy to make sure the database can be opened. Testing a backup is a good idea in any case (even for regular backup). However, just opening the database will not detect some types of errors. You would need to do a complete read (for example using "script").

Re: [h2] Performance while doing join

2014-09-05 Thread Thomas Mueller
Hi, This depends on a lot of things (the data, how you join the data,...). Why don't you simply try? Regards, Thomas On Thursday, September 4, 2014, Himanshu Jain wrote: > Hi All, > I have a doubt, Can anybody of you clarify ? > ->I have two tables each having around 1 million records. How muc

Re: [h2] Cannot reference column aliases from expressions in ORDER BY clause

2014-09-06 Thread Thomas Mueller
Hi, One problem is that this would not be backward compatible for some cases, if the select list uses the same identifier names as available in the selected tables. Do you know which databases support it and which don't? Regards, Thomas On Friday, August 22, 2014, Lukas Eder wrote: > Most SQ

Re: [h2] H2 to MySQL / Gerrit

2014-09-06 Thread Thomas Mueller
Hi, So, it is working for H2 but not MySQL. I would probably ask this question at StackOverflow.com, with the tags MySQL, Gerrit, and H2. Regards, Thomas On Thursday, September 4, 2014, Fabien Bagard wrote: > Hi, > > I have a gerrit instance running with an h2 database. > It is time for me to

Re: [h2] Insert in 1.4 is much slower than 1.3

2014-09-06 Thread Thomas Mueller
Hi, Could you please check whether the "select" statement is slower, or the "insert" statement? And would it be possible to check whether "create table newTable as select ..." is fast? I know this is without the indexes. To find out what the problem could be. And last, could you get a few (about

Re: [h2] Wrong results when ORDER BY clause contains correlated scalar subquery

2014-09-06 Thread Thomas Mueller
Hi, For H2, if you run "select x", this is expanded to "select x from dual". Therefore, this "x" is not referring to the outer "x". Could you use: select x from ( select 1 x union select 2 union select 3 ) t order by (select -t.x) asc Regards, Thomas On Friday, August 22, 2014, Lukas Eder w

Re: [h2] H2 db getting corrupt on mac

2014-09-08 Thread Thomas Mueller
>> preparedStatement.setString(1, fileName); >>>> preparedStatement.executeUpdate(); >>>> if (isDebugEnabled) >>>> { >>>> logger.debug("BACKUP TO result completed"); >>

Re: [h2] H2 db getting corrupt on mac

2014-09-08 Thread Thomas Mueller
>> preparedStatement.setString(1, fileName); >>>> preparedStatement.executeUpdate(); >>>> if (isDebugEnabled) >>>> { >>>> logger.debug("BACKUP TO result completed"); >>

Re: [h2] Can huge delete statement execution in H2 cause JVM crash

2014-09-09 Thread Thomas Mueller
Hi, Was there any kind of exception / stack trace? Regards, Thomas On Wednesday, September 10, 2014, Sanchand wrote: > In our project we execute sql files using Runscript.execute method of H2, > during one such execution, there was large number of delete statement for a > particular table in

Re: [h2] Creating index causes wrong results for select with condition on indexed field

2014-09-09 Thread Thomas Mueller
Hi, Yes, I can reproduce this problem. Thanks a lot for reporting! It happens because of the (partially) descending index. It will be fixed in the next release. A workaround is to use version 1.3.x, or (with 1.4.x), don't use descending indexes. Regards, Thomas On Monday, September 8, 2014, Dam

Re: [h2] Corruption errors with new 1.4 branch

2014-09-10 Thread Thomas Mueller
Hi, Do you have a reproducible test case? For version 1.4.x, I was hoping both multi-threaded and MVCC can be supported (even combined). Regards, Thomas On Wednesday, September 10, 2014, Noel Grandin wrote: > MULTI_THREADED is still experimental. > > On 2014-09-10 09:53 AM, Rami Ojares wrote

[h2] Corruption errors with new 1.4 branch

2014-09-10 Thread Thomas Mueller
Hi, Do you have a reproducible test case? Regards, Thomas On Wednesday, September 10, 2014, Noel Grandin > wrote: > MULTI_THREADED is still experimental. > > On 2014-09-10 09:53 AM, Rami Ojares wrote: > >> Hi >> >> I have been using some weeks now the 1.4 branch in my development >> environmen

Re: [h2] CSVREAD feature request: lineSeparator, rowSeparator to be any character

2014-09-10 Thread Thomas Mueller
Hi, I'm sorry, but the lineSeparator option is only used when writing. It is not supported for reading (when reading, a newline / line feed is required; this is hardcoded). I will document this limitation. The rowSeparator is also only used for writing. Actually I will remove the rowSeparator set

<    2   3   4   5   6   7   8   9   10   11   >