Skip to content

Commit

Permalink
Fix cross-version upgrade tests.
Browse files Browse the repository at this point in the history
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
(cherry picked from commit c834b375a6dc36ff92f9f738ef1d7af09d91165f)
  • Loading branch information
tglsfdc authored and shardgupta committed Dec 6, 2024
1 parent 2a92ae4 commit 6fc3618
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pl/plperl/expected/plperl_env.out
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,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();
3 changes: 3 additions & 0 deletions src/pl/plperl/sql/plperl_env.sql
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,6 @@ $$
}

$$ LANGUAGE plperl;

-- clean up to simplify cross-version upgrade testing
DROP FUNCTION get_environ();

0 comments on commit 6fc3618

Please sign in to comment.