pgpool2.git / summary / log / commit / refs
commit 092ed4d07258e76be103ae29328232dd20ce4551
Author: Tatsuo Ishii <ishii at sraoss.co.jp>
Date: Tue Jul 21 00:30:50 2009 +0000
Do not start transaction if the command is CLUSTER with no argument
pool_process_query.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/pool_process_query.c b/pool_process_query.c
index 3804c0c4f..7f15c6629 100644
--- a/pool_process_query.c
+++ b/pool_process_query.c
@@ -4093,14 +4093,25 @@ static bool is_internal_transaction_needed(Node *node)
if (bsearch(&nodeTag(node), nodemap, sizeof(nodemap)/sizeof(nodemap[0]), sizeof(NodeTag), compare) != NULL)
{
/*
- * chek CREATE INDEX CONCURRENTLY. If so, do not start transaction
+ * Check CREATE INDEX CONCURRENTLY. If so, do not start transaction
*/
if (IsA(node, IndexStmt))
{
if (((IndexStmt *)node)->concurrent)
return false;
}
+
+ /*
+ * Check CLUSTER with no option. If so, do not start transaction
+ */
+ else if (IsA(node, ClusterStmt))
+ {
+ if (((ClusterStmt *)node)->relation == NULL)
+ return false;
+ }
+
return true;
+
}
return false;
}
[parent: 619beb0e2c27]