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

Sort or Find on Symbol data type throws exception

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.4.2, 2.5.0
    • Affects Version/s: 2.4.0-rc1
    • Component/s: JavaScript
    • Labels:
      None
    • ALL

      Using the attached Ruby script you can insert a Symbol data type.

      Using aggregation to $sort this type, or doing find() on the collection will cause the following:

      >db.s6125.find()
      Fri Mar  1 11:56:08.846 Assertion: 16661:can't handle type: 14 a: "symbol"
      0x10b26cb1b 0x10b24b29e 0x10b24b35d 0x10b239306 0x10b239f2f 0x10b46dbec 0x10b46d652 0x10b4b3942 0xdf124f06362 
       0   mongo                               0x000000010b26cb1b _ZN5mongo15printStackTraceERSo + 43
       1   mongo                               0x000000010b24b29e _ZN5mongo11msgassertedEiPKc + 174
       2   mongo                               0x000000010b24b35d _ZN5mongo11msgassertedEiRKSs + 29
       3   mongo                               0x000000010b239306 _ZN5mongo7V8Scope16mongoToV8ElementERKNS_11BSONElementEb + 2466
       4   mongo                               0x000000010b239f2f _ZN5mongoL8namedGetEN2v85LocalINS0_6StringEEERKNS0_12AccessorInfoE + 575
       5   mongo                               0x000000010b46dbec _ZN2v88internal8JSObject35GetPropertyAttributeWithInterceptorEPS1_PNS0_6StringEb + 822
       6   mongo                               0x000000010b46d652 _ZN2v88internal10JSReceiver32GetPropertyAttributeWithReceiverEPS1_PNS0_6StringE + 252
       7   mongo                               0x000000010b4b3942 _ZN2v88internal19Runtime_HasPropertyENS0_9ArgumentsEPNS0_7IsolateE + 114
       8   ???                                 0x00000df124f06362 0x0 + 15329358013282
      Error: 16661 can't handle type: 14 a: "symbol"
      

            Assignee:
            benjamin.becker Ben Becker
            Reporter:
            andre.defrere@mongodb.com Andre de Frere
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: