Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 066535d

Browse filesBrowse files
committed
In PostgresNode.pm, don't pass SQL to psql on the command line
The Msys shell mangles certain patterns in its command line, so avoid handing arbitrary SQL to psql on the command line and instead use IPC::Run's redirection facility for stdin. This pattern is already mostly whats used, but query_poll_until() was not doing the right thing. Problem discovered on the buildfarm when a new TAP test failed on msys.
1 parent d9525c4 commit 066535d
Copy full SHA for 066535d

File tree

Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed

‎src/test/perl/PostgresNode.pm

Copy file name to clipboardExpand all lines: src/test/perl/PostgresNode.pm
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,8 +1360,9 @@ sub poll_query_until
13601360
while ($attempts < $max_attempts)
13611361
{
13621362
my $cmd =
1363-
[ 'psql', '-XAt', '-c', $query, '-d', $self->connstr($dbname) ];
1364-
my $result = IPC::Run::run $cmd, '>', \$stdout, '2>', \$stderr;
1363+
[ 'psql', '-XAt', '-d', $self->connstr($dbname) ];
1364+
my $result = IPC::Run::run $cmd, '<', \$query,
1365+
'>', \$stdout, '2>', \$stderr;
13651366

13661367
$stdout =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
13671368
chomp($stdout);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.