~ubuntu-branches/ubuntu/utopic/mongodb/utopic

« back to all changes in this revision

Viewing changes to jstests/core/index9.js

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-07-03 09:23:46 UTC
  • mfrom: (1.3.10) (44.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20140703092346-c5bvt46wnzougyly
Tags: 1:2.6.3-0ubuntu1
* New upstream stable release:
  - Dropped patches, included upstream:
    + 0003-All-platforms-but-Windows-find-hash-in-std-tr1.patch
    + 0008-Use-system-libstemmer.patch
    + 0011-Use-a-signed-char-to-store-BSONType-enumerations.patch
    + 0001-SERVER-12064-Atomic-operations-for-gcc-non-Intel-arc.patch
    + 0002-SERVER-12065-Support-ARM-and-AArch64-builds.patch
  - d/p/*: Refreshed/rebased remaining patches.
  - Use system provided libyaml-cpp:
    + d/control: Add libyaml-cpp-dev to BD's.
    + d/rules: Enable --with-system-yaml option.
    + d/p/fix-yaml-detection.patch: Fix detection of libyaml-cpp library.
  - d/mongodb-server.mongodb.upstart: Sync changes from upstream.
  - d/control,mongodb-dev.*: Drop mongodb-dev package; it has no reverse
    dependencies and upstream no longer install header files.
  - d/NEWS: Point users to upstream upgrade documentation for upgrades
    from 2.4 to 2.6.
* Merge from Debian unstable.
* d/control: BD on libv8-3.14-dev to ensure that transitioning to new v8
  versions is a explicit action due to changes in behaviour in >= 3.25
  (LP: #1295723).
* d/mongodb-server.prerm: Dropped debug echo call from maintainer script
  (LP: #1294455).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
t = db.jstests_index9;
 
2
 
 
3
t.drop();
 
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" );
 
6
t.drop();
 
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" );
 
9
 
 
10
t.drop();
 
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"} ) );
 
17
 
 
18
t.drop();
 
19
t.createIndex( { _id:1 } );
 
20
assert.eq( 1, db.system.indexes.count( {ns: "test.jstests_index9"} ) );
 
21
 
 
22
t.drop();
 
23
t.save( {a:1} );
 
24
t.createIndex( { _id:1 } );
 
25
assert.eq( 1, db.system.indexes.count( {ns: "test.jstests_index9"} ) );