4
db.createCollection( "jstests_index9" );
5
assert.eq( 1, db.system.indexes.count( {ns: "test.jstests_index9"} ), "There should be 1 index with default collection" );
7
db.createCollection( "jstests_index9", {autoIndexId: true} );
8
assert.eq( 1, db.system.indexes.count( {ns: "test.jstests_index9"} ), "There should be 1 index if autoIndexId: true" );
11
db.createCollection( "jstests_index9", {autoIndexId:false} );
12
assert.eq( 0, db.system.indexes.count( {ns: "test.jstests_index9"} ), "There should be 0 index if autoIndexId: false" );
13
t.createIndex( { _id:1 } );
14
assert.eq( 1, db.system.indexes.count( {ns: "test.jstests_index9"} ) );
15
t.createIndex( { _id:1 } );
16
assert.eq( 1, db.system.indexes.count( {ns: "test.jstests_index9"} ) );
19
t.createIndex( { _id:1 } );
20
assert.eq( 1, db.system.indexes.count( {ns: "test.jstests_index9"} ) );
24
t.createIndex( { _id:1 } );
25
assert.eq( 1, db.system.indexes.count( {ns: "test.jstests_index9"} ) );