mirror of
https://github.com/postgres/postgres.git
synced 2026-03-27 12:54:24 -04:00
Fix copy-paste error in test_ginpostinglist
The check for a mismatch on the second decoded item pointer
was an exact copy of the first item pointer check, comparing
orig_itemptrs[0] with decoded_itemptrs[0] instead of orig_itemptrs[1]
with decoded_itemptrs[1]. The error message also reported (0, 1) as
the expected value instead of (blk, off). As a result, any decoding
error in the second item pointer (where the varbyte delta encoding
is exercised) would go undetected.
This has been wrong since commit bde7493d1, so backpatch to all
supported versions.
Author: Jianghua Yang <yjhjstz@gmail.com>
Discussion: https://postgr.es/m/CAAZLFmSOD8R7tZjRLZsmpKtJLoqjgawAaM-Pne1j8B_Q2aQK8w@mail.gmail.com
Backpatch-through: 14
This commit is contained in:
parent
6888658516
commit
d2a1aa77c2
1 changed files with 4 additions and 4 deletions
|
|
@ -72,12 +72,12 @@ test_itemptr_pair(BlockNumber blk, OffsetNumber off, int maxsize)
|
|||
ItemPointerGetOffsetNumber(&decoded_itemptrs[0]));
|
||||
|
||||
if (ndecoded == 2 &&
|
||||
!ItemPointerEquals(&orig_itemptrs[0], &decoded_itemptrs[0]))
|
||||
!ItemPointerEquals(&orig_itemptrs[1], &decoded_itemptrs[1]))
|
||||
{
|
||||
elog(ERROR, "mismatch on second itemptr: (%u, %d) vs (%u, %d)",
|
||||
0, 1,
|
||||
ItemPointerGetBlockNumber(&decoded_itemptrs[0]),
|
||||
ItemPointerGetOffsetNumber(&decoded_itemptrs[0]));
|
||||
blk, off,
|
||||
ItemPointerGetBlockNumber(&decoded_itemptrs[1]),
|
||||
ItemPointerGetOffsetNumber(&decoded_itemptrs[1]));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue