• Kevin Grittner's avatar
    Fix bug in calculations of hash join buckets. · 1cac8c98
    Kevin Grittner authored
    Commit 8cce08f1 used a left-shift
    on a literal of 1 that could (in large allocations) be shifted by
    31 or more bits.  This was assigned to a local variable that was
    already declared to be a long to protect against overruns of int,
    but the literal in this shift needs to be declared long to allow it
    to work correctly in some compilers.
    
    Backpatch to 9.5, where the bug was introduced.
    
    Report and patch by KaiGai Kohei, slighly modified based on
    discussion.
    1cac8c98
nodeHash.c 48.6 KB