diff options
author | Michael Paquier <michael@paquier.xyz> | 2018-12-17 12:44:02 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2018-12-17 12:44:02 +0900 |
commit | c7567e09d5d1e6357b95ad16f2bc4dd6affa07f3 (patch) | |
tree | 3c19d04887e471210244881869a76906213a04ab /src/test | |
parent | 5812be7b63cfaf09d982a401ca8f72d150c0f721 (diff) |
Fix use-after-free bug when renaming constraints
This is an oversight from recent commit b13fd344. While on it, tweak
the previous test with a better name for the renamed primary key.
Detected by buildfarm member prion which forces relation cache release
with -DRELCACHE_FORCE_RELEASE. Back-patch down to 9.4 as the previous
commit.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/regress/expected/alter_table.out | 2 | ||||
-rw-r--r-- | src/test/regress/sql/alter_table.sql | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out index de56f69e16f..ce9c9d0e6f2 100644 --- a/src/test/regress/expected/alter_table.out +++ b/src/test/regress/expected/alter_table.out @@ -349,7 +349,7 @@ CREATE TABLE constraint_rename_cache (a int, ALTER TABLE constraint_rename_cache RENAME CONSTRAINT chk_a TO chk_a_new; ALTER TABLE constraint_rename_cache - RENAME CONSTRAINT constraint_rename_cache_pkey TO chk_a_gt_zero; + RENAME CONSTRAINT constraint_rename_cache_pkey TO constraint_rename_pkey_new; CREATE TABLE like_constraint_rename_cache (LIKE constraint_rename_cache INCLUDING ALL); \d like_constraint_rename_cache diff --git a/src/test/regress/sql/alter_table.sql b/src/test/regress/sql/alter_table.sql index 96b95e013ae..b3390e8ade6 100644 --- a/src/test/regress/sql/alter_table.sql +++ b/src/test/regress/sql/alter_table.sql @@ -258,7 +258,7 @@ CREATE TABLE constraint_rename_cache (a int, ALTER TABLE constraint_rename_cache RENAME CONSTRAINT chk_a TO chk_a_new; ALTER TABLE constraint_rename_cache - RENAME CONSTRAINT constraint_rename_cache_pkey TO chk_a_gt_zero; + RENAME CONSTRAINT constraint_rename_cache_pkey TO constraint_rename_pkey_new; CREATE TABLE like_constraint_rename_cache (LIKE constraint_rename_cache INCLUDING ALL); \d like_constraint_rename_cache |