bitcoin/bitcoin — pull request #2558 by sipa (2013-04-23 22:48:49+00:00)
Title: Some database/-related recovery improvements

* After clean shutdown, delete the database/ subdir. This means upgrading/changing the BDB dir won't kill you anymore because of incompatible logs.
* In case opening the database environment fails, move database/ to database.$TIMESTAMP.bak, and try again.
* Do not advise the user to nuke his datadir anymore - there's no point in doing so (closes #2488).
* Drop double opening of the environment (includes #2333).