aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2011-08-18 16:47:31 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2011-08-18 16:47:31 +0300
commitb936d9264c08418909e3ec5d6107bd104d62fdc2 (patch)
treed18beb8bb2473c419cfae74312c76bac273b34b1 /src
parentb9585e8f983863fc7e1e147f503091a5f82d6ccf (diff)
downloadpostgresql-b936d9264c08418909e3ec5d6107bd104d62fdc2.tar.gz
postgresql-b936d9264c08418909e3ec5d6107bd104d62fdc2.zip
Report libpq errors correctly if session setup or teardown steps fail in
isolation regression tests. Alvaro committed these fixes to master branch on Tue Jul 29th, as part of Noah Misch's patch. The rest of that patch is not needed on 9.1, but this part should be backpatched.
Diffstat (limited to 'src')
-rw-r--r--src/test/isolation/isolationtester.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/isolation/isolationtester.c b/src/test/isolation/isolationtester.c
index 65a8fd2614b..1d76f2cd088 100644
--- a/src/test/isolation/isolationtester.c
+++ b/src/test/isolation/isolationtester.c
@@ -286,7 +286,7 @@ run_permutation(TestSpec * testspec, int nsteps, Step ** steps)
{
fprintf(stderr, "setup of session %s failed: %s",
testspec->sessions[i]->name,
- PQerrorMessage(conns[0]));
+ PQerrorMessage(conns[i]));
exit_nicely();
}
PQclear(res);
@@ -333,7 +333,7 @@ run_permutation(TestSpec * testspec, int nsteps, Step ** steps)
{
fprintf(stderr, "teardown of session %s failed: %s",
testspec->sessions[i]->name,
- PQerrorMessage(conns[0]));
+ PQerrorMessage(conns[i]));
/* don't exit on teardown failure */
}
PQclear(res);