pgsql: pgbench: fix misprocessing of some nested \if constructs.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pgbench: fix misprocessing of some nested \if constructs.
Date: 2024-12-15 19:14:33
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pgbench: fix misprocessing of some nested \if constructs.

An \if command appearing within a false (not-to-be-executed) \if
branch was incorrectly treated the same as \elif. This could allow
statements within the inner \if to be executed when they should
not be. Also the missing inner \if stack entry would result in an
assertion failure (in assert-enabled builds) when the final \endif
is reached.

Report and patch by Michail Nikolaev. Back-patch to all
supported branches.

Discussion: https://postgr.es/m/CANtu0oiA1ke=SP6tauhNqkUdv5QFsJtS1p=aOOf_iU+EhyKkjQ@mail.gmail.com

Branch
------
REL_17_STABLE

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

Modified Files
--------------
src/bin/pgbench/pgbench.c | 16 +++++----
src/bin/pgbench/t/001_pgbench_with_server.pl | 50 ++++++++++++++++++++++++++++
2 files changed, 59 insertions(+), 7 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2024-12-15 20:50:14 pgsql: Declare a couple of variables inside not outside a PG_TRY block.
Previous Message Fujii Masao 2024-12-15 02:21:29 pgsql: doc: Clarify old WAL files are kept until they are summarized.