Re: Automatically compact databases from time to time (as a background process)

2012-02-27 Thread IntensiveH2
Any news regarding my issue? The last status was: - command compact works but closes all current connection - I tried "TRANSACTION_TIMEOUT" = 33554432 but I have issue. - I tried code with TRANSACTION_START but WHERE TRANSACTION_START IS NOT NULL returns nothing. On 23 fév, 10:56, IntensiveH2 wr

Re: Using "ALTER TABLE ADD..." to add multiple columns

2012-02-27 Thread Noel Grandin
Hi Steve Thanks for the patch. Please can you: (1) Resend this patch as an attachment, the mailer seems to have corrupted the whitespace and broken lines in some places, which makes it tricky to apply. (2) Cconfirm that you are contributing this patch under the terms of the H2 license. htt

Re: Check constraints not available in information_schema.constraints

2012-02-27 Thread Noel Grandin
Those are table constraints. For column constraints, do this: select * from information_schema.columns WHERE TABLE_NAME = 'CHECK_TEST' On 2012-02-27 01:33, Shammat wrote: CREATE TABLE check_test ( id INTEGER NOT NULL PRIMARY KEY, some_value INTEGER NOT NULL CHECK (some_value>

Referential integrity constraint violation with Hibernate and @ManyToMany mapping (doesn't happen in MySQL)

2012-02-27 Thread Eugen Paraschiv
Hi, I'm working with the following: h2 - 1.3.164 Hibernate - 4.1.0.Final I have a Role entity: @Entity public class Role implements IEntity{ @Id @GeneratedValue( strategy = GenerationType.AUTO ) @Column( name = "ROLE_ID" ) private Long id; @ManyToMany( fetch = FetchType.EAGER

Re: Referential integrity constraint violation with Hibernate and @ManyToMany mapping (doesn't happen in MySQL)

2012-02-27 Thread Noel Grandin
please - turn on hibernate's tracing (or H2's tracing) - get the raw SQL calls - reproduce the problem using raw SQL than we should be able to help you further. On 2012-02-27 13:43, Eugen Paraschiv wrote: Hi, I'm working with the following: h2 - 1.3.164 Hibernate - 4.1.0.Final I have a Role e

Re: Using "ALTER TABLE ADD..." to add multiple columns

2012-02-27 Thread Noel Grandin
Thanks, patch committed. On 2012-02-27 17:14, Steve McLeod wrote: Hi Noel, The patch is attached. I wrote the code, it's mine, and I'm contributing it to H2 for distribution multiple-licensed under the H2 License, version 1.0, and under the Eclipse Public License, version 1.0 (http://h2data

Substr gives incorrect results when start_position is a negative number

2012-02-27 Thread Vinod
Query: select substr('TechOnTheNet', -3, 3) from dual Expected Output: Net Actual Output: Tec To make this work, I 1. implemented my own function, registered it(create alias substrXX.) with name substrXX 2. Then before executing a query, replaced all the substr with substrXX Had to register i

Re: Check constraints not available in information_schema.constraints

2012-02-27 Thread Shammat
Thanks for the answer. Actually it seems that when using alter table check_test add constraint positive_value CHECK (some_value > 0) that will be recorded in information_schema.constraints whereas an "inline" check constraint will be recorded in information_schema.columns Is this intended?

Re: Check constraints not available in information_schema.constraints

2012-02-27 Thread Rami Ojares
> Is this intended? I can not say whether it is but I suppose it is understandable. The reason is of course that there is no clear line between what is column definition and what is a constraint. Often the type of column is considered to be part of column definition. But is limiting the range o