mirror of
https://github.com/postgres/postgres.git
synced 2025-12-15 02:22:24 +03:00
Fix bogus extra arguments to query_safe in test
The test seemed to incorrectly think that query_safe() takes an argument that describes what the query does, similar to e.g. command_ok(). Until commitbd8d9c9bdfthe extra arguments were harmless and were just ignored, but when commitbd8d9c9bdfintroduced a new optional argument to query_safe(), the extra arguments started clashing with that, causing the test to fail. Backpatch to v17, that's the oldest branch where the test exists. The extra arguments didn't cause any trouble on the older branches, but they were clearly bogus anyway.
This commit is contained in:
@@ -25,8 +25,8 @@ $node->safe_psql('postgres',
|
|||||||
|
|
||||||
# Start Session 1 and leave it idle in transaction
|
# Start Session 1 and leave it idle in transaction
|
||||||
my $psql_session1 = $node->background_psql('postgres');
|
my $psql_session1 = $node->background_psql('postgres');
|
||||||
$psql_session1->query_safe('listen s;', "Session 1 listens to 's'");
|
$psql_session1->query_safe('listen s;');
|
||||||
$psql_session1->query_safe('begin;', "Session 1 starts a transaction");
|
$psql_session1->query_safe('begin;');
|
||||||
|
|
||||||
# Send some notifys from other sessions
|
# Send some notifys from other sessions
|
||||||
for my $i (1 .. 10)
|
for my $i (1 .. 10)
|
||||||
@@ -57,7 +57,7 @@ ok($datafronzenxid_freeze > $datafronzenxid, 'datfrozenxid advanced');
|
|||||||
# On Session 1, commit and ensure that the all the notifications are
|
# On Session 1, commit and ensure that the all the notifications are
|
||||||
# received. This depends on correctly freezing the XIDs in the pending
|
# received. This depends on correctly freezing the XIDs in the pending
|
||||||
# notification entries.
|
# notification entries.
|
||||||
my $res = $psql_session1->query_safe('commit;', "commit listen s;");
|
my $res = $psql_session1->query_safe('commit;');
|
||||||
my $notifications_count = 0;
|
my $notifications_count = 0;
|
||||||
foreach my $i (split('\n', $res))
|
foreach my $i (split('\n', $res))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user