File tree Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -484,13 +484,11 @@ void BerkeleyEnvironment::ReloadDbEnv()
484
484
Open (true );
485
485
}
486
486
487
- bool BerkeleyBatch ::Rewrite (BerkeleyDatabase& database, const char * pszSkip)
487
+ bool BerkeleyDatabase ::Rewrite (const char * pszSkip)
488
488
{
489
- if (database. IsDummy ()) {
489
+ if (IsDummy ()) {
490
490
return true ;
491
491
}
492
- BerkeleyEnvironment *env = database.env .get ();
493
- const std::string& strFile = database.strFile ;
494
492
while (true ) {
495
493
{
496
494
LOCK (cs_db);
@@ -504,7 +502,7 @@ bool BerkeleyBatch::Rewrite(BerkeleyDatabase& database, const char* pszSkip)
504
502
LogPrintf (" BerkeleyBatch::Rewrite: Rewriting %s...\n " , strFile);
505
503
std::string strFileRes = strFile + " .rewrite" ;
506
504
{ // surround usage of db with extra {}
507
- BerkeleyBatch db (database , " r" );
505
+ BerkeleyBatch db (* this , " r" );
508
506
std::unique_ptr<Db> pdbCopy = MakeUnique<Db>(env->dbenv .get (), 0 );
509
507
510
508
int ret = pdbCopy->open (nullptr , // Txn pointer
@@ -654,11 +652,6 @@ bool BerkeleyDatabase::PeriodicFlush()
654
652
return ret;
655
653
}
656
654
657
- bool BerkeleyDatabase::Rewrite (const char * pszSkip)
658
- {
659
- return BerkeleyBatch::Rewrite (*this , pszSkip);
660
- }
661
-
662
655
bool BerkeleyDatabase::Backup (const std::string& strDest) const
663
656
{
664
657
if (IsDummy ()) {
Original file line number Diff line number Diff line change @@ -287,8 +287,6 @@ class BerkeleyBatch
287
287
bool TxnBegin ();
288
288
bool TxnCommit ();
289
289
bool TxnAbort ();
290
-
291
- bool static Rewrite (BerkeleyDatabase& database, const char * pszSkip = nullptr );
292
290
};
293
291
294
292
std::string BerkeleyDatabaseVersion ();
You can’t perform that action at this time.
0 commit comments