aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2013-10-04 10:32:48 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2013-10-04 15:59:21 -0300
commiteb8a811c5a0d91f53995f0d21ca88adf4eb6d1be (patch)
treedbcf8b0f1443e7549dd1eb6eaedbd98a0c188a4d /src
parente632b6b594dfde066ad514e3fcd4ac1b3aa4803f (diff)
downloadpostgresql-eb8a811c5a0d91f53995f0d21ca88adf4eb6d1be.tar.gz
postgresql-eb8a811c5a0d91f53995f0d21ca88adf4eb6d1be.zip
isolationtester: Allow tuples to be returned in more places
Previously, isolationtester would forbid returning tuples in session-specific teardown (but not global teardown), as well as in global setup. Allow these places to return tuples, too.
Diffstat (limited to 'src')
-rw-r--r--src/test/isolation/isolationtester.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/test/isolation/isolationtester.c b/src/test/isolation/isolationtester.c
index f2807799d6e..f62565046c3 100644
--- a/src/test/isolation/isolationtester.c
+++ b/src/test/isolation/isolationtester.c
@@ -519,7 +519,11 @@ run_permutation(TestSpec * testspec, int nsteps, Step ** steps)
for (i = 0; i < testspec->nsetupsqls; i++)
{
res = PQexec(conns[0], testspec->setupsqls[i]);
- if (PQresultStatus(res) != PGRES_COMMAND_OK)
+ if (PQresultStatus(res) == PGRES_TUPLES_OK)
+ {
+ printResultSet(res);
+ }
+ else if (PQresultStatus(res) != PGRES_COMMAND_OK)
{
fprintf(stderr, "setup failed: %s", PQerrorMessage(conns[0]));
exit_nicely();
@@ -648,7 +652,11 @@ teardown:
if (testspec->sessions[i]->teardownsql)
{
res = PQexec(conns[i + 1], testspec->sessions[i]->teardownsql);
- if (PQresultStatus(res) != PGRES_COMMAND_OK)
+ if (PQresultStatus(res) == PGRES_TUPLES_OK)
+ {
+ printResultSet(res);
+ }
+ else if (PQresultStatus(res) != PGRES_COMMAND_OK)
{
fprintf(stderr, "teardown of session %s failed: %s",
testspec->sessions[i]->name,