diff options
Diffstat (limited to 'db/pdfile.cpp')
-rw-r--r-- | db/pdfile.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/db/pdfile.cpp b/db/pdfile.cpp index 83db825487e..8a221d8eda6 100644 --- a/db/pdfile.cpp +++ b/db/pdfile.cpp @@ -921,7 +921,7 @@ namespace mongo { NamespaceDetails *d, NamespaceDetailsTransient *nsdt, Record *toupdate, const DiskLoc& dl, - const char *_buf, int _len, OpDebug& debug, bool &changedId, bool god) + const char *_buf, int _len, OpDebug& debug, bool god) { StringBuilder& ss = debug.str; dassert( toupdate == dl.rec() ); @@ -948,7 +948,9 @@ namespace mongo { below. that is suboptimal, but it's pretty complicated to do it the other way without rollbacks... */ vector<IndexChanges> changes; + bool changedId; getIndexChanges(changes, *d, objNew, objOld, changedId); + uassert( 13596 , "cannot change _id of a document " , ! changedId ); dupCheck(changes, *d, dl); if ( toupdate->netLength() < objNew.objsize() ) { |