Re: REFERENTIAL_INTEGRITY FALSE

2010-07-15 Thread Zvonimir Maric
Hi Thomas, This is not a big problem. Problem is actual only if you want to delete *ALL* rows from table, it such case usage of TRUNCATE table_name have some advantages (probably ?) compared to DELETE FROM table_name. Regards, Zvonko -- You received this message because you are subscribed to th

H2 doesn't create a DB file

2010-07-15 Thread Aaron Digulla
Hi, I have a really odd behavior. Today, H2 suddenly stopped creating DB files when I run the tests. The URL to connect is: jdbc:h2:file:~/tmp/h2/test;FILE_LOCK=FILE I see "test.lock.db" in ~/tmp/h2/test but no "test.h2.db". What is doing on??? Regards, -- Aaron Digulla -- You received this

Re: "Unique index or primary key violation" for unknown constraint

2010-07-15 Thread Peter
Hi! It seems to me that a mapping of: @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; and changing the config to the new generators in hibernate.cfg.xml: true // http://docs.jboss.org/hibernate/core/3.3/reference/en/html/mapping.html#mapping-declaration-id-enhanced solve my

Re: "Unique index or primary key violation" for unknown constraint

2010-07-15 Thread Thomas Mueller
Hi, > @GeneratedValue(strategy = GenerationType.TABLE) This seems to be a relatively common problem (at least I found others get similar problems by doing a Google search). > But why a different message occur for other ('normal') cases? > Is it different because the primary key (MYTABLE.ID) inst

Re: java.lang.IllegalArgumentException using H2 in JBoss Messaging

2010-07-15 Thread Borja
Hi, As I've said, we're using the DB through JBoss messaging. We have several queues (each one with their own tables), but all in the same DB file. Maybe there's a problem of concurrence due to multiple threads? Is there any way for me to check this or gather more info about how H2 is being used b

Re: H2 doesn't create a DB file

2010-07-15 Thread Aaron Digulla
> I see "test.lock.db" in ~/tmp/h2/test but no "test.h2.db". What is > doing on??? Sorry, PEBKAC :-) -- Aaron Digulla -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to h2-datab...@googlegroups.com. To unsubscr

Re: H2 not shutting down properly in mixed mode

2010-07-15 Thread Thomas Mueller
Hi, Did you read the documentation at http://h2database.com/html/features.html#connection_modes and http://h2database.com/html/features.html#database_url ? > I can't seem to get > it to shutdown cleanly You could try executing the SQL statement "SHUTDOWN", but my guess is that this is not the pr

Re: building up a schema

2010-07-15 Thread Thomas Mueller
Hi, I'm sorry, I don't understand what you want to do exactly. Do you want to copy a schema to a new name? > Is there a way to add an additional column based on > whether or not it is already there? There are constructs such as "IF EXISTS" for some commands, but not all of them. The complete gra

Re: Batch update returned unexpected row count from update

2010-07-15 Thread Thomas Mueller
Hi, Could you try to create a simple, standalone test case so the problem can be reproduce? If that's too complicated, please append ;TRACE_LEVEL_FILE=3 to the database URL, create a new database (that's important), run your application until you get the exception, and post the .trace.db file (ple

Re: h2 "small jar" fails with "java.lang.NoClassDefFoundError: org/h2/tools/CompressTool"

2010-07-15 Thread Thomas Mueller
Hi, Thanks for the report! I will add the class org.h2.tools.CompressTool to the "small jar" distribution. Regards, Thomas On Tue, Jul 13, 2010 at 11:28 PM, Joel Carranza wrote: > We are testin an upgrade from h2 1.1 to 1.2. > > We run into some problems when using the "small jar distribution"

Automatic database upgrade from non page store

2010-07-15 Thread Duvel
Hello, I was pleased to see this new feature in the latest release, because we were expecting a few migration problems with the release of our new version, where we did incorporate a new H2 driver. We use H2 as an easy intermediate database between our product and other products. We should have ha

Re: jdk 1.2.0_18 - 1.6.0_20 jre bugs. Appears fixed in 1.6.0_21.

2010-07-15 Thread Thomas Mueller
Hi, You are right, the current code is not efficient. Instead, I will use: sql = replaceAll(sql, "*/", "++/"); sql = replaceAll(sql, "/*", "/++"); This is quite a bit faster than String.replaceAll. Regards, Thomas -- You received this message because you are subscribed to the Google Groups "H

Re: Hierarchical Queries

2010-07-15 Thread Thomas Mueller
Hi, Currently it's not supported, but I am working on it. The plan is to support ANSI SQL standard 'common table expression'. The syntax is a bit strange: with recursive t(n) as (select 1 union all select n+1 from t where n<10) select * from t; -- returns 1 .. 10 with recursive t(n) as (select 1

Re: Automatic database upgrade from non page store

2010-07-15 Thread Thotheolh
Could you post your JDBC connection url ? According to the Error Analyzer provided on the H2 website: DATABASE_NOT_FOUND_1 = 90013 The error with code 90013 is thrown when trying to open a database that does not exist using the flag IFEXISTS=TRUE, or when trying to access a database object with a

Very slow startup with a 9GB database

2010-07-15 Thread Duncan Mak
Hello, I'm in the middle of evaluating H2 (running the latest release) and did a test with 4 million entries. My table schema looks like this: create table PUBLIC.MARKUP ( ID integer generated by default as identity primary key PROCESS_ID integer not null X integer not null Y integer not null Z i

Re: Automatic database upgrade from non page store

2010-07-15 Thread Christian Peter
Hi, Thotheolh is right, we need the connection url. Additionally, we need to know which databases and files are present. Thanks Christian On Jul 16, 2:19 am, Thotheolh wrote: > Could you post your JDBC connection url ? > According to the Error Analyzer provided on the H2 website: > > DATABASE_