• Vicențiu Ciorbaru's avatar
    MDEV-10097: Assertion `count > 0' failed in Item_sum_sum::add_helper(bool) · 1adc3fab
    Vicențiu Ciorbaru authored
    When specifying a RANGE type frame that exceeds the partition size, both
    for the top and bottom cursors we end up removing more rows than added
    to the aggregate function. This happens because our TOP range cursor,
    which removes values from the aggregate function, would be allowed to breach
    partition boundaries, while the BOTTOM range cursor would not.
    
    To prevent this from happening, force the TOP range cursor to only move
    within the current partition, as does the BOTTOM range cursor.
    1adc3fab
sql_window.cc 62.3 KB