Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit4ed9dac

Browse 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 avoidhanding arbitrary SQL to psql on the command line and instead useIPC::Run's redirection facility for stdin. This pattern is alreadymostly 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 parent75d66d1 commit4ed9dac

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/test/perl/PostgresNode.pm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1652,14 +1652,15 @@ sub poll_query_until
16521652

16531653
$expected ='t'unlessdefined($expected);# default value
16541654

1655-
my$cmd = ['psql','-XAt','-c',$query,'-d',$self->connstr($dbname) ];
1655+
my$cmd = ['psql','-XAt','-d',$self->connstr($dbname) ];
16561656
my ($stdout,$stderr);
16571657
my$max_attempts = 180 * 10;
16581658
my$attempts = 0;
16591659

16601660
while ($attempts <$max_attempts)
16611661
{
1662-
my$result = IPC::Run::run$cmd,'>', \$stdout,'2>', \$stderr;
1662+
my$result = IPC::Run::run$cmd,'<', \$query,
1663+
'>', \$stdout,'2>', \$stderr;
16631664

16641665
$stdout =~s/\r\n/\n/gif$Config{osname}eq'msys';
16651666
chomp($stdout);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp