]> git.sur5r.net Git - openldap/commitdiff
Fix typo, add Truncate support
authorHoward Chu <hyc@openldap.org>
Thu, 21 Apr 2005 19:46:47 +0000 (19:46 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 21 Apr 2005 19:46:47 +0000 (19:46 +0000)
servers/slapd/back-bdb/config.c
servers/slapd/back-bdb/dbcache.c

index be86835e4dd57420082f29c077f02ee3ddd9ed1b..776545de1b11f415232a08599bd060597e8f78ce 100644 (file)
@@ -226,7 +226,7 @@ bdb_online_index( void *ctx, void *arg )
                                continue;
                        }
                        if ( rc == DB_NOTFOUND ) {
-                               id++
+                               id++;
                                getnext = 1;
                                continue;
                        }
index 3885b4c09a0e828db6ffc86cd776deacec7e95b5..faf1d3d1594872a31aef4b2baad1144ecef2a318 100644 (file)
@@ -124,6 +124,11 @@ bdb_db_cache(
        if ( !( slapMode & SLAP_TOOL_QUICK ))
                flags |= DB_AUTO_COMMIT;
 #endif
+       /* Cannot Truncate when Transactions are in use */
+       if ( (slapMode & (SLAP_TOOL_QUICK|SLAP_TRUNCATE_MODE)) ==
+               (SLAP_TOOL_QUICK|SLAP_TRUNCATE_MODE))
+                       flags |= DB_TRUNCATE;
+
        rc = DB_OPEN( db->bdi_db,
                file, NULL /* name */,
                BDB_INDEXTYPE, bdb->bi_db_opflags | flags, bdb->bi_dbenv_mode );