diff --git a/jstests/sharding/shard3.js b/jstests/sharding/shard3.js index 9f0cef44cd5..86faedce5ff 100644 --- a/jstests/sharding/shard3.js +++ b/jstests/sharding/shard3.js @@ -139,25 +139,25 @@ assert.eq( 0 , doCounts( "after dropDatabase called" ) ) s.adminCommand( { enablesharding : "test2" } ); s.adminCommand( { shardcollection : "test2.foo" , key : { num : 1 } } ); -a = s.getDB( "test2" ).foo; -b = s2.getDB( "test2" ).foo; -a.save( { num : 1 } ); -a.save( { num : 2 } ); -a.save( { num : 3 } ); - +dba = s.getDB( "test2" ); +dbb = s2.getDB( "test2" ); +dba.foo.save( { num : 1 } ); +dba.foo.save( { num : 2 } ); +dba.foo.save( { num : 3 } ); +dba.getLastError(); assert.eq( 1 , s.onNumShards( "foo" , "test2" ) , "B on 1 shards" ); -assert.eq( 3 , a.count() , "Ba" ); -assert.eq( 3 , b.count() , "Bb" ); +assert.eq( 3 , dba.foo.count() , "Ba" ); +assert.eq( 3 , dbb.foo.count() , "Bb" ); s.adminCommand( { split : "test2.foo" , middle : { num : 2 } } ); s.adminCommand( { movechunk : "test2.foo" , find : { num : 3 } , to : s.getOther( s.getServer( "test2" ) ).name } ); assert.eq( 2 , s.onNumShards( "foo" , "test2" ) , "B on 2 shards" ); -x = a.stats() +x = dba.foo.stats() printjson( x ) -y = b.stats() +y = dbb.foo.stats() printjson( y ) diff --git a/util/log.h b/util/log.h index 3c829da0864..702e0400502 100644 --- a/util/log.h +++ b/util/log.h @@ -380,7 +380,7 @@ namespace mongo { fflush(logfile); }else{ int x = errno; - cout << "Failed to write to logfile: " << errnoWithDescription(x) << ": " << out << endl; + cout << "Failed to write to logfile: " << errnoWithDescription(x) << endl; } } else {