1.3.172 vs 1.4.199

37 views
Skip to first unread message

Patrice

unread,
Jul 17, 2019, 7:38:29 AM7/17/19
to H2 Database
I have a database managed under h2 1.3.172. I wanted to update with version 1.4.199.
I make a simple SELECT on a table, I disconnect and when reconnecting I get the following error:
Single index violation or primary key: "PRIMARY KEY ON" "" ".PAGE_INDEX"
Unique index or primary key violation: "PRIMARY KEY ON" "" ".PAGE_INDEX"; SQL statement:
ALTER TABLE PUBLIC.LIMES ADD CONSTRAINT PUBLIC.FK_POINT1 FOREIGN KEY (ID_PREMIER_POINT) REFERENCES PUBLIC.POINTS (ID) NOCHECK [23505-199] 23505/23505 (Help)
These same actions in version 1.3.172 do not create any errors.

Evgenij Ryazanov

unread,
Jul 17, 2019, 9:03:20 AM7/17/19
to H2 Database
Hello.

Your version is very old. Automatic upgrade is not always clean.

You need to export your database to SQL with a
SCRIPT TO 'filename.sql'
command using 1.3.172.

After in you can create a new database with 1.4.199 and execute
RUNSCRIPT FROM 'filename.sql'
to populate it with your data.

See also

Note that 1.4.199 uses another storage engine by default, it allows concurrent access from multiple threads and transactions, but it isn't as mature as an old engine. However, you can still use the old storage engine if you wish.

Patrice Henrio

unread,
Jul 17, 2019, 9:24:22 AM7/17/19
to h2-da...@googlegroups.com
Thank you so much. It's working now.
I think I need the 1.4.199 version because in my user program h2 I have several threads that concurently access the database to modify it.

--
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 h2-database...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/677cdf81-c547-4e63-8cac-4e70891b1613%40googlegroups.com.


--
Si vous vous intéressez à l'histoire, vous pouvez parcourir mon site : http://histoiremondiale.net
ou si cette première adresse ne fonctionne pas (maintenance du serveur par exemple) sur http://histoiremondiale.free.fr

Patrice

unread,
Jul 17, 2019, 9:25:26 AM7/17/19
to H2 Database
Thank you so much. It's working now.
I think I need the 1.4.199 version because in my user program h2 I have several threads that concurently access the database to modify it.

Reply all
Reply to author
Forward
0 new messages