Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull() input.
authorNoah Misch <[email protected]>
Sat, 25 Jan 2025 19:28:14 +0000 (11:28 -0800)
committerNoah Misch <[email protected]>
Sat, 25 Jan 2025 19:28:19 +0000 (11:28 -0800)
commit7b3259bd7cf37da472ff5c2ce25fe0aa552e6fe0
tree266d460d7d44aa3da9d2a57a20c43897709d05ff
parent4106942f004fdd789ea4b35be0585c1f8268744d
Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull() input.

Since commit 757fb0e5a9a61ac8d3a67e334faeea6dc0084b3f, these
Informix-compat functions return 0 without changing the output
parameter.  Initialize the output parameter before the test call, making
that obvious.  Before this, the expected test output has been depending
on freed stack memory.  "gcc -ftrivial-auto-var-init=pattern" revealed
that.  Back-patch to v13 (all supported versions).

Discussion: https://postgr.es/m/20250106192748[email protected]
src/interfaces/ecpg/test/compat_informix/dec_test.pgc
src/interfaces/ecpg/test/expected/compat_informix-dec_test.c
src/interfaces/ecpg/test/expected/compat_informix-dec_test.stdout