diff options
Diffstat (limited to 'jstests/core/indexw.js')
-rw-r--r-- | jstests/core/indexw.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/jstests/core/indexw.js b/jstests/core/indexw.js new file mode 100644 index 00000000000..bd7c75b8b08 --- /dev/null +++ b/jstests/core/indexw.js @@ -0,0 +1,15 @@ +// Check that v0 keys are generated for v0 indexes SERVER-3375 + +t = db.jstests_indexw; +t.drop(); + +t.save( {a:[]} ); +assert.eq( 1, t.count( {a:[]} ) ); +t.ensureIndex( {a:1} ); +assert.eq( 1, t.count( {a:[]} ) ); +t.dropIndexes(); + +// The count result is incorrect - just checking here that v0 key generation is used. +t.ensureIndex( {a:1}, {v:0} ); +// QUERY_MIGRATION: WE GET THIS RIGHT...BY CHANCE? +// assert.eq( 0, t.count( {a:[]} ) ); |