]> granicus.if.org Git - postgresql/commitdiff
PostgresNode: initialize $timed_out if passed
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 28 Mar 2016 22:17:06 +0000 (19:17 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 28 Mar 2016 22:17:06 +0000 (19:17 -0300)
Corrects an oversight in 2c83f435a3 where the $timed_out reference var
isn't initialized; using it would require the caller to initialize it
beforehand, which is cumbersome.

Author: Craig Ringer

src/test/perl/PostgresNode.pm

index 1eedd19c8a89e1f37ec063d6dc17b2136f6c5bad..2cbd2887ba0422072096052c7f7553f6f6e2bc1e 100644 (file)
@@ -1032,6 +1032,8 @@ sub psql
          IPC::Run::timeout($params{timeout}, exception => $timeout_exception)
          if (defined($params{timeout}));
 
+       ${$params{timed_out}} = 0 if defined $params{timed_out};
+
        # IPC::Run would otherwise append to existing contents:
        $$stdout = "" if ref($stdout);
        $$stderr = "" if ref($stderr);