pgpool2.git / summary / log / commit / refs
commit 464b6f8ca7cab47c5a3ca14d79a9327f1741c7da
Author: Yoshiyuki Asaba <y-asaba at pgfoundry.org>
Date: Wed Nov 21 01:47:58 2007 +0000
Send a syntax error query to a master node when master_slave is true.
pool_process_query.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/pool_process_query.c b/pool_process_query.c
index 1be072b3d..f02a5066b 100644
--- a/pool_process_query.c
+++ b/pool_process_query.c
@@ -1187,6 +1187,16 @@ static POOL_STATUS SimpleQuery(POOL_CONNECTION *frontend,
return POOL_ERROR;
}
}
+ else
+ { /* syntax error */
+ if (MASTER_SLAVE)
+ {
+ pool_debug("SimpleQuery: set master_slave_dml query: %s", string);
+ master_slave_was_enabled = 1;
+ MASTER_SLAVE = 0;
+ master_slave_dml = 1;
+ }
+ }
if (MAJOR(backend) == PROTO_MAJOR_V2 && is_start_transaction_query(node))
{
[parent: 7b9b2928592a]