From a6c40ebd141d1769f21b1529d3565e7d576ebf22 Mon Sep 17 00:00:00 2001 From: Sait Talha Nisanci Date: Wed, 25 Aug 2021 11:33:42 +0300 Subject: [PATCH] Fix multi_follower_dml When the_table is emtpy, we don't get an error with pg14 anymore so we replace it generate_series so that we get the error. --- src/test/regress/expected/multi_follower_dml.out | 2 +- src/test/regress/sql/multi_follower_dml.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/regress/expected/multi_follower_dml.out b/src/test/regress/expected/multi_follower_dml.out index 0d1d6fd68..395c5157c 100644 --- a/src/test/regress/expected/multi_follower_dml.out +++ b/src/test/regress/expected/multi_follower_dml.out @@ -243,7 +243,7 @@ SELECT * FROM citus_local_table ORDER BY a; -- we should still disallow writes to local tables INSERT INTO local VALUES (1, 1); ERROR: cannot execute INSERT in a read-only transaction -INSERT INTO local SELECT a, b FROM the_table; +INSERT INTO local SELECT i,i FROM generate_series(0,100)i; ERROR: cannot execute INSERT in a read-only transaction -- we shouldn't be able to create local tables CREATE TEMP TABLE local_copy_of_the_table AS SELECT * FROM the_table; diff --git a/src/test/regress/sql/multi_follower_dml.sql b/src/test/regress/sql/multi_follower_dml.sql index d8cb17bb6..bca04d0a7 100644 --- a/src/test/regress/sql/multi_follower_dml.sql +++ b/src/test/regress/sql/multi_follower_dml.sql @@ -135,7 +135,7 @@ SELECT * FROM citus_local_table ORDER BY a; -- we should still disallow writes to local tables INSERT INTO local VALUES (1, 1); -INSERT INTO local SELECT a, b FROM the_table; +INSERT INTO local SELECT i,i FROM generate_series(0,100)i; -- we shouldn't be able to create local tables CREATE TEMP TABLE local_copy_of_the_table AS SELECT * FROM the_table;