summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2024-11-11 18:57:21 +0000
committerTom Lane2024-11-11 18:57:41 +0000
commit9fc1c3a02ddc4cf2a34550c0f985288cea7094bd (patch)
treec4d319418e8c7da9dc8289498d8253902faf189a
parent1e457468f0bf6c95b72be9af52f68787c8e83ba6 (diff)
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 b7e3a52a8 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
-rw-r--r--src/pl/plperl/GNUmakefile1
-rw-r--r--src/pl/plperl/input/plperl_env.source3
-rw-r--r--src/pl/plperl/output/plperl_env.source2
3 files changed, 6 insertions, 0 deletions
diff --git a/src/pl/plperl/GNUmakefile b/src/pl/plperl/GNUmakefile
index a8e2e0f68f5..7d292768140 100644
--- a/src/pl/plperl/GNUmakefile
+++ b/src/pl/plperl/GNUmakefile
@@ -122,6 +122,7 @@ submake:
clean distclean maintainer-clean: clean-lib
rm -f SPI.c Util.c $(OBJS) perlchunks.h plperl_opmask.h
+ rm -f sql/plperl_env.sql expected/plperl_env.out
rm -rf $(pg_regress_clean_files)
ifeq ($(PORTNAME), win32)
rm -f $(perlwithver).def
diff --git a/src/pl/plperl/input/plperl_env.source b/src/pl/plperl/input/plperl_env.source
index 8fe526e1b8b..49f03acb1dc 100644
--- a/src/pl/plperl/input/plperl_env.source
+++ b/src/pl/plperl/input/plperl_env.source
@@ -50,3 +50,6 @@ $$
}
$$ LANGUAGE plperl;
+
+-- clean up to simplify cross-version upgrade testing
+DROP FUNCTION get_environ();
diff --git a/src/pl/plperl/output/plperl_env.source b/src/pl/plperl/output/plperl_env.source
index 37b7e23d5ce..ef75d5d5556 100644
--- a/src/pl/plperl/output/plperl_env.source
+++ b/src/pl/plperl/output/plperl_env.source
@@ -47,3 +47,5 @@ $$
$$ LANGUAGE plperl;
WARNING: attempted alteration of $ENV{TEST_PLPERL_ENV_FOO} at line 12.
NOTICE: environ unaffected
+-- clean up to simplify cross-version upgrade testing
+DROP FUNCTION get_environ();