pgpool2.git / summary / log / commit / refs

commit    2b4b837024637f7d6a2ad6ed9d99210504ea3cea
Author:   Tatsuo Ishii <ishii@postgresql.org>
Date:     Wed Jun 12 10:18:20 2013 +0000

    Fix bug #58, fails to invalidate query cache.
    
    CREATE TABLE t1(i INTEGER);
    CREATE TABLE t2(i INTEGER);
    SELECT * FROM t1;
    BEGIN;
    DELETE FROM t2 WHERE i = 0;
    INSERT INTO t1(i) VALUES(1);
    COMMIT;
    
    SELECT * FROM t1;
    
    At commit pgpool tries to delete cache for t2 but failes because
    there's no oid table entry for t2. Problem is, it fails to check oid
    table for t1. So cahce for t1 remains and the last SELECT incorrectly
    returns cached data. Fix is, continuing to check oid table entries.


pool_memqcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pool_memqcache.c b/pool_memqcache.c index b4096b672..fbeef2d52 100644 --- a/pool_memqcache.c +++ b/pool_memqcache.c @@ -1483,7 +1483,7 @@ static void pool_invalidate_query_cache(int num_table_oids, int *table_oid, bool */ pool_debug("pool_invalidate_query_cache: failed to open %s. reason:%s", path, strerror(errno)); - return; + continue; } fl.l_type = F_RDLCK; [parent: 59c4631a98b5]