?revision_form?Rev ?revision_input??revision_submit??revision_endform?
Rev 47 |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
--- a/lib/mydb_db3.c
+++ b/lib/mydb_db3.c
@@ -208,7 +208,11 @@ static int init(const char *dbdir, int m
if (!(r = myinit(dbdir, myflags)))
return(0);
- if (r != ENOENT) {
+ if (r != ENOENT
+#ifdef DB_VERSION_MISMATCH
+ && r != DB_VERSION_MISMATCH
+#endif
+ ) {
log_panic("DBERROR: dbenv->open '%s' failed: %s", dbdir, db_strerror(r));
return MYDB_IOERROR;
}
@@ -217,7 +217,7 @@ static int init(const char *dbdir, int m
/* DPC 24/03/2002. DB_CREATE leaks 12 MBytes into dbenv.
* Workaround: close down dbenv, reopen after backing files created */
- r = myinit(dbdir, myflags|MYDB_CREATE);
+ r = myinit(dbdir, myflags|MYDB_CREATE|MYDB_RECOVER);
if (r) {
log_panic("DBERROR: dbenv->open '%s' failed: %s", dbdir, db_strerror(r));
return MYDB_IOERROR;