git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a54141a)
isolationtester: Allow tuples to be returned in more places
Fri, 4 Oct 2013 13:32:48 +0000 (10:32 -0300)
Fri, 4 Oct 2013 17:54:55 +0000 (14:54 -0300)
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.


diff --git a/src/test/isolation/isolationtester.c b/src/test/isolation/isolationtester.c
index f2807799d6e538c9075a3a45b79d3d8c512949f8..f62565046c3648798c474e80024c56a1a9625d2e 100644 (file)
--- 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,
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /