From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Fix bitshiftright()'s zero-padding some more. |
Date: | 2019-10-04 14:34:55 |
Message-ID: | E1iGOfX-0006ha-FK@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix bitshiftright()'s zero-padding some more.
Commit 5ac0d9360 failed to entirely fix bitshiftright's habit of
leaving one-bits in the pad space that should be all zeroes,
because in a moment of sheer brain fade I'd concluded that only
the code path used for not-a-multiple-of-8 shift distances needed
to be fixed. Of course, a multiple-of-8 shift distance can also
cause the problem, so we need to forcibly zero the extra bits
in both cases.
Per bug #16037 from Alexander Lakhin. As before, back-patch to all
supported branches.
Discussion: https://postgr.es/m/16037-1d1ebca564db54f4@postgresql.org
Branch
------
REL9_6_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/30e5b3bbe9ca9f3594816788fe4469798da04f64
Modified Files
--------------
src/backend/utils/adt/varbit.c | 6 ++--
src/test/regress/expected/bit.out | 66 +++++++++++++++++++++++++++++++++++++++
src/test/regress/sql/bit.sql | 6 ++++
3 files changed, 76 insertions(+), 2 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2019-10-04 18:29:23 | pgsql: Rename some toasting functions based on whether they are heap-sp |
Previous Message | Tomas Vondra | 2019-10-04 14:27:09 | pgsql: Use Size instead of int64 to track allocated memory |