> > 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.
That was my question exactly. So, to summarize: is the following correct? "If you are using 1.2.129/1.2.30 and you drop a table or index, and you plan to add a new index or table afterwards, you better close the (current) connection that dropped the table/index, otherwise the bug occurs and you might not be able to reopen the database." > > 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. I know about the migration tool. And I think I can rewrite the code to use an URLClassLoader; it doesn't seem to be complicated. It's just that we don't have the time to enhance our update installer right now, and especially don't have the time to regression test the new version. So we better stick with 1.2.128 that does both datebase formats. Thanks for your answers, Dirk. -- 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.
