]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix copy-paste error in test_ginpostinglist
authorJohn Naylor <john.naylor@postgresql.org>
Tue, 24 Mar 2026 09:40:33 +0000 (16:40 +0700)
committerJohn Naylor <john.naylor@postgresql.org>
Tue, 24 Mar 2026 10:17:48 +0000 (17:17 +0700)
commit9cee8644f1aa4eb571946d65e660495fbe43e42d
tree80a5facf759a122bb0c4c77df7359912609dcd63
parenta5f412107f98721bd8cd624a05d5e7b4df99d7a8
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
src/test/modules/test_ginpostinglist/test_ginpostinglist.c