On 1 Mar 2013, at 08:31, Benny Malengier wrote:

2013/2/28 Tim Lyons <guy.linton@gmail.com>

Just look at http://www.gramps-project.org/bugs/view.php?id=5311 for a long
list of bsddb problems (yes, I know they will be due to different things,
and some of them may even be fixed). For a recent problem, look at
http://www.gramps-project.org/bugs/view.php?id=6483 which I raised just the
other day!

This is a serious bug. Before bsddb is allowed to upgrade, user should approve it. Clearly using -L does this silently, which should not be allowed.
However, this is easy to fix. Put it on the 4.0.0 roadmap. 

Otherwise, in Gramps proper, what normal user will run, he obtains a dialog: "family tree must be upgraded ...." so he is warned.

I don't think so! The Family Tree must be upgraded warning is for upgrading the schema version (AIUI).

I think upgrading the bdsdb version happens automatically and silently (or not at all).

 If a database was touched by a more recent version of bsddb, an export to xml in .gramps and then import in old version works just fine.
You should not panick,  "If anything goes wrong, they are completely lost", will not happen. Gramps works, so if the database was upgraded then Gramps can export it to .gramps.

I don't think this is true. The silent upgrade that happens with -L causes most of my test trees to fail later with 'unable to find environment' (more or less irrespective of which version of the programs I try - in most of my tests I only have one version of bsddb that I have been using for years)

I don't think the bsddb calls can tell whether the bsddb version is different before it corrupts it.

Now that we have the bdbversion.txt file, I think we should rely on it, and only let the user touch a database with a different bsddb version after multiple warnings. Of course really old databases will have no file. At the moment that causes the code to assume that the version is OK!!