pgpool2.git / summary / log / commit / refs
commit 0b99687ed8eef87b2b732e0ec333354ca5a2c46a
Author: Tatsuo Ishii <ishii@postgresql.org>
Date: Thu Aug 11 09:35:19 2016 +0000
Unbreak version 2 protocol case.
Commit:
https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=3cbce4eaf870e89fdd8f8a2ad8fab8d3d8aadf65
broke version 2 protocol case. In the session initiation phase,
"MAJOR" macro is used *before* session context is created. In this
MAJOR macro returns PROTO_MAJOR_V3, which of course breaks v2 protocol
negotiation. Fix is, not to use MAJOR macro here.
src/auth/pool_auth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/auth/pool_auth.c b/src/auth/pool_auth.c
index 2f259df30..f2660c385 100644
--- a/src/auth/pool_auth.c
+++ b/src/auth/pool_auth.c
@@ -72,7 +72,7 @@ int pool_do_auth(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *cp)
StartupPacket *sp;
- protoMajor = MAJOR(cp);
+ protoMajor = MASTER_CONNECTION(cp)->sp->major;
kind = pool_read_kind(cp);
if (kind < 0)
[parent: 270e445c5a97]