IDENTITY COLUMN JUMPING BY 32

2012-10-02 Thread Jashveer Anand
Hi all, H2 is very fast and fantastic to work. I recently upgraded H2 1.3.168. And converted all my auto_increment columns to Identity(). I have tables with identity column and I am using scope_identity() to get the value, since I am using triggers. Some occasions, the identity column

Re: IDENTITY COLUMN JUMPING BY 32

2012-10-02 Thread Ryan How
Hi, I'm pretty sure the reason is because H2 caches the next 32 identity values, so if you close the database and open it again, then it will skip those values. There isn't a guarantee that it always increment by 1. Pretty sure if you roll back transactions then it skips the value also. I'm