[CDRIVER-839] Bad interpretation of GridFS "SEEK_END" mode Created: 14/Sep/15 Updated: 23/Oct/15 Resolved: 17/Sep/15 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | GridFS |
| Affects Version/s: | None |
| Fix Version/s: | 1.3.0-beta0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kyle Suarez | Assignee: | Kyle Suarez |
| Resolution: | Done | Votes: | 0 |
| Labels: | bug, drivers, pull-request | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Any |
||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Description |
|
From GitHub pull request https://github.com/mongodb/mongo-c-driver/pull/260 by Jose Battig: Bad interpretation of seek_end mode. it should seek from one byte more than number of bytes written. seek_end with offset zero should put pointer exactly at the end ready to receive more data |
| Comments |
| Comment by Githook User [ 18/Sep/15 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@emptysquare.net'}Message: Merge pull request #271 from ksuarz/
|
| Comment by Githook User [ 18/Sep/15 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@emptysquare.net'}Message: Merge pull request #271 from ksuarz/
|
| Comment by Githook User [ 18/Sep/15 ] |
|
Author: {u'username': u'ksuarz', u'name': u'Kyle Suarez', u'email': u'ksuarz@gmail.com'}Message: |
| Comment by Githook User [ 18/Sep/15 ] |
|
Author: {u'username': u'ksuarz', u'name': u'Kyle Suarez', u'email': u'ksuarz@gmail.com'}Message: |
| Comment by Kyle Suarez [ 16/Sep/15 ] |
|
We can write tests for this, but they'll break if we can't seek on new GridFS handles. |
| Comment by Kyle Suarez [ 15/Sep/15 ] |
|
We should clearly document the behavior of mongoc_gridfs_file_seek; for example, the delta is always added, even when whence=SEEK_END. This matches the behavior of fseek(3) but might not be obvious to the casual user. |