Skip to content

Commit 9fc1c3a

Browse files
committed
Fix cross-version upgrade tests.
TestUpgradeXversion knows how to make the main regression database's references to pg_regress.so be version-independent. But it doesn't do that for plperl's database, so that the C function added by commit b7e3a52 is causing cross-version upgrade test failures. Path of least resistance is to just drop the function at the end of the new test. In <= v14, also take the opportunity to clean up the generated test files. Security: CVE-2024-10979
1 parent 1e45746 commit 9fc1c3a

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/pl/plperl/GNUmakefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ submake:
122122

123123
clean distclean maintainer-clean: clean-lib
124124
rm -f SPI.c Util.c $(OBJS) perlchunks.h plperl_opmask.h
125+
rm -f sql/plperl_env.sql expected/plperl_env.out
125126
rm -rf $(pg_regress_clean_files)
126127
ifeq ($(PORTNAME), win32)
127128
rm -f $(perlwithver).def

src/pl/plperl/input/plperl_env.source

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,6 @@ $$
5050
}
5151

5252
$$ LANGUAGE plperl;
53+
54+
-- clean up to simplify cross-version upgrade testing
55+
DROP FUNCTION get_environ();

src/pl/plperl/output/plperl_env.source

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,5 @@ $$
4747
$$ LANGUAGE plperl;
4848
WARNING: attempted alteration of $ENV{TEST_PLPERL_ENV_FOO} at line 12.
4949
NOTICE: environ unaffected
50+
-- clean up to simplify cross-version upgrade testing
51+
DROP FUNCTION get_environ();

0 commit comments

Comments
 (0)