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

Error message of failed $mul operation mentions $inc

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 2.5.2
    • Fix Version/s: 2.5.5
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL

      Description

      The following message should say "Cannot apply $mul ..." rather than "$inc"

      $mul was introduced in 2.5.2.

      > db.foo.save({_id:1, a:"one", b:2, c:3})
      > db.foo.update({_id:1}, {$mul: {a: 2.25}})
      > db.getLastError()
      Cannot apply $inc to a value of non-numeric type. {_id: 1.0} has the field 'a' of non-numeric type String

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: