From 6f2b4b1df869829635d4a45f47a734c11fded00e Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Tue, 9 Oct 2018 09:20:39 +0900 Subject: [PATCH] Fix memory leak when memory_cache_enabled = on and write SQLs are sent. In a explicit transaction, we the SELECT results are cached in temporary buffer. If a write SQL is sent which modifies the table, the temporary buffe should be reset. --- src/query_cache/pool_memqcache.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/query_cache/pool_memqcache.c b/src/query_cache/pool_memqcache.c index 6c5a2cf23..92fb921cf 100644 --- a/src/query_cache/pool_memqcache.c +++ b/src/query_cache/pool_memqcache.c @@ -3460,6 +3460,7 @@ pool_handle_query_cache(POOL_CONNECTION_POOL * backend, char *query, Node *node, * DML/DDL modifies the TABLE which SELECT uses. */ pool_check_and_discard_cache_buffer(num_oids, oids); + pool_reset_memqcache_buffer(); } } else if (num_oids == 0) -- 2.39.5