summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/btree.h13
-rw-r--r--db/diskloc.h3
2 files changed, 8 insertions, 8 deletions
diff --git a/db/btree.h b/db/btree.h
index 6e499337eb5..dbe6a14272a 100644
--- a/db/btree.h
+++ b/db/btree.h
@@ -26,7 +26,6 @@
namespace mongo {
#pragma pack(1)
-
struct _KeyNode {
DiskLoc prevChildBucket; // the lchild
DiskLoc recordLoc; // location of the record associated with the key
@@ -60,7 +59,6 @@ namespace mongo {
return !isUnused();
}
};
-
#pragma pack()
class BucketBasics;
@@ -75,7 +73,6 @@ namespace mongo {
};
#pragma pack(1)
-
/* this class is all about the storage management */
class BucketBasics {
friend class BtreeBuilder;
@@ -187,7 +184,9 @@ namespace mongo {
}
char data[4];
};
+#pragma pack()
+#pragma pack(1)
class BtreeBucket : public BucketBasics {
friend class BtreeCursor;
public:
@@ -262,13 +261,15 @@ namespace mongo {
// simply builds and returns a dup key error message string
static string dupKeyError( const IndexDetails& idx , const BSONObj& key );
};
+#pragma pack()
class BtreeCursor : public Cursor {
public:
BtreeCursor( NamespaceDetails *_d, int _idxNo, const IndexDetails&, const BSONObj &startKey, const BSONObj &endKey, bool endKeyInclusive, int direction );
BtreeCursor( NamespaceDetails *_d, int _idxNo, const IndexDetails& _id, const BoundList &_bounds, int _direction );
-
+ ~BtreeCursor(){
+ }
virtual bool ok() {
return !bucket.isNull();
}
@@ -287,7 +288,6 @@ namespace mongo {
otherwise, marks loc as sent.
@return true if the loc has not been seen
*/
- set<DiskLoc> dups;
virtual bool getsetdup(DiskLoc loc) {
if( multikey ) {
pair<set<DiskLoc>::iterator, bool> p = dups.insert(loc);
@@ -375,6 +375,7 @@ namespace mongo {
void initInterval();
friend class BtreeBucket;
+ set<DiskLoc> dups;
NamespaceDetails *d;
int idxNo;
BSONObj startKey;
@@ -392,9 +393,9 @@ namespace mongo {
BoundList bounds_;
unsigned boundIndex_;
const IndexSpec& _spec;
+
};
-#pragma pack()
inline bool IndexDetails::hasKey(const BSONObj& key) {
return head.btree()->exists(*this, head, key, Ordering::make(keyPattern()));
diff --git a/db/diskloc.h b/db/diskloc.h
index ece9df202e5..93ef78b7957 100644
--- a/db/diskloc.h
+++ b/db/diskloc.h
@@ -26,7 +26,6 @@
namespace mongo {
-#pragma pack(1)
class Record;
class DeletedRecord;
@@ -34,6 +33,7 @@ namespace mongo {
class BtreeBucket;
class MongoDataFile;
+#pragma pack(1)
class DiskLoc {
int fileNo; /* this will be volume, file #, etc. */
int ofs;
@@ -151,7 +151,6 @@ namespace mongo {
MongoDataFile& pdf() const;
};
-
#pragma pack()
const DiskLoc minDiskLoc(0, 1);