mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-02-11 13:50:39 +08:00
Import ldif2ldbm 'no write sync' change...
This commit is contained in:
parent
b0aa92b3a0
commit
2a8a77ec29
@ -61,6 +61,7 @@ main( int argc, char **argv )
|
||||
ID id;
|
||||
struct dbcache *db, *db2;
|
||||
Backend *be = NULL;
|
||||
struct ldbminfo *li;
|
||||
struct berval bv;
|
||||
struct berval *vals[2];
|
||||
Avlnode *avltypes = NULL;
|
||||
@ -127,6 +128,10 @@ main( int argc, char **argv )
|
||||
}
|
||||
be = &backends[dbnum];
|
||||
|
||||
/* disable write sync'ing */
|
||||
li = (struct ldbminfo *) be->be_private;
|
||||
li->li_dbcachewsync = 0;
|
||||
|
||||
/*
|
||||
* first, make the dn2id index
|
||||
*/
|
||||
|
@ -56,7 +56,8 @@ main( int argc, char **argv )
|
||||
int dbnum;
|
||||
ID id;
|
||||
struct dbcache *db;
|
||||
Backend *be;
|
||||
Backend *be = NULL;
|
||||
struct ldbminfo *li;
|
||||
struct berval bv;
|
||||
struct berval *vals[2];
|
||||
Avlnode *avltypes = NULL;
|
||||
@ -124,6 +125,10 @@ main( int argc, char **argv )
|
||||
}
|
||||
be = &backends[dbnum];
|
||||
|
||||
/* disable write sync'ing */
|
||||
li = (struct ldbminfo *) be->be_private;
|
||||
li->li_dbcachewsync = 0;
|
||||
|
||||
if ( (db = ldbm_cache_open( be, "id2entry", LDBM_SUFFIX, LDBM_NEWDB ))
|
||||
== NULL ) {
|
||||
perror( "id2entry file" );
|
||||
|
@ -58,6 +58,7 @@ main( int argc, char **argv )
|
||||
int dbnum;
|
||||
unsigned long id;
|
||||
Backend *be = NULL;
|
||||
struct ldbminfo *li;
|
||||
struct berval bv;
|
||||
struct berval *vals[2];
|
||||
|
||||
@ -121,6 +122,10 @@ main( int argc, char **argv )
|
||||
}
|
||||
be = &backends[dbnum];
|
||||
|
||||
/* disable write sync'ing */
|
||||
li = (struct ldbminfo *) be->be_private;
|
||||
li->li_dbcachewsync = 0;
|
||||
|
||||
attr_masks( be->be_private, attr, &indexmask, &syntaxmask );
|
||||
if ( indexmask == 0 ) {
|
||||
exit( 0 );
|
||||
|
@ -70,6 +70,7 @@ main( int argc, char **argv )
|
||||
int dbnum;
|
||||
ID id;
|
||||
Backend *be = NULL;
|
||||
struct ldbminfo *li;
|
||||
struct berval bv;
|
||||
struct berval *vals[2];
|
||||
Avlnode *avltypes = NULL;
|
||||
@ -146,6 +147,10 @@ main( int argc, char **argv )
|
||||
}
|
||||
be = &backends[dbnum];
|
||||
|
||||
/* disable write sync'ing */
|
||||
li = (struct ldbminfo *) be->be_private;
|
||||
li->li_dbcachewsync = 0;
|
||||
|
||||
/*
|
||||
* generate the id2entry index
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user