pgsql: pgbench: fix misprocessing of some nested \if constructs. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: pgbench: fix misprocessing of some nested \if constructs.
Date
Msg-id E1tMu4W-002sdr-SN@gemulon.postgresql.org
Whole thread Raw
List 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_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2a23dbcf35946b844699c65fdf2ee440251eab12

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(-)


pgsql-committers by date:

Previous
From: Fujii Masao
Date:
Subject: pgsql: doc: Clarify old WAL files are kept until they are summarized.
Next
From: Tom Lane
Date:
Subject: pgsql: Declare a couple of variables inside not outside a PG_TRY block.