Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-5684

Possible number truncation in query.cpp?

    • Type: Icon: Question Question
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.1.0
    • Component/s: Internal Code
    • 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@mongodb.com Randolph Tan
            Reporter:
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: