summaryrefslogtreecommitdiff
path: root/jstests/core/index3.js
blob: 6ae7c4b82dda86428fe396ff75786775b14c2669 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Cannot implicitly shard accessed collections because of extra shard key index in sharded
// collection.
// @tags: [assumes_no_implicit_index_creation]

t = db.index3;
t.drop();

assert(t.getIndexes().length == 0);

t.ensureIndex({name: 1});

t.save({name: "a"});

t.ensureIndex({name: 1});

assert(t.getIndexes().length == 2);

assert(t.validate().valid);