Fix but master/slave mode and LISTEN/NOTIFY
authorTatsuo Ishii <ishii at sraoss.co.jp>
Wed, 25 Jan 2006 12:29:58 +0000 (12:29 +0000)
committerTatsuo Ishii <ishii at sraoss.co.jp>
Wed, 25 Jan 2006 12:29:58 +0000 (12:29 +0000)
pool_process_query.c

index 22ec9284b289ce9911d80a8f0b02f85c27541f2d..aa66b4a48c72e8e2b43c0ae8d03b957008455a89 100644 (file)
@@ -270,7 +270,7 @@ POOL_STATUS pool_process_query(POOL_CONNECTION *frontend,
                        if (MASTER(backend)->len > 0)
                        {
                                pool_read(MASTER(backend), &kind, 1);
-                               if (DUAL_MODE)
+                               if (REPLICATION)
                                {
                                        pool_read(SECONDARY(backend), &kind1, 1);
                                        if (kind == '\0' || kind != kind1)
@@ -315,7 +315,7 @@ POOL_STATUS pool_process_query(POOL_CONNECTION *frontend,
                }
 
                /* this is the synchronous point */
-               if (DUAL_MODE)
+               if (REPLICATION)
                {
                        if (kind == 0)
                        {
@@ -857,7 +857,10 @@ static POOL_STATUS ReadyForQuery(POOL_CONNECTION *frontend,
                master_slave_dml = 0;
        }
 
+#ifdef NOT_USED
        return ProcessFrontendResponse(frontend, backend);
+#endif
+       return POOL_CONTINUE;
 }
 
 static POOL_STATUS CompleteCommandResponse(POOL_CONNECTION *frontend, 
@@ -945,8 +948,11 @@ static int RowDescription(POOL_CONNECTION *frontend,
 
                pool_write(frontend, string, len);
 
-               /* oid */
+               /* type oid */
                pool_read(MASTER(backend), &oid, sizeof(int));
+
+               pool_debug("RowDescription: type oid: %d", ntohl(oid));
+
                if (REPLICATION)
                {
                        pool_read(SECONDARY(backend), &oid1, sizeof(int));
@@ -972,11 +978,14 @@ static int RowDescription(POOL_CONNECTION *frontend,
                                return POOL_FATAL;
                        }
                }
-               pool_debug("RowDescription: field size:%d", ntohs(size));
+               pool_debug("RowDescription: field size: %d", ntohs(size));
                pool_write(frontend, &size, sizeof(short));
 
                /* modifier */
                pool_read(MASTER(backend), &mod, sizeof(int));
+
+               pool_debug("RowDescription: modifier: %d", ntohs(mod));
+
                if (REPLICATION)
                {
                        pool_read(SECONDARY(backend), &mod1, sizeof(int));