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+ehyk...@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/530f89e648da3a5505920322dcd4e00e15559f66

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

Reply via email to