Apache OpenOffice (AOO) Bugzilla – Issue 55496
embedded databases are prone to data loss
Last modified: 2013-08-07 15:45:41 UTC
Embedded (HSQLDB) databases are prone to data loss in case of abnormal terminations of the OOo process. That is, if you write data into a database (by UI or by scripting), this data is not immediately commited to the database (the .odb) file, but still stored in some temporary location. If now OOo terminates (crashs, or is killed) abnormally, then this data is lost - not even the document recovery which (perhaps) offers to restore the database upon next start does catch the data. This is certainly undesired behavior for a database. While it's difficult to fix this with our current approach, where the data is just some sub-streams in a ZIP package, we need to somehow address this. I fear this might in fact only be possible with a package format (replacing the ZIP package format for this purpose) which allows O(1) random access to all of its parts. For the record: We tried to relax the situation for OOo 2.0.1 with fixing issue 55493: we introduced a few places where the changes in the DB data are synced back to the .odb file. They're (hopefully) often enough to significantly reduce the chance for a data loss, and seldom enough to be seriously noticed. Nevertheless, this is not really a final solution.
For the time being it would be helpful to know the "places where the changes in the DB data are synced back to the .odb file". That way one might be able to secure one´s data without shutting OOo down. Fabian
This is basically every time you release a connection in the data source browser (the thingie you get with "F4" in the other apps), and when you close a table or query view.
Additional note: If you want to programmatically want to sync back the changes, call XFlushable::flush at a connection object.
This may help some OO users: http://www.oooforum.org/forum/viewtopic.phtml?t=43786&start=15