pgsql: Fix yet more portability bugs in integerset and its tests.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix yet more portability bugs in integerset and its tests.
Date: 2019-03-22 16:02:04
Message-ID: E1h7McO-0007dD-Ag@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix yet more portability bugs in integerset and its tests.

There were more large constants that needed UINT64CONST. And one variable
was declared as "int", when it needed to be uint64. These bugs were only
visible on 32-bit systems; clearly I should've tested on one, given that
this code does a lot of work with 64-bit integers.

Also, in the test "huge distances" test, the code created some values with
random distances between them, but the test logic didn't take into account
the possibility that the random distance was exactly 1. That never actually
happens with the seed we're using, but let's be tidy.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b5fd4972a3bc758c0b8e8c9cd4aa32bacdeb6605

Modified Files
--------------
src/backend/lib/integerset.c | 12 ++++++------
src/test/modules/test_integerset/test_integerset.c | 7 +++++--
2 files changed, 11 insertions(+), 8 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2019-03-22 16:32:57 Re: pgsql: Make heap TID a tiebreaker nbtree index column.
Previous Message Peter Eisentraut 2019-03-22 13:42:39 pgsql: Fix ICU tests for older ICU versions