blob: 93362ff8c24cf4b9d827e8a89fda86c65e29fd03 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
t = db.repair_cursor1;
t.drop();
t.insert( { x : 1 } );
t.insert( { x : 2 } );
res = t.runCommand( "repairCursor" );
assert( res.ok, tojson( res ) );
t2 = db.repair_cursor1a;
t2.drop();
cursor = new DBCommandCursor( db._mongo, res );
cursor.forEach( function(z){ t2.insert(z); } );
assert.eq( t.find().itcount(), t2.find().itcount() );
assert.eq( t.hashAllDocs(), t2.hashAllDocs() );
|