summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorMichael Paquier2018-12-17 03:44:09 +0000
committerMichael Paquier2018-12-17 03:44:09 +0000
commit696c68c2be44d478403be5c76e6e8160fabdb083 (patch)
tree0c58f3f16920eb86780d9722ccc6222e5d64d723 /src/test
parentd5d86e2cd6b82da7bc57a6b2be8c808463e73d93 (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.out2
-rw-r--r--src/test/regress/sql/alter_table.sql2
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 bd63075139c..1a55bf71847 100644
--- a/src/test/regress/expected/alter_table.out
+++ b/src/test/regress/expected/alter_table.out
@@ -347,7 +347,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 4ccba34409e..03a3789f3ff 100644
--- a/src/test/regress/sql/alter_table.sql
+++ b/src/test/regress/sql/alter_table.sql
@@ -257,7 +257,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