summaryrefslogtreecommitdiff
path: root/jstests/indexapi.js
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-10-26 21:10:45 -0400
committerEliot Horowitz <eliot@10gen.com>2009-10-26 21:10:45 -0400
commit63e0ee59e4c68754a900f77c673b153a8c482f34 (patch)
tree56896c1d2a7aa66bb33faa0e363bf81c9ad7ec7f /jstests/indexapi.js
parent8fea4b6e73d1e39d5ac242e92cf5f8dc6ab11d2a (diff)
downloadmongo-63e0ee59e4c68754a900f77c673b153a8c482f34.tar.gz
fix invalid ensureIndex crashing server SERVER-388
Diffstat (limited to 'jstests/indexapi.js')
-rw-r--r--jstests/indexapi.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/jstests/indexapi.js b/jstests/indexapi.js
index de801e498cf..ae76ec74f57 100644
--- a/jstests/indexapi.js
+++ b/jstests/indexapi.js
@@ -35,3 +35,6 @@ assert.eq( 2 , idx.length , "M1" );
assert.eq( key , idx[1].key , "M2" );
assert( idx[1].unique , "M3" );
printjson( idx );
+
+db.system.indexes.insert( { ns : "test" , key : { x : 1 } , name : "x" } );
+assert( db.getLastError().indexOf( "invalid" ) >= 0 , "Z1" );