diff options
author | Andy Schwerin <schwerin@10gen.com> | 2014-02-14 10:59:59 -0500 |
---|---|---|
committer | Andy Schwerin <schwerin@10gen.com> | 2014-02-14 11:58:21 -0500 |
commit | 7aad87285f8149e1979699d9767815740e98dff4 (patch) | |
tree | 4f33f2e86ee3a8c60e0222bea655c9d08d993eb5 /src/mongo/db/ops/update_driver.cpp | |
parent | 47fd56c4e5c5d84e60c9501305f9b680c8c828cf (diff) | |
download | mongo-7aad87285f8149e1979699d9767815740e98dff4.tar.gz |
SERVER-12380 Fix error that prevented UpdateDriver from being reused.
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.
Diffstat (limited to 'src/mongo/db/ops/update_driver.cpp')
-rw-r--r-- | src/mongo/db/ops/update_driver.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mongo/db/ops/update_driver.cpp b/src/mongo/db/ops/update_driver.cpp index 1d3e3ef9222..f80b0f40a00 100644 --- a/src/mongo/db/ops/update_driver.cpp +++ b/src/mongo/db/ops/update_driver.cpp @@ -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; |