]> granicus.if.org Git - postgresql/commit
Fix bug in calculations of hash join buckets.
authorKevin Grittner <kgrittn@postgresql.org>
Wed, 19 Aug 2015 13:31:13 +0000 (08:31 -0500)
committerKevin Grittner <kgrittn@postgresql.org>
Wed, 19 Aug 2015 13:31:13 +0000 (08:31 -0500)
commit24bf2ee22233244eb9e2c71de754b1c71258d004
treeefb68ecd652be2a5a90a053d0155143409863d98
parent4c3754ffe0f5f85cdecd01d7c1ab55df94559302
Fix bug in calculations of hash join buckets.

Commit 8cce08f168481c5fc5be4e7e29b968e314f1b41e 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.
src/backend/executor/nodeHash.c