Skip to content

Commit dee49ac

Browse files
committed
SERVER-705 merge
1 parent bec48b0 commit dee49ac

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

db/dbcommands.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,6 @@ namespace mongo {
12911291
virtual bool slaveOk() {
12921292
return false;
12931293
}
1294-
virtual LockType locktype() { return WRITE; }
12951294
virtual bool requiresAuth() {
12961295
return true;
12971296
}
@@ -1300,8 +1299,8 @@ namespace mongo {
13001299
}
13011300
virtual bool run(const char *dbname, BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result, bool) {
13021301
string coll = cmdObj[ "godinsert" ].valuestrsafe();
1303-
uassert( 13049, "godinsert must specify a collection", !coll.empty() );
1304-
string ns = nsToDatabase( dbname ) + "." + coll;
1302+
uassert( "godinsert must specify a collection", !coll.empty() );
1303+
string ns = nsToClient( dbname ) + "." + coll;
13051304
BSONObj obj = cmdObj[ "obj" ].embeddedObjectUserCheck();
13061305
DiskLoc loc = theDataFileMgr.insert( ns.c_str(), obj, true );
13071306
return true;

util/goodies.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,15 @@ namespace mongo {
242242
return (xt.sec & 0xfffff) * 1000 + t;
243243
}
244244

245+
struct Date_t {
246+
// TODO: make signed (and look for related TODO's)
247+
unsigned long long millis;
248+
Date_t(): millis(0) {}
249+
Date_t(unsigned long long m): millis(m) {}
250+
operator unsigned long long&() { return millis; }
251+
operator const unsigned long long&() const { return millis; }
252+
};
253+
245254
inline unsigned long long jsTime() {
246255
boost::xtime xt;
247256
boost::xtime_get(&xt, boost::TIME_UTC);

0 commit comments

Comments
 (0)