Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-708

mongoc_cursor_more doesn't work as expected

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: libmongoc
    • None

      mongoc_cursor_more returns true until mongoc_cursor_next already moved to the end of the cursor. So if I have a collection with one document, mongoc_cursor_more will still return true after I have read the document using mongoc_cursor_next. Only after mongoc_cursor_next returns false, so does mongoc_cursor_more.

      Here is some example code to illustrate the problem:
      http://pastebin.com/fQwX6riE

      If I have to query mongoc_cursor_next anyway I'm not sure how mongoc_cursor_more might be useful.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            msoutier Marius Soutier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: