summaryrefslogtreecommitdiff
path: root/db/commands/mr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'db/commands/mr.cpp')
-rw-r--r--db/commands/mr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/db/commands/mr.cpp b/db/commands/mr.cpp
index b79e62b..30fa2a4 100644
--- a/db/commands/mr.cpp
+++ b/db/commands/mr.cpp
@@ -940,6 +940,7 @@ namespace mongo {
log(1) << "mr ns: " << config.ns << endl;
+ uassert( 16149 , "cannot run map reduce without the js engine", globalScriptEngine );
bool shouldHaveData = false;
long long num = 0;
@@ -1206,7 +1207,7 @@ namespace mongo {
BSONObj res = config.reducer->finalReduce( values , config.finalizer.get());
if (state.isOnDisk())
- state.insertToInc(res);
+ state.insert( config.tempLong , res );
else
state.emit(res);
values.clear();