Checking if I can change the sequence cache by updating the 
information_schema table, in 171. Doesn't seem to work:

update information_schema.sequences set cache = 2001 where 
sequence_name='SYSTEM_SEQUENCE_91459F04_54A2_41A6_8BA7_FF4BBFF4EFBD'

throws this error:

JdbcSQLException Feature not supported: "META";



On Wednesday, May 28, 2014 5:50:12 PM UTC-7, Brian Craft wrote:
>
> I updated from 1.3.171 to 1.3.176 to pick up the "alter sequence .. cache" 
> command. After changing the cache, on the next start of the app h2 is 
> unable to connect to the db. It fills the trace file with this:
>
> 05-28 17:27:33 database: ALTER TABLE PUBLIC.PROBES ADD CONSTRAINT 
> PUBLIC.CONSTRAINT_8D2C2 FOREIGN KEY(EID) REFERENCES PUBLIC.EXPERIMENTS(ID) 
> NOCHECK
> org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: 
> "PRIMARY KEY ON """".PAGE_INDEX"; SQL statement:
> ALTER TABLE PUBLIC.PROBES ADD CONSTRAINT PUBLIC.CONSTRAINT_8D2C2 FOREIGN 
> KEY(EID) REFERENCES PUBLIC.EXPERIMENTS(ID) NOCHECK [23505-176]
> 05-28 17:27:33 database: ALTER TABLE PUBLIC.PROBES ADD CONSTRAINT 
> PUBLIC.CONSTRAINT_8D2C2 FOREIGN KEY(EID) REFERENCES PUBLIC.EXPERIMENTS(ID) 
> NOCHECK
> org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: 
> "PRIMARY KEY ON """".PAGE_INDEX"; SQL statement:
> ALTER TABLE PUBLIC.PROBES ADD CONSTRAINT PUBLIC.CONSTRAINT_8D2C2 FOREIGN 
> KEY(EID) REFERENCES PUBLIC.EXPERIMENTS(ID) NOCHECK [23505-176]
>
> and so on for several pages.
>
> Backing off to 171 allows it to connect again.
>
> Not sure where to go from here. 
>
> On Wednesday, May 28, 2014 3:13:46 PM UTC-7, Brian Craft wrote:
>>
>> How can I set the cache for a primary key sequence? I haven't found a way 
>> to specify the cache when creating the column. Also haven't found a way to 
>> specify the sequence for the column, so I can't create the sequence with 
>> the right cache and then create a column that uses it.
>>
>> Also, the "alter sequence .. cache" command isn't working. I suspect it 
>> is a recent addition. I will try updating.
>>
>>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to