Possible number truncation in query.cpp?

XMLWordPrintableJSON

    • Type: Question
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.1.0
    • Component/s: Internal Code
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Code snippet below is from queryWithQueryOptimizer @ ops/query.cpp and it tries to cast long long to int and assign it to a long long:

      if ( dbprofile || duration >= cmdLine.slowMS ) {
        curop.debug().nscanned = (int)( cursor ? cursor->nscanned() : 0 );  // <-- why is there a cast?
        curop.debug().ntoskip = pq.getSkip();
      }
      

            Assignee:
            Randolph Tan
            Reporter:
            Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: