mirror of
https://github.com/postgres/postgres.git
synced 2026-06-08 16:26:30 -04:00
Reset conn->errorReported when PQrequestCancel sets errorMessage.
Oversight in commit 618c16707. This is mainly neatnik-ism, since
if PQrequestCancel is used per its API contract, we should perform
pqClearConnErrorState before reaching any place that would consult
errorReported. But still, it seems like a bad idea to potentially
leave errorReported pointing past errorMessage.len.
This commit is contained in:
parent
1c6d462939
commit
83a7637e2c
1 changed files with 4 additions and 0 deletions
|
|
@ -4687,6 +4687,7 @@ PQrequestCancel(PGconn *conn)
|
|||
"PQrequestCancel() -- connection is not open\n",
|
||||
conn->errorMessage.maxlen);
|
||||
conn->errorMessage.len = strlen(conn->errorMessage.data);
|
||||
conn->errorReported = 0;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
@ -4706,7 +4707,10 @@ PQrequestCancel(PGconn *conn)
|
|||
}
|
||||
|
||||
if (!r)
|
||||
{
|
||||
conn->errorMessage.len = strlen(conn->errorMessage.data);
|
||||
conn->errorReported = 0;
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue