Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4f0777b

Browse files
committed
isolationtester: Allow tuples to be returned in more places
Previously, isolationtester would forbid returning tuples insession-specific teardown (but not global teardown), as well as inglobal setup. Allow these places to return tuples, too.
1 parenta54141a commit4f0777b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

‎src/test/isolation/isolationtester.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,11 @@ run_permutation(TestSpec * testspec, int nsteps, Step ** steps)
519519
for (i=0;i<testspec->nsetupsqls;i++)
520520
{
521521
res=PQexec(conns[0],testspec->setupsqls[i]);
522-
if (PQresultStatus(res)!=PGRES_COMMAND_OK)
522+
if (PQresultStatus(res)==PGRES_TUPLES_OK)
523+
{
524+
printResultSet(res);
525+
}
526+
elseif (PQresultStatus(res)!=PGRES_COMMAND_OK)
523527
{
524528
fprintf(stderr,"setup failed: %s",PQerrorMessage(conns[0]));
525529
exit_nicely();
@@ -648,7 +652,11 @@ run_permutation(TestSpec * testspec, int nsteps, Step ** steps)
648652
if (testspec->sessions[i]->teardownsql)
649653
{
650654
res=PQexec(conns[i+1],testspec->sessions[i]->teardownsql);
651-
if (PQresultStatus(res)!=PGRES_COMMAND_OK)
655+
if (PQresultStatus(res)==PGRES_TUPLES_OK)
656+
{
657+
printResultSet(res);
658+
}
659+
elseif (PQresultStatus(res)!=PGRES_COMMAND_OK)
652660
{
653661
fprintf(stderr,"teardown of session %s failed: %s",
654662
testspec->sessions[i]->name,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp