Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2
openldap2-client
0007-Recover-on-DB-version-change.dif
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0007-Recover-on-DB-version-change.dif of Package openldap2-client
From 193eec1ad2033b23e5ee6497533b8f4055450d41 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp <rhafer@suse.de> Date: Tue, 5 Oct 2010 14:20:22 +0200 Subject: Recover on DB version change If the libdb Version changed try to recover the database. Note: This will only succeed if only the format of transaction logs changed. diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index ac5a6d5..fea5cb4 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -330,6 +330,13 @@ shm_retry: rc = (bdb->bi_dbenv->open)( bdb->bi_dbenv, dbhome, flags | do_recover, bdb->bi_dbenv_mode ); + if ( rc == DB_VERSION_MISMATCH ) { + Debug( LDAP_DEBUG_ANY, + LDAP_XSTRING(bdb_db_open) ": bdb version change detected " + "trying to recover\n", 0, 0, 0 ); + rc = (bdb->bi_dbenv->open)( bdb->bi_dbenv, dbhome, + flags | DB_RECOVER, bdb->bi_dbenv_mode ); + } if ( rc ) { /* Regular open failed, probably a missing shm environment. * Start over, do a recovery. -- 1.7.7
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor