pgpool2.git / summary / log / commit / refs
commit 0fe6413cf99250c5cc445a81a70b23a622ebdacf
Author: Nozomi Anzai <anzai@sraoss.co.jp>
Date: Thu May 31 07:13:30 2012 +0000
Fix segfault of pcp_systemdb_info not in parallel mode and when enable_query_cache = 'off'.
pcp_child.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pcp_child.c b/pcp_child.c
index 0a54f817b..dbe4254a6 100644
--- a/pcp_child.c
+++ b/pcp_child.c
@@ -596,9 +596,6 @@ pcp_do_child(int unix_fd, int inet_fd, char *pcp_conf_file)
SystemDBInfo *si = NULL;
si = pool_get_system_db_info();
- /* since PCP clients can only see SystemDBInfo, set system_db_status from the shared memory */
- si->system_db_status = SYSDB_STATUS;
-
if (si == NULL)
{
char code[] = "SystemDBNotDefined";
@@ -623,6 +620,9 @@ pcp_do_child(int unix_fd, int inet_fd, char *pcp_conf_file)
/* finally, indicate that all data is sent */
char fin_code[] = "CommandComplete";
+ /* since PCP clients can only see SystemDBInfo, set system_db_status from the shared memory */
+ si->system_db_status = SYSDB_STATUS;
+
snprintf(port, sizeof(port), "%d", si->port);
snprintf(status, sizeof(status), "%d", si->system_db_status);
snprintf(dist_def_num, sizeof(dist_def_num), "%d", si->dist_def_num);
[parent: 976922834d27]