summaryrefslogtreecommitdiff
path: root/jstests/set3.js
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-10-17 01:10:48 -0400
committerEliot Horowitz <eliot@10gen.com>2009-10-17 01:10:48 -0400
commit55ada812dd87b7bfde54499b9755919e930b9add (patch)
tree9dc125f166a0f80c266f8370a9655703dd8b54eb /jstests/set3.js
parent117a9b68f9b7b3e45b2b807170684b0025c2a12e (diff)
downloadmongo-55ada812dd87b7bfde54499b9755919e930b9add.tar.gz
fix EmbeddedBuilder where field names are same length but different SERVER-367
Diffstat (limited to 'jstests/set3.js')
-rw-r--r--jstests/set3.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/jstests/set3.js b/jstests/set3.js
new file mode 100644
index 00000000000..611abc4e6bf
--- /dev/null
+++ b/jstests/set3.js
@@ -0,0 +1,11 @@
+
+t = db.set3;
+t.drop();
+
+t.insert( { "test1" : { "test2" : { "abcdefghijklmnopqrstu" : {"id":1} } } } );
+t.update( {}, {"$set":{"test1.test2.abcdefghijklmnopqrstuvwxyz":{"id":2}}})
+
+x = t.findOne();
+assert.eq( 1 , x.test1.test2.abcdefghijklmnopqrstu.id , "A" );
+assert.eq( 2 , x.test1.test2.abcdefghijklmnopqrstuvwxyz.id , "B" );
+