FilteringClientCursor ctor bug

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.4.3
    • Component/s: Internal Client
    • None
    • Fully Compatible
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      FilteringClientCursor::FilteringClientCursor( auto_ptr<DBClientCursor> cursor , const BSONObj filter )
      : _matcher( filter ) , _cursor( cursor ) , _pcmData( NULL ), _done( cursor.get() == 0 ) {
      }

      The order of calling copy constructor for _cursor and evaluation of the expression ( cursor.get() == 0 ) above is not guaranteed. The problem is that copy constructor for auto_ptr resets the original.

            Assignee:
            Tyler Brock (Inactive)
            Reporter:
            Vladimir Phillips
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: