Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use PDFILE_VERSION instead of VERSION since its such a common name SE…

…RVER-3671
  • Loading branch information...
commit a1e68969d48bbb47c893870f6428048a602faf90 1 parent 5f7feee
@erh erh authored
Showing with 9 additions and 9 deletions.
  1. +3 −3 db/db.cpp
  2. +3 −3 db/pdfile.h
  3. +2 −2 pch.h
  4. +1 −1  util/version.cpp
View
6 db/db.cpp
@@ -237,8 +237,8 @@ namespace mongo {
static DBDirectClient db;
if ( h->version == 4 && h->versionMinor == 4 ) {
- assert( VERSION == 4 );
- assert( VERSION_MINOR == 5 );
+ assert( PDFILE_VERSION == 4 );
+ assert( PDFILE_VERSION_MINOR == 5 );
list<string> colls = db.getCollectionNames( dbName );
for ( list<string>::iterator i=colls.begin(); i!=colls.end(); i++) {
@@ -290,7 +290,7 @@ namespace mongo {
log() << "****" << endl;
log() << "****" << endl;
log() << "need to upgrade database " << dbName << " with pdfile version " << h->version << "." << h->versionMinor << ", "
- << "new version: " << VERSION << "." << VERSION_MINOR << endl;
+ << "new version: " << PDFILE_VERSION << "." << PDFILE_VERSION_MINOR << endl;
if ( shouldRepairDatabases ) {
// QUESTION: Repair even if file format is higher version than code?
log() << "\t starting upgrade" << endl;
View
6 db/pdfile.h
@@ -366,7 +366,7 @@ namespace mongo {
enum { HeaderSize = 8192 };
- bool isCurrentVersion() const { return ( version == VERSION ) && ( versionMinor == VERSION_MINOR ); }
+ bool isCurrentVersion() const { return ( version == PDFILE_VERSION ) && ( versionMinor == PDFILE_VERSION_MINOR ); }
bool uninitialized() const { return version == 0; }
@@ -379,8 +379,8 @@ namespace mongo {
assert( HeaderSize == 8192 );
DataFileHeader *h = getDur().writing(this);
h->fileLength = filelength;
- h->version = VERSION;
- h->versionMinor = VERSION_MINOR;
+ h->version = PDFILE_VERSION;
+ h->versionMinor = PDFILE_VERSION_MINOR;
h->unused.set( fileno, HeaderSize );
assert( (data-(char*)this) == HeaderSize );
h->unusedLength = fileLength - HeaderSize - 16;
View
4 pch.h
@@ -113,8 +113,8 @@ namespace mongo {
#endif
// pdfile versions
- const int VERSION = 4;
- const int VERSION_MINOR = 5;
+ const int PDFILE_VERSION = 4;
+ const int PDFILE_VERSION_MINOR = 5;
enum ExitCode {
EXIT_CLEAN = 0 ,
View
2  util/version.cpp
@@ -83,7 +83,7 @@ namespace mongo {
string mongodVersion() {
stringstream ss;
- ss << "db version v" << versionString << ", pdfile version " << VERSION << "." << VERSION_MINOR;
+ ss << "db version v" << versionString << ", pdfile version " << PDFILE_VERSION << "." << PDFILE_VERSION_MINOR;
return ss.str();
}
Please sign in to comment.
Something went wrong with that request. Please try again.