summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2014-05-20 13:53:48 -0400
committerMathias Stearn <mathias@10gen.com>2014-05-20 19:02:25 -0400
commit06bf11f51421f40f8bfe9c9de9b5422673291c28 (patch)
tree4c9d2441366aba1d2c2655eb09e5cc2fcd333add
parent6ab3105129a0e2d0192a8333bf23c2380c879bd1 (diff)
downloadmongo-06bf11f51421f40f8bfe9c9de9b5422673291c28.tar.gz
SERVER-13635 Remove Database::_magic
-rw-r--r--src/mongo/db/catalog/database.cpp2
-rw-r--r--src/mongo/db/catalog/database.h7
-rw-r--r--src/mongo/db/client.cpp1
3 files changed, 0 insertions, 10 deletions
diff --git a/src/mongo/db/catalog/database.cpp b/src/mongo/db/catalog/database.cpp
index 3af055c941b..d64ad95efc8 100644
--- a/src/mongo/db/catalog/database.cpp
+++ b/src/mongo/db/catalog/database.cpp
@@ -155,7 +155,6 @@ namespace mongo {
Database::~Database() {
verify( Lock::isW() );
- _magic = 0;
for ( CollectionMap::const_iterator i = _collections.begin(); i != _collections.end(); ++i )
delete i->second;
@@ -211,7 +210,6 @@ namespace mongo {
}
_profile = serverGlobalParams.defaultProfile;
- _magic = 781231;
newDb = !_dbEntry->exists();
}
diff --git a/src/mongo/db/catalog/database.h b/src/mongo/db/catalog/database.h
index 02f6e3afe21..69a35a41ad0 100644
--- a/src/mongo/db/catalog/database.h
+++ b/src/mongo/db/catalog/database.h
@@ -117,11 +117,6 @@ namespace mongo {
void clearTmpCollections(OperationContext* txn);
- /**
- * tries to make sure that this hasn't been deleted
- */
- bool isOk() const { return _magic == 781231; }
-
bool isEmpty() const;
/**
@@ -247,8 +242,6 @@ namespace mongo {
int _profile; // 0=off.
- int _magic; // used for making sure the object is still loaded in memory
-
// TODO: make sure deletes go through
// this in some ways is a dupe of _namespaceIndex
// but it points to a much more useful data structure
diff --git a/src/mongo/db/client.cpp b/src/mongo/db/client.cpp
index f3ee2c0381c..f3bf5e3526d 100644
--- a/src/mongo/db/client.cpp
+++ b/src/mongo/db/client.cpp
@@ -173,7 +173,6 @@ namespace mongo {
_ns( ns ),
_db(db)
{
- verify( db == 0 || db->isOk() );
_client->_context = this;
}