Skip to content

Commit

Permalink
SERVER-12380 Fix error that prevented UpdateDriver from being reused.
Browse files Browse the repository at this point in the history
The UpdateDriver represents a document->document transformation described by the
update parameter of update-like database operations.  It could already be used
repeatedly on multiple documents, so long as it represented only a single transaction.
However, it was designed to also support reprogramming to handle different transformations.
A programming error prevented this, by not clearing a piece of old state when reparsing.
  • Loading branch information
Andy Schwerin committed Feb 14, 2014
1 parent 47fd56c commit 7aad872
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/mongo/db/ops/update_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ namespace mongo {
for (vector<ModifierInterface*>::iterator it = _mods.begin(); it != _mods.end(); ++it) {
delete *it;
}
_mods.clear();
_indexedFields = NULL;
_replacementMode = false;
_positional = false;
Expand Down

0 comments on commit 7aad872

Please sign in to comment.