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

Error message for $mul with non-numeric type is confusing

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.6.0-rc0
    • Component/s: None
    • Fully Compatible
    • ALL
    • Hide
      var qa380_db = db.getSiblingDB("qa380");
      var coll = qa380_db.foo;
      
      coll.update({n : 0}, {$mul: {n : '' }})
      

      Error message: "Cannot increment with non-numeric argument:"
      Should be: "Cannot apply $mul to a value of non-numeric type."

      Show
      var qa380_db = db.getSiblingDB("qa380"); var coll = qa380_db.foo; coll.update({n : 0}, {$mul: {n : '' }}) Error message: "Cannot increment with non-numeric argument:" Should be: "Cannot apply $mul to a value of non-numeric type."

      Based on testing (QA-380) in 2.5 and 2.6 there were many changes to the WriteResult. The error message for $mul is incorrect.

            Assignee:
            Unassigned Unassigned
            Reporter:
            jonathan.abrahams Jonathan Abrahams
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: