summaryrefslogtreecommitdiff
path: root/jstests/core/insert_long_index_key.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/insert_long_index_key.js')
-rw-r--r--jstests/core/insert_long_index_key.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/jstests/core/insert_long_index_key.js b/jstests/core/insert_long_index_key.js
new file mode 100644
index 00000000000..6379c36fb4a
--- /dev/null
+++ b/jstests/core/insert_long_index_key.js
@@ -0,0 +1,10 @@
+t = db.insert_long_index_key;
+t.drop();
+
+var s = new Array(2000).toString();
+t.ensureIndex( { x : 1 } );
+
+t.insert({ x: 1 });
+t.insert({ x: s });
+
+assert.eq( 1, t.count() );