Hi,

> We are using 1.2.128 and we are encounting the bug that has been fixed
> in 1.2.131:
>
> "In versions 1.2.129 and 1.2.130, a database could not be opened
> sometimes after dropping tables or indexes, and then creating new
> indexes for existing tables. The exception contained the text "parent
> not found" (version 1.2.129) or "Table not found" (version 1.2.130)."
>
> Could you please explain how the error emerges and whether there is a
> way to work around this?

I don't understand what you mean with "how the error emerges". The
workaround is to not creating indexes / tables after dropping them.

> E.g. will the error still occur if the
> dropping of tables and creation of new indexes happens in two separate
> transactions, or does it help to close the database in between?

Yes. Dropping / creating database objects commits a transaction in H2
currently, but that's unrelated to this problem.

> (PS: Alas we cannot simply update to a newer version; we're forced to
> stick with 1.2.128 because we have customers with older installations
> including h2-1.1.118 and we need the updateability of 1.2.128.)

There is a migration tool. See also the change log, version 1.2.130:
"A tool to migrate an old database from the non-page store format to
the newest version has been added in
src/tools/org/h2/dev/util/Migrate.java. This file is not included in
the jar file currently." This tool downloads the h2-1.2.127.jar from
the internet, runs the old "org.h2.tools.Script" as a separate
process, and then creates a new database from the SQL script. Instead
of running as a separate process it might be better to use separate
class loader (see TestOldVersion on how to do that). I forgot why the
migration tool doesn't use an URLClassLoader as well. Please tell me
if are interested in an improved migration tool.

Regards,
Thomas

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to