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

Commite2501d8

Browse files
committed
Fix minor bug in isolationtester.
If the lock wait query failed, isolationtester would report thePQerrorMessage from some other connection, meaning there would beno message or an unrelated one. This seems like a pretty unlikelyoccurrence, but if it did happen, this bug could make it reallydifficult/confusing to figure out what happened. That seems tojustify patching all the way back.In passing, clean up another place where the "wrong" conn was usedfor an error report. That one's not actually buggy because it'sa different alias for the same connection, but it's still confusingto the reader.
1 parentc776cd4 commite2501d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/test/isolation/isolationtester.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ run_permutation(TestSpec * testspec, int nsteps, Step ** steps)
609609
if (!PQsendQuery(conn,step->sql))
610610
{
611611
fprintf(stdout,"failed to send query for step %s: %s\n",
612-
step->name,PQerrorMessage(conns[1+step->session]));
612+
step->name,PQerrorMessage(conn));
613613
exit_nicely();
614614
}
615615

@@ -739,7 +739,7 @@ try_complete_step(Step * step, int flags)
739739
if (PQresultStatus(res)!=PGRES_TUPLES_OK)
740740
{
741741
fprintf(stderr,"lock wait query failed: %s",
742-
PQerrorMessage(conn));
742+
PQerrorMessage(conns[0]));
743743
exit_nicely();
744744
}
745745
ntuples=PQntuples(res);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp