(root)/trunk/debian/patches/repair_ssl_session_db_on_version_mismatch.patch @ 31 - Rev 30
?revision_form?Rev ?revision_input??revision_submit??revision_endform?
Blame |
Last modification |
View Log
| RSS feed
--- a/lib/mydb_db3.c
+++ b/lib/mydb_db3.c
@@ -208,7 +208,7 @@ static int init(const char *dbdir, int m
if (!(r = myinit(dbdir, myflags)))
return(0);
- if (r != ENOENT) {
+ if (r != ENOENT && r != DB_VERSION_MISMATCH) {
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;