]> granicus.if.org Git - postgresql/commitdiff
Report libpq errors correctly if session setup or teardown steps fail in
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 18 Aug 2011 13:47:31 +0000 (16:47 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 18 Aug 2011 13:47:31 +0000 (16:47 +0300)
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.

src/test/isolation/isolationtester.c

index 65a8fd2614b81fdf6df0f71e955f908dade16a01..1d76f2cd088d90672e1a7ed45ab2a584a6d7aaa5 100644 (file)
@@ -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);