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

Appearance settings

Commit 9958b2b

Browse filesBrowse files
committed
Fix minor bug in isolationtester.
If the lock wait query failed, isolationtester would report the PQerrorMessage from some other connection, meaning there would be no message or an unrelated one. This seems like a pretty unlikely occurrence, but if it did happen, this bug could make it really difficult/confusing to figure out what happened. That seems to justify patching all the way back. In passing, clean up another place where the "wrong" conn was used for an error report. That one's not actually buggy because it's a different alias for the same connection, but it's still confusing to the reader.
1 parent a7a1b44 commit 9958b2b
Copy full SHA for 9958b2b

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎src/test/isolation/isolationtester.c

Copy file name to clipboardExpand all lines: src/test/isolation/isolationtester.c
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ run_permutation(TestSpec *testspec, int nsteps, Step **steps)
594594
if (!PQsendQuery(conn, step->sql))
595595
{
596596
fprintf(stdout, "failed to send query for step %s: %s\n",
597-
step->name, PQerrorMessage(conns[1 + step->session]));
597+
step->name, PQerrorMessage(conn));
598598
exit_nicely();
599599
}
600600

@@ -743,7 +743,7 @@ try_complete_step(Step *step, int flags)
743743
PQntuples(res) != 1)
744744
{
745745
fprintf(stderr, "lock wait query failed: %s",
746-
PQerrorMessage(conn));
746+
PQerrorMessage(conns[0]));
747747
exit_nicely();
748748
}
749749
waiting = ((PQgetvalue(res, 0, 0))[0] == 't');

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.