DB Name Error Checking prints SIZE_MAX instead of actual user-provided string size

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • 135
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      From a BF investigation.

       

      Testing on a standalone from a day-old version of master, I see this:

      MongoDB Enterprise > db.adminCommand({renameCollection: 'Non-numeric data in input field which evaluates to an array should be ignored', to: 'test.b'})
      {
       "ok" : 0,
       "errmsg" : "db name must be at most 63 characters, found: 18446744073709551615",
       "code" : 73,
       "codeName" : "InvalidNamespace"
      }
      
      
      
      
      

      Looking at the two locations that would produce this I see:

          • There's some delicate error checking here, and std::string::npos (i.e. SIZE_MAX) gets printed.

      SERVER-75529 appears to have touched a lot of this size handling.

            Assignee:
            Matt Broadstone
            Reporter:
            Matt Kneiser
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: