pgsql: Add more tests for corrupted data with pglz_decompress()

Started by Michael Paquier2 months ago1 messagescomitters
Jump to latest
#1Michael Paquier
michael@paquier.xyz

Add more tests for corrupted data with pglz_decompress()

Two cases fixed by 2b5ba2a0a141 were not covered, to emulate the
handling of corrupted data, for:
- set control bit with a valid 2-byte match tag where offset is 0.
- set control bit with a valid 2-byte match tag where offset exceeds
output written.

Oversight in 67d318e70402.

Reviewed-by: Ayush Tiwari <ayushtiwari.slg01@gmail.com>
Discussion: /messages/by-id/agF4xkIdRcrCIprs@paquier.xyz
Backpatch-through: 14

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/900c07b854a7d7549ea4116aaafbb02bc610553a

Modified Files
--------------
src/test/regress/expected/compression_pglz.out | 12 ++++++++++++
src/test/regress/sql/compression_pglz.sql | 10 ++++++++++
2 files changed, 22 insertions(+)