diff options
Diffstat (limited to 'db/dbcommands.cpp')
-rw-r--r-- | db/dbcommands.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/db/dbcommands.cpp b/db/dbcommands.cpp index e643523ea22..82582e2c215 100644 --- a/db/dbcommands.cpp +++ b/db/dbcommands.cpp @@ -1431,6 +1431,8 @@ namespace mongo { while ( cursor->more() ){ BSONObj o = cursor->next(); BSONObj value = o.extractFields( keyPattern ); + if ( value.isEmpty() ) + continue; if ( map.insert( value ).second ){ size += o.objsize() + 20; uassert( "distinct too big, 4mb cap" , size < 4 * 1024 * 1024 ); |