[SERVER-3567] mongos doesn't handle negative limits correctly Created: 10/Aug/11 Updated: 11/Jul/16 Resolved: 17/Nov/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 1.8.2 |
| Fix Version/s: | 2.1.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Robert Stam | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Operating System: | ALL | ||||
| Participants: | |||||
| Description |
|
Using one mongo shell, start up a sharded environment with two shards as follows: C:\mongodb\mongodb-win32-x86_64-1.8.2\bin>mongo --nodb Now using another mongo shell, attach to the mongos on port 31000 and run this test: C:\mongodb\mongodb-win32-x86_64-1.8.2\bin>mongo --port 31000 ) { "ok" : 1 }> db.runCommand({shardcollection:"test.test", key:{_id:1}}) { "collectionsharded" : "test.test", "ok" : 1 }> use test > db.test.find().skip(4).limit(2) { "_id" : 5 } { "_id" : 6 }> db.test.find().skip(4).limit(-2) The last find with a negative limit of -2 should have returned two documents also. |
| Comments |
| Comment by auto [ 17/Nov/11 ] |
|
Author: {u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}Message: test for |