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

Fix error message spacing in uassert 16556

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Trivial - P5
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0.0-rc0
    • Component/s: None
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Query Execution 2021-04-19

      Description

      https://github.com/mongodb/mongo/blob/master/src/mongo/db/pipeline/expression.cpp#L4926

      str::stream() << "cant $subtract a" << typeName(rhs.getType()) << " from a "
                                      << typeName(lhs.getType()));
      

      can produce an error like

      Stream should begin with "can't $subtract a " to prevent typeName(rhs.getType()) from being concatenated improperly with the preceding string.

      Note that uassert 16613 (https://github.com/mongodb/mongo/blob/master/src/mongo/db/pipeline/expression.cpp#L4920) has the correct spacing.

      Also note, both 16553 and 16613 should fix cant to can't

        Attachments

          Activity

            People

            Assignee:
            rushan.chen Rushan Chen
            Reporter:
            alex.bevilacqua Alex Bevilacqua
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: