summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/storage')
-rw-r--r--src/mongo/db/storage/in_memory/in_memory_btree_impl.cpp2
-rw-r--r--src/mongo/db/storage/key_string.cpp2
-rw-r--r--src/mongo/db/storage/key_string_test.cpp1
-rw-r--r--src/mongo/db/storage/kv/kv_catalog.cpp1
-rw-r--r--src/mongo/db/storage/kv/kv_collection_catalog_entry.cpp3
-rw-r--r--src/mongo/db/storage/kv/kv_database_catalog_entry.cpp4
-rw-r--r--src/mongo/db/storage/kv/kv_engine_test_harness.cpp1
-rw-r--r--src/mongo/db/storage/kv/kv_storage_engine.cpp3
-rw-r--r--src/mongo/db/storage/mmap_v1/aligned_builder.cpp2
-rw-r--r--src/mongo/db/storage/mmap_v1/btree/btree_interface.cpp2
-rw-r--r--src/mongo/db/storage/mmap_v1/btree/btree_interface_test.cpp2
-rw-r--r--src/mongo/db/storage/mmap_v1/btree/btree_logic.cpp10
-rw-r--r--src/mongo/db/storage/mmap_v1/btree/btree_logic_test.cpp2
-rw-r--r--src/mongo/db/storage/mmap_v1/btree/btree_test_help.cpp2
-rw-r--r--src/mongo/db/storage/mmap_v1/btree/key.cpp4
-rw-r--r--src/mongo/db/storage/mmap_v1/catalog/namespace_details_collection_entry.cpp3
-rw-r--r--src/mongo/db/storage/mmap_v1/catalog/namespace_details_rsv1_metadata.cpp1
-rw-r--r--src/mongo/db/storage/mmap_v1/catalog/namespace_index.cpp4
-rw-r--r--src/mongo/db/storage/mmap_v1/catalog/namespace_test.cpp2
-rw-r--r--src/mongo/db/storage/mmap_v1/data_file.cpp3
-rw-r--r--src/mongo/db/storage/mmap_v1/data_file_sync.cpp2
-rw-r--r--src/mongo/db/storage/mmap_v1/dur.cpp10
-rw-r--r--src/mongo/db/storage/mmap_v1/dur_commitjob.cpp3
-rw-r--r--src/mongo/db/storage/mmap_v1/dur_journal.cpp5
-rw-r--r--src/mongo/db/storage/mmap_v1/dur_preplogbuffer.cpp6
-rw-r--r--src/mongo/db/storage/mmap_v1/dur_recover.cpp11
-rw-r--r--src/mongo/db/storage/mmap_v1/dur_writetodatafiles.cpp2
-rw-r--r--src/mongo/db/storage/mmap_v1/durable_mapped_file.cpp6
-rw-r--r--src/mongo/db/storage/mmap_v1/durop.cpp2
-rw-r--r--src/mongo/db/storage/mmap_v1/extent.cpp4
-rw-r--r--src/mongo/db/storage/mmap_v1/journal_latency_test_cmd.cpp5
-rw-r--r--src/mongo/db/storage/mmap_v1/mmap_v1_database_catalog_entry.cpp1
-rw-r--r--src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp6
-rw-r--r--src/mongo/db/storage/mmap_v1/mmap_v1_extent_manager.cpp6
-rw-r--r--src/mongo/db/storage/mmap_v1/record_store_v1_base.cpp2
-rw-r--r--src/mongo/db/storage/mmap_v1/record_store_v1_capped.cpp5
-rw-r--r--src/mongo/db/storage/mmap_v1/record_store_v1_capped_test.cpp3
-rw-r--r--src/mongo/db/storage/mmap_v1/record_store_v1_repair_iterator.cpp2
-rw-r--r--src/mongo/db/storage/mmap_v1/record_store_v1_simple.cpp5
-rw-r--r--src/mongo/db/storage/mmap_v1/record_store_v1_simple_test.cpp3
-rw-r--r--src/mongo/db/storage/mmap_v1/record_store_v1_test_help.cpp2
-rw-r--r--src/mongo/db/storage/mmap_v1/repair_database.cpp5
-rw-r--r--src/mongo/db/storage/record_store_test_docwriter.h2
-rw-r--r--src/mongo/db/storage/record_store_test_harness.cpp1
-rw-r--r--src/mongo/db/storage/record_store_test_updaterecord.h2
-rw-r--r--src/mongo/db/storage/record_store_test_validate.h4
-rw-r--r--src/mongo/db/storage/sorted_data_interface_test_cursor_advanceto.cpp1
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp4
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_index_test.cpp2
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp3
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_parameters.cpp2
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp1
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_size_storer.cpp2
53 files changed, 163 insertions, 11 deletions
diff --git a/src/mongo/db/storage/in_memory/in_memory_btree_impl.cpp b/src/mongo/db/storage/in_memory/in_memory_btree_impl.cpp
index 3260b9ab391..ea303575bf5 100644
--- a/src/mongo/db/storage/in_memory/in_memory_btree_impl.cpp
+++ b/src/mongo/db/storage/in_memory/in_memory_btree_impl.cpp
@@ -44,6 +44,8 @@
namespace mongo {
using boost::shared_ptr;
+ using std::string;
+ using std::vector;
namespace {
diff --git a/src/mongo/db/storage/key_string.cpp b/src/mongo/db/storage/key_string.cpp
index 4089525cb3c..381d7795abf 100644
--- a/src/mongo/db/storage/key_string.cpp
+++ b/src/mongo/db/storage/key_string.cpp
@@ -44,6 +44,8 @@
namespace mongo {
+ using std::string;
+
namespace {
typedef KeyString::TypeBits TypeBits;
diff --git a/src/mongo/db/storage/key_string_test.cpp b/src/mongo/db/storage/key_string_test.cpp
index ed5d7c7f4a1..f132645703a 100644
--- a/src/mongo/db/storage/key_string_test.cpp
+++ b/src/mongo/db/storage/key_string_test.cpp
@@ -36,6 +36,7 @@
#include "mongo/util/hex.h"
#include "mongo/util/log.h"
+using std::string;
using namespace mongo;
BSONObj toBson(const KeyString& ks, Ordering ord) {
diff --git a/src/mongo/db/storage/kv/kv_catalog.cpp b/src/mongo/db/storage/kv/kv_catalog.cpp
index 3f5c4c85be3..81490a90e80 100644
--- a/src/mongo/db/storage/kv/kv_catalog.cpp
+++ b/src/mongo/db/storage/kv/kv_catalog.cpp
@@ -54,6 +54,7 @@ namespace {
}
using boost::scoped_ptr;
+ using std::string;
class KVCatalog::AddIdentChange : public RecoveryUnit::Change {
public:
diff --git a/src/mongo/db/storage/kv/kv_collection_catalog_entry.cpp b/src/mongo/db/storage/kv/kv_collection_catalog_entry.cpp
index 65b5bd054d2..c32736bcf07 100644
--- a/src/mongo/db/storage/kv/kv_collection_catalog_entry.cpp
+++ b/src/mongo/db/storage/kv/kv_collection_catalog_entry.cpp
@@ -35,6 +35,9 @@
#include "mongo/db/storage/kv/kv_engine.h"
namespace mongo {
+
+ using std::string;
+
class KVCollectionCatalogEntry::AddIndexChange : public RecoveryUnit::Change {
public:
AddIndexChange(OperationContext* opCtx, KVCollectionCatalogEntry* cce,
diff --git a/src/mongo/db/storage/kv/kv_database_catalog_entry.cpp b/src/mongo/db/storage/kv/kv_database_catalog_entry.cpp
index abde589c5a3..f397c767dca 100644
--- a/src/mongo/db/storage/kv/kv_database_catalog_entry.cpp
+++ b/src/mongo/db/storage/kv/kv_database_catalog_entry.cpp
@@ -37,6 +37,10 @@
#include "mongo/db/storage/recovery_unit.h"
namespace mongo {
+
+ using std::string;
+ using std::vector;
+
class KVDatabaseCatalogEntry::AddCollectionChange : public RecoveryUnit::Change {
public:
AddCollectionChange(OperationContext* opCtx, KVDatabaseCatalogEntry* dce,
diff --git a/src/mongo/db/storage/kv/kv_engine_test_harness.cpp b/src/mongo/db/storage/kv/kv_engine_test_harness.cpp
index f1d721ede4a..f2438689f8e 100644
--- a/src/mongo/db/storage/kv/kv_engine_test_harness.cpp
+++ b/src/mongo/db/storage/kv/kv_engine_test_harness.cpp
@@ -43,6 +43,7 @@
namespace mongo {
using boost::scoped_ptr;
+ using std::string;
namespace {
class MyOperationContext : public OperationContextNoop {
diff --git a/src/mongo/db/storage/kv/kv_storage_engine.cpp b/src/mongo/db/storage/kv/kv_storage_engine.cpp
index 6ded627f501..ef56ed40325 100644
--- a/src/mongo/db/storage/kv/kv_storage_engine.cpp
+++ b/src/mongo/db/storage/kv/kv_storage_engine.cpp
@@ -39,6 +39,9 @@
namespace mongo {
+ using std::string;
+ using std::vector;
+
namespace {
const std::string catalogInfo = "_mdb_catalog";
}
diff --git a/src/mongo/db/storage/mmap_v1/aligned_builder.cpp b/src/mongo/db/storage/mmap_v1/aligned_builder.cpp
index 8df70d47d41..d11e88611bd 100644
--- a/src/mongo/db/storage/mmap_v1/aligned_builder.cpp
+++ b/src/mongo/db/storage/mmap_v1/aligned_builder.cpp
@@ -37,6 +37,8 @@
namespace mongo {
+ using std::endl;
+
AlignedBuilder::AlignedBuilder(unsigned initSize) {
_len = 0;
_malloc(initSize);
diff --git a/src/mongo/db/storage/mmap_v1/btree/btree_interface.cpp b/src/mongo/db/storage/mmap_v1/btree/btree_interface.cpp
index d7765c6be99..fbd1e6ad063 100644
--- a/src/mongo/db/storage/mmap_v1/btree/btree_interface.cpp
+++ b/src/mongo/db/storage/mmap_v1/btree/btree_interface.cpp
@@ -39,6 +39,8 @@
namespace mongo {
using boost::scoped_ptr;
+ using std::string;
+ using std::vector;
template <class OnDiskFormat>
class BtreeBuilderInterfaceImpl : public SortedDataBuilderInterface {
diff --git a/src/mongo/db/storage/mmap_v1/btree/btree_interface_test.cpp b/src/mongo/db/storage/mmap_v1/btree/btree_interface_test.cpp
index 7fcdb64c6cb..74458f3e5e7 100644
--- a/src/mongo/db/storage/mmap_v1/btree/btree_interface_test.cpp
+++ b/src/mongo/db/storage/mmap_v1/btree/btree_interface_test.cpp
@@ -35,6 +35,8 @@
namespace mongo {
+ using std::auto_ptr;
+
class MyHarnessHelper : public HarnessHelper {
public:
MyHarnessHelper()
diff --git a/src/mongo/db/storage/mmap_v1/btree/btree_logic.cpp b/src/mongo/db/storage/mmap_v1/btree/btree_logic.cpp
index 60537a80aa3..9ac587b376c 100644
--- a/src/mongo/db/storage/mmap_v1/btree/btree_logic.cpp
+++ b/src/mongo/db/storage/mmap_v1/btree/btree_logic.cpp
@@ -42,6 +42,16 @@
namespace mongo {
+ using std::auto_ptr;
+ using std::dec;
+ using std::endl;
+ using std::hex;
+ using std::make_pair;
+ using std::pair;
+ using std::string;
+ using std::stringstream;
+ using std::vector;
+
// BtreeLogic::Builder algorithm
//
// Phase 1:
diff --git a/src/mongo/db/storage/mmap_v1/btree/btree_logic_test.cpp b/src/mongo/db/storage/mmap_v1/btree/btree_logic_test.cpp
index a84b135091b..87bfd0a03db 100644
--- a/src/mongo/db/storage/mmap_v1/btree/btree_logic_test.cpp
+++ b/src/mongo/db/storage/mmap_v1/btree/btree_logic_test.cpp
@@ -43,6 +43,8 @@
namespace mongo {
+ using std::string;
+
/**
* This class is made friend of BtreeLogic so we can add whatever private method accesses we
* need to it, to be used by the tests.
diff --git a/src/mongo/db/storage/mmap_v1/btree/btree_test_help.cpp b/src/mongo/db/storage/mmap_v1/btree/btree_test_help.cpp
index 9609177b0e7..fe0cdf7e82e 100644
--- a/src/mongo/db/storage/mmap_v1/btree/btree_test_help.cpp
+++ b/src/mongo/db/storage/mmap_v1/btree/btree_test_help.cpp
@@ -37,6 +37,8 @@
namespace mongo {
+ using std::string;
+
string bigNumString(long long n, int len) {
char sub[17];
sprintf(sub, "%.16llx", n);
diff --git a/src/mongo/db/storage/mmap_v1/btree/key.cpp b/src/mongo/db/storage/mmap_v1/btree/key.cpp
index 9e9c0728799..d1bae1d4b33 100644
--- a/src/mongo/db/storage/mmap_v1/btree/key.cpp
+++ b/src/mongo/db/storage/mmap_v1/btree/key.cpp
@@ -38,6 +38,10 @@
namespace mongo {
+ using std::endl;
+ using std::numeric_limits;
+ using std::min;
+
extern const Ordering nullOrdering = Ordering::make(BSONObj());
// KeyBson is for V0 (version #0) indexes
diff --git a/src/mongo/db/storage/mmap_v1/catalog/namespace_details_collection_entry.cpp b/src/mongo/db/storage/mmap_v1/catalog/namespace_details_collection_entry.cpp
index 4f18bc622d8..4a3d7c394bf 100644
--- a/src/mongo/db/storage/mmap_v1/catalog/namespace_details_collection_entry.cpp
+++ b/src/mongo/db/storage/mmap_v1/catalog/namespace_details_collection_entry.cpp
@@ -37,6 +37,9 @@
#include "mongo/util/startup_test.h"
namespace mongo {
+
+ using std::string;
+
NamespaceDetailsCollectionCatalogEntry::NamespaceDetailsCollectionCatalogEntry( const StringData& ns,
NamespaceDetails* details,
RecordStore* indexRecordStore,
diff --git a/src/mongo/db/storage/mmap_v1/catalog/namespace_details_rsv1_metadata.cpp b/src/mongo/db/storage/mmap_v1/catalog/namespace_details_rsv1_metadata.cpp
index 6faffcc6900..71d17417586 100644
--- a/src/mongo/db/storage/mmap_v1/catalog/namespace_details_rsv1_metadata.cpp
+++ b/src/mongo/db/storage/mmap_v1/catalog/namespace_details_rsv1_metadata.cpp
@@ -38,6 +38,7 @@
namespace mongo {
using boost::scoped_ptr;
+ using std::numeric_limits;
BOOST_STATIC_ASSERT(RecordStoreV1Base::Buckets
== NamespaceDetails::SmallBuckets + NamespaceDetails::LargeBuckets);
diff --git a/src/mongo/db/storage/mmap_v1/catalog/namespace_index.cpp b/src/mongo/db/storage/mmap_v1/catalog/namespace_index.cpp
index c4021faa522..ab2f441818b 100644
--- a/src/mongo/db/storage/mmap_v1/catalog/namespace_index.cpp
+++ b/src/mongo/db/storage/mmap_v1/catalog/namespace_index.cpp
@@ -47,6 +47,10 @@
namespace mongo {
+ using std::endl;
+ using std::list;
+ using std::string;
+
NamespaceIndex::NamespaceIndex(const std::string& dir, const std::string& database)
: _dir(dir),
_database(database),
diff --git a/src/mongo/db/storage/mmap_v1/catalog/namespace_test.cpp b/src/mongo/db/storage/mmap_v1/catalog/namespace_test.cpp
index 7c50b86a5bf..6a0edb79ea4 100644
--- a/src/mongo/db/storage/mmap_v1/catalog/namespace_test.cpp
+++ b/src/mongo/db/storage/mmap_v1/catalog/namespace_test.cpp
@@ -34,6 +34,8 @@
namespace mongo {
+ using std::string;
+
TEST( NamespaceTest, Basics ) {
Namespace foo( "foo.bar" );
Namespace bar( "bar.foo" );
diff --git a/src/mongo/db/storage/mmap_v1/data_file.cpp b/src/mongo/db/storage/mmap_v1/data_file.cpp
index d6c4a8a794c..da66be40b8a 100644
--- a/src/mongo/db/storage/mmap_v1/data_file.cpp
+++ b/src/mongo/db/storage/mmap_v1/data_file.cpp
@@ -45,6 +45,9 @@
namespace mongo {
+
+ using std::endl;
+
namespace {
void data_file_check(void *_mb) {
diff --git a/src/mongo/db/storage/mmap_v1/data_file_sync.cpp b/src/mongo/db/storage/mmap_v1/data_file_sync.cpp
index 74e64414467..46b682558bb 100644
--- a/src/mongo/db/storage/mmap_v1/data_file_sync.cpp
+++ b/src/mongo/db/storage/mmap_v1/data_file_sync.cpp
@@ -43,6 +43,8 @@
namespace mongo {
+ using std::endl;
+
DataFileSync dataFileSync;
DataFileSync::DataFileSync()
diff --git a/src/mongo/db/storage/mmap_v1/dur.cpp b/src/mongo/db/storage/mmap_v1/dur.cpp
index 56f9f73d7a3..54fbb311eda 100644
--- a/src/mongo/db/storage/mmap_v1/dur.cpp
+++ b/src/mongo/db/storage/mmap_v1/dur.cpp
@@ -96,6 +96,16 @@
#include "mongo/util/timer.h"
namespace mongo {
+
+ using std::endl;
+ using std::fixed;
+ using std::hex;
+ using std::set;
+ using std::setprecision;
+ using std::setw;
+ using std::string;
+ using std::stringstream;
+
namespace dur {
namespace {
diff --git a/src/mongo/db/storage/mmap_v1/dur_commitjob.cpp b/src/mongo/db/storage/mmap_v1/dur_commitjob.cpp
index 95a677ef991..480476d473f 100644
--- a/src/mongo/db/storage/mmap_v1/dur_commitjob.cpp
+++ b/src/mongo/db/storage/mmap_v1/dur_commitjob.cpp
@@ -47,6 +47,9 @@
namespace mongo {
using boost::shared_ptr;
+ using std::endl;
+ using std::max;
+ using std::min;
namespace dur {
diff --git a/src/mongo/db/storage/mmap_v1/dur_journal.cpp b/src/mongo/db/storage/mmap_v1/dur_journal.cpp
index d180e43726d..05a8a83fc2a 100644
--- a/src/mongo/db/storage/mmap_v1/dur_journal.cpp
+++ b/src/mongo/db/storage/mmap_v1/dur_journal.cpp
@@ -64,8 +64,11 @@ using namespace mongoutils;
namespace mongo {
- class AlignedBuilder;
+ using std::endl;
+ using std::hex;
+ using std::string;
+ class AlignedBuilder;
namespace dur {
// Rotate after reaching this data size in a journal (j._<n>) file
diff --git a/src/mongo/db/storage/mmap_v1/dur_preplogbuffer.cpp b/src/mongo/db/storage/mmap_v1/dur_preplogbuffer.cpp
index f32c4599177..1d1835f143a 100644
--- a/src/mongo/db/storage/mmap_v1/dur_preplogbuffer.cpp
+++ b/src/mongo/db/storage/mmap_v1/dur_preplogbuffer.cpp
@@ -54,6 +54,10 @@
namespace mongo {
+ using std::endl;
+ using std::min;
+ using std::stringstream;
+
namespace dur {
extern Journal j;
@@ -66,7 +70,7 @@ namespace mongo {
error() << "findMMF_inlock failed " << privateViews.numberOfViews_inlock() << endl;
printStackTrace(); // we want a stack trace and the assert below didn't print a trace once in the real world - not sure why
stringstream ss;
- ss << "view pointer cannot be resolved " << hex << (size_t) ptr;
+ ss << "view pointer cannot be resolved " << std::hex << (size_t) ptr;
journalingFailure(ss.str().c_str()); // asserts, which then abends
}
return f;
diff --git a/src/mongo/db/storage/mmap_v1/dur_recover.cpp b/src/mongo/db/storage/mmap_v1/dur_recover.cpp
index 771726ce4b2..cedd7f3285b 100644
--- a/src/mongo/db/storage/mmap_v1/dur_recover.cpp
+++ b/src/mongo/db/storage/mmap_v1/dur_recover.cpp
@@ -63,6 +63,17 @@
namespace mongo {
+ using boost::shared_ptr;
+ using std::auto_ptr;
+ using std::endl;
+ using std::hex;
+ using std::map;
+ using std::pair;
+ using std::setw;
+ using std::string;
+ using std::stringstream;
+ using std::vector;
+
/**
* Thrown when a journal section is corrupt. This is considered OK as long as it occurs while
* processing the last file. Processing stops at the first corrupt section.
diff --git a/src/mongo/db/storage/mmap_v1/dur_writetodatafiles.cpp b/src/mongo/db/storage/mmap_v1/dur_writetodatafiles.cpp
index 58b4d15daba..8c9bd195119 100644
--- a/src/mongo/db/storage/mmap_v1/dur_writetodatafiles.cpp
+++ b/src/mongo/db/storage/mmap_v1/dur_writetodatafiles.cpp
@@ -40,6 +40,8 @@ namespace mongo {
namespace dur {
+ using std::endl;
+
static void WRITETODATAFILES_Impl1(const JSectHeader& h,
const AlignedBuilder& uncompressed) {
LOG(3) << "journal WRITETODATAFILES 1" << endl;
diff --git a/src/mongo/db/storage/mmap_v1/durable_mapped_file.cpp b/src/mongo/db/storage/mmap_v1/durable_mapped_file.cpp
index f0546a63f35..603a5809861 100644
--- a/src/mongo/db/storage/mmap_v1/durable_mapped_file.cpp
+++ b/src/mongo/db/storage/mmap_v1/durable_mapped_file.cpp
@@ -52,7 +52,13 @@
using namespace mongoutils;
namespace mongo {
+
+ using std::dec;
+ using std::endl;
+ using std::hex;
+ using std::map;
using std::pair;
+ using std::string;
void DurableMappedFile::remapThePrivateView() {
verify(storageGlobalParams.dur);
diff --git a/src/mongo/db/storage/mmap_v1/durop.cpp b/src/mongo/db/storage/mmap_v1/durop.cpp
index 3d6102588dc..aa70b169f32 100644
--- a/src/mongo/db/storage/mmap_v1/durop.cpp
+++ b/src/mongo/db/storage/mmap_v1/durop.cpp
@@ -50,6 +50,8 @@ namespace mongo {
using boost::scoped_array;
using boost::shared_ptr;
+ using std::endl;
+ using std::string;
namespace dur {
diff --git a/src/mongo/db/storage/mmap_v1/extent.cpp b/src/mongo/db/storage/mmap_v1/extent.cpp
index 4c880ee07d1..905e4d28a9e 100644
--- a/src/mongo/db/storage/mmap_v1/extent.cpp
+++ b/src/mongo/db/storage/mmap_v1/extent.cpp
@@ -36,6 +36,10 @@
namespace mongo {
+ using std::iostream;
+ using std::string;
+ using std::vector;
+
BOOST_STATIC_ASSERT( sizeof(Extent)-4 == 48+128 );
BSONObj Extent::dump() const {
diff --git a/src/mongo/db/storage/mmap_v1/journal_latency_test_cmd.cpp b/src/mongo/db/storage/mmap_v1/journal_latency_test_cmd.cpp
index 4be8ac12c06..6f82110b5d3 100644
--- a/src/mongo/db/storage/mmap_v1/journal_latency_test_cmd.cpp
+++ b/src/mongo/db/storage/mmap_v1/journal_latency_test_cmd.cpp
@@ -54,6 +54,11 @@
namespace mongo {
+ using std::max;
+ using std::min;
+ using std::string;
+ using std::stringstream;
+
namespace dur {
boost::filesystem::path getJournalDir();
}
diff --git a/src/mongo/db/storage/mmap_v1/mmap_v1_database_catalog_entry.cpp b/src/mongo/db/storage/mmap_v1/mmap_v1_database_catalog_entry.cpp
index 529c46b37c6..6554adc5322 100644
--- a/src/mongo/db/storage/mmap_v1/mmap_v1_database_catalog_entry.cpp
+++ b/src/mongo/db/storage/mmap_v1/mmap_v1_database_catalog_entry.cpp
@@ -57,6 +57,7 @@
namespace mongo {
using boost::scoped_ptr;
+ using std::auto_ptr;
namespace {
diff --git a/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp b/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
index 926e65b4740..090d0c87f8d 100644
--- a/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
+++ b/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
@@ -53,6 +53,12 @@
namespace mongo {
+ using std::endl;
+ using std::ifstream;
+ using std::string;
+ using std::stringstream;
+ using std::vector;
+
namespace {
#if !defined(__sunos__)
diff --git a/src/mongo/db/storage/mmap_v1/mmap_v1_extent_manager.cpp b/src/mongo/db/storage/mmap_v1/mmap_v1_extent_manager.cpp
index 7f1d873b369..99039a50049 100644
--- a/src/mongo/db/storage/mmap_v1/mmap_v1_extent_manager.cpp
+++ b/src/mongo/db/storage/mmap_v1/mmap_v1_extent_manager.cpp
@@ -54,6 +54,12 @@
namespace mongo {
+ using std::auto_ptr;
+ using std::endl;
+ using std::max;
+ using std::string;
+ using std::stringstream;
+
// Turn on this failpoint to force the system to yield for a fetch. Setting to "alwaysOn"
// will cause yields for fetching to occur on every 'kNeedsFetchFailFreq'th call to
// recordNeedsFetch().
diff --git a/src/mongo/db/storage/mmap_v1/record_store_v1_base.cpp b/src/mongo/db/storage/mmap_v1/record_store_v1_base.cpp
index 733042390ec..d3ad195cfdf 100644
--- a/src/mongo/db/storage/mmap_v1/record_store_v1_base.cpp
+++ b/src/mongo/db/storage/mmap_v1/record_store_v1_base.cpp
@@ -48,6 +48,8 @@
namespace mongo {
using boost::scoped_ptr;
+ using std::set;
+ using std::string;
/* Deleted list buckets are used to quickly locate free space based on size. Each bucket
contains records up to that size (meaning a record with a size exactly equal to
diff --git a/src/mongo/db/storage/mmap_v1/record_store_v1_capped.cpp b/src/mongo/db/storage/mmap_v1/record_store_v1_capped.cpp
index e0093f3a4c8..98adeed89a9 100644
--- a/src/mongo/db/storage/mmap_v1/record_store_v1_capped.cpp
+++ b/src/mongo/db/storage/mmap_v1/record_store_v1_capped.cpp
@@ -61,6 +61,11 @@
namespace mongo {
+ using std::dec;
+ using std::endl;
+ using std::hex;
+ using std::vector;
+
CappedRecordStoreV1::CappedRecordStoreV1( OperationContext* txn,
CappedDocumentDeleteCallback* collection,
const StringData& ns,
diff --git a/src/mongo/db/storage/mmap_v1/record_store_v1_capped_test.cpp b/src/mongo/db/storage/mmap_v1/record_store_v1_capped_test.cpp
index cdd20a5da44..951164b214a 100644
--- a/src/mongo/db/storage/mmap_v1/record_store_v1_capped_test.cpp
+++ b/src/mongo/db/storage/mmap_v1/record_store_v1_capped_test.cpp
@@ -42,6 +42,9 @@ using namespace mongo;
namespace {
+ using std::string;
+ using std::vector;
+
// Provides data to be inserted. Must be large enough for largest possible record.
// Should be in BSS so unused portions should be free.
char zeros[20*1024*1024] = {};
diff --git a/src/mongo/db/storage/mmap_v1/record_store_v1_repair_iterator.cpp b/src/mongo/db/storage/mmap_v1/record_store_v1_repair_iterator.cpp
index b5a9d155759..7f8151dce81 100644
--- a/src/mongo/db/storage/mmap_v1/record_store_v1_repair_iterator.cpp
+++ b/src/mongo/db/storage/mmap_v1/record_store_v1_repair_iterator.cpp
@@ -38,6 +38,8 @@
namespace mongo {
+ using std::endl;
+
RecordStoreV1RepairIterator::RecordStoreV1RepairIterator(OperationContext* txn,
const RecordStoreV1Base* recordStore)
: _txn(txn), _recordStore(recordStore), _stage(FORWARD_SCAN) {
diff --git a/src/mongo/db/storage/mmap_v1/record_store_v1_simple.cpp b/src/mongo/db/storage/mmap_v1/record_store_v1_simple.cpp
index eb718322a2f..1ede42c7f5f 100644
--- a/src/mongo/db/storage/mmap_v1/record_store_v1_simple.cpp
+++ b/src/mongo/db/storage/mmap_v1/record_store_v1_simple.cpp
@@ -51,6 +51,9 @@
namespace mongo {
+ using std::endl;
+ using std::vector;
+
static Counter64 freelistAllocs;
static Counter64 freelistBucketExhausted;
static Counter64 freelistIterations;
@@ -229,7 +232,7 @@ namespace mongo {
void SimpleRecordStoreV1::addDeletedRec( OperationContext* txn, const DiskLoc& dloc ) {
DeletedRecord* d = drec( dloc );
- DEBUGGING log() << "TEMP: add deleted rec " << dloc.toString() << ' ' << hex << d->extentOfs() << endl;
+ DEBUGGING log() << "TEMP: add deleted rec " << dloc.toString() << ' ' << std::hex << d->extentOfs() << endl;
int b = bucket(d->lengthWithHeaders());
*txn->recoveryUnit()->writing(&d->nextDeleted()) = _details->deletedListEntry(b);
diff --git a/src/mongo/db/storage/mmap_v1/record_store_v1_simple_test.cpp b/src/mongo/db/storage/mmap_v1/record_store_v1_simple_test.cpp
index 2f1b0181ec8..58a5ceeb317 100644
--- a/src/mongo/db/storage/mmap_v1/record_store_v1_simple_test.cpp
+++ b/src/mongo/db/storage/mmap_v1/record_store_v1_simple_test.cpp
@@ -39,6 +39,9 @@
using namespace mongo;
namespace {
+
+ using std::string;
+
TEST(SimpleRecordStoreV1, ChangeNoPaddingSetting) {
OperationContextNoop txn;
DummyExtentManager em;
diff --git a/src/mongo/db/storage/mmap_v1/record_store_v1_test_help.cpp b/src/mongo/db/storage/mmap_v1/record_store_v1_test_help.cpp
index 0cf7dc3f3fa..af789cc747b 100644
--- a/src/mongo/db/storage/mmap_v1/record_store_v1_test_help.cpp
+++ b/src/mongo/db/storage/mmap_v1/record_store_v1_test_help.cpp
@@ -46,6 +46,8 @@
namespace mongo {
+ using std::numeric_limits;
+
DummyRecordStoreV1MetaData::DummyRecordStoreV1MetaData( bool capped, int userFlags ) {
_dataSize = 0;
_numRecords = 0;
diff --git a/src/mongo/db/storage/mmap_v1/repair_database.cpp b/src/mongo/db/storage/mmap_v1/repair_database.cpp
index afd4c08a546..33992f4ccbc 100644
--- a/src/mongo/db/storage/mmap_v1/repair_database.cpp
+++ b/src/mongo/db/storage/mmap_v1/repair_database.cpp
@@ -56,6 +56,11 @@
namespace mongo {
using boost::scoped_ptr;
+ using std::endl;
+ using std::map;
+ using std::string;
+ using std::stringstream;
+ using std::vector;
typedef boost::filesystem::path Path;
diff --git a/src/mongo/db/storage/record_store_test_docwriter.h b/src/mongo/db/storage/record_store_test_docwriter.h
index e026e942f9b..b52cfd97335 100644
--- a/src/mongo/db/storage/record_store_test_docwriter.h
+++ b/src/mongo/db/storage/record_store_test_docwriter.h
@@ -32,8 +32,6 @@
#include "mongo/db/storage/record_store.h"
-using std::string;
-
namespace mongo {
namespace {
diff --git a/src/mongo/db/storage/record_store_test_harness.cpp b/src/mongo/db/storage/record_store_test_harness.cpp
index fd5ecbea1cc..466c0891251 100644
--- a/src/mongo/db/storage/record_store_test_harness.cpp
+++ b/src/mongo/db/storage/record_store_test_harness.cpp
@@ -38,6 +38,7 @@
namespace mongo {
using boost::scoped_ptr;
+ using std::string;
TEST( RecordStoreTestHarness, Simple1 ) {
scoped_ptr<HarnessHelper> harnessHelper( newHarnessHelper() );
diff --git a/src/mongo/db/storage/record_store_test_updaterecord.h b/src/mongo/db/storage/record_store_test_updaterecord.h
index 4ff21ae0e1c..ad1141671c0 100644
--- a/src/mongo/db/storage/record_store_test_updaterecord.h
+++ b/src/mongo/db/storage/record_store_test_updaterecord.h
@@ -35,8 +35,6 @@
#include "mongo/db/storage/record_store.h"
#include "mongo/unittest/unittest.h"
-using std::string;
-
namespace mongo {
namespace {
diff --git a/src/mongo/db/storage/record_store_test_validate.h b/src/mongo/db/storage/record_store_test_validate.h
index 6682649f5da..c342e43dfda 100644
--- a/src/mongo/db/storage/record_store_test_validate.h
+++ b/src/mongo/db/storage/record_store_test_validate.h
@@ -37,10 +37,6 @@
#include "mongo/db/storage/record_store_test_harness.h"
#include "mongo/unittest/unittest.h"
-using std::set;
-using std::string;
-using std::stringstream;
-
namespace mongo {
namespace {
diff --git a/src/mongo/db/storage/sorted_data_interface_test_cursor_advanceto.cpp b/src/mongo/db/storage/sorted_data_interface_test_cursor_advanceto.cpp
index b2d59de5ec1..b9802b763b3 100644
--- a/src/mongo/db/storage/sorted_data_interface_test_cursor_advanceto.cpp
+++ b/src/mongo/db/storage/sorted_data_interface_test_cursor_advanceto.cpp
@@ -38,6 +38,7 @@
namespace mongo {
using boost::scoped_ptr;
+ using std::vector;
// Insert multiple single-field keys and advance to each of them
// using a forward cursor by specifying their exact key. When
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp
index d6b2766c02c..82d77b08746 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp
@@ -59,6 +59,10 @@
namespace mongo {
namespace {
+
+ using std::string;
+ using std::vector;
+
static const int TempKeyMaxSize = 1024; // this goes away with SERVER-3372
static const WiredTigerItem emptyItem(NULL, 0);
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_index_test.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_index_test.cpp
index f070ee361d1..11e14e6b33e 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_index_test.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_index_test.cpp
@@ -47,6 +47,8 @@
namespace mongo {
+ using std::string;
+
class MyHarnessHelper : public HarnessHelper {
public:
MyHarnessHelper() : _dbpath( "wt_test" ), _conn( NULL ) {
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
index 921847f1992..84543d3d439 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
@@ -55,6 +55,9 @@
namespace mongo {
+ using std::set;
+ using std::string;
+
namespace {
int mdb_handle_error(WT_EVENT_HANDLER *handler, WT_SESSION *session,
int errorCode, const char *message) {
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_parameters.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_parameters.cpp
index 07df199cfcc..5be812178dc 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_parameters.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_parameters.cpp
@@ -37,6 +37,8 @@
namespace mongo {
+using std::string;
+
WiredTigerEngineRuntimeConfigParameter::WiredTigerEngineRuntimeConfigParameter(
WiredTigerKVEngine* engine)
: ServerParameter(ServerParameterSet::getGlobal(),
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp
index bc5b647b4a1..e1fe44de5b1 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp
@@ -59,6 +59,7 @@
namespace mongo {
using boost::scoped_ptr;
+ using std::string;
namespace {
static const int kMinimumRecordStoreVersion = 1;
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_size_storer.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_size_storer.cpp
index fb324881312..aad21c18eaa 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_size_storer.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_size_storer.cpp
@@ -43,6 +43,8 @@
namespace mongo {
+ using std::string;
+
namespace {
int MAGIC = 123123;
}