projects
/
users
/
rhaas
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff16b40
)
Assert(PqCommReadingMsg) in pq_peekbyte().
author
Noah Misch
<noah@leadboat.com>
Sat, 7 Feb 2015 04:14:27 +0000
(23:14 -0500)
committer
Noah Misch
<noah@leadboat.com>
Sat, 7 Feb 2015 04:14:27 +0000
(23:14 -0500)
Interrupting pq_recvbuf() can break protocol sync, so its callers all
deserve this assertion. The one pq_peekbyte() caller suffices already.
src/backend/libpq/pqcomm.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/libpq/pqcomm.c
b/src/backend/libpq/pqcomm.c
index 0d97aa45fbc63ed7aa7c5b6ace4098b842bbb123..09dea4bbe165d921c904fb0087a2193205756a9e 100644
(file)
--- a/
src/backend/libpq/pqcomm.c
+++ b/
src/backend/libpq/pqcomm.c
@@
-928,6
+928,8
@@
pq_getbyte(void)
int
pq_peekbyte(void)
{
+ Assert(PqCommReadingMsg);
+
while (PqRecvPointer >= PqRecvLength)
{
if (pq_recvbuf()) /* If nothing in buffer, then recv some */