From 84469a9276672002b5e6f73665bdb4851e11db35 Mon Sep 17 00:00:00 2001 From: Tatsuo Ishii Date: Tue, 18 Apr 2017 10:27:14 +0900 Subject: [PATCH] Fix "show pool_cache" segfault when memcached is used. The problem is reported in: http://www.pgpool.net/mantisbt/view.php?id=301 pool_get_shmem_storage_stats() was mistakenly modified when 3.6 was developed. The bug was introduced in 3.6.0. Previous versions do not have the problem. --- src/query_cache/pool_memqcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/query_cache/pool_memqcache.c b/src/query_cache/pool_memqcache.c index 1b60ef447..fdef8c1ca 100644 --- a/src/query_cache/pool_memqcache.c +++ b/src/query_cache/pool_memqcache.c @@ -3890,7 +3890,7 @@ POOL_SHMEM_STATS *pool_get_shmem_storage_stats(void) mystats.cache_stats.num_selects = stats->num_selects; mystats.cache_stats.num_cache_hits = stats->num_cache_hits; - if (pool_config->memqcache_method == SHMEM_CACHE) + if (pool_config->memqcache_method != SHMEM_CACHE) return &mystats; /* number of total hash entries */ -- 2.39.5