diff options
Diffstat (limited to 'jstests/core/group_empty.js')
-rw-r--r-- | jstests/core/group_empty.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/jstests/core/group_empty.js b/jstests/core/group_empty.js new file mode 100644 index 00000000000..62a734ed0f8 --- /dev/null +++ b/jstests/core/group_empty.js @@ -0,0 +1,8 @@ + +t = db.group_empty; +t.drop(); + +res1 = db.runCommand({group: {$reduce: function(){}, ns: 'group_empty', cond: {}, key: {}, initial: {count: 0}}}); +t.ensureIndex( { x : 1 } ); +res2 = db.runCommand({group: {$reduce: function(){}, ns: 'group_empty', cond: {}, key: {}, initial: {count: 0}}}); +assert.eq( res1, res2 ); |