Fix Value::coerceToLong() range check for numberDecimal

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The numberDecimal arm of Value::coerceToLong() ran assertValueInRangeLong against _storage.doubleValue. Because doubleValue aliases the RCDecimal pointer in the storage union, the check was effectively run against raw pointer bits, so out-of-range decimals silently slipped through to Decimal128::toLong() (which saturates without raising). This can lead to misleading downstream errors instead of throwing an error.

            Assignee:
            Projjal Chanda
            Reporter:
            Projjal Chanda
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: