Permalink
Browse files

Fix relcache replacement logic bug.

Patches provided by Akio Ishida.
  • Loading branch information...
1 parent ecb990c commit 9bd5dc1522284d2700f4a7f4115f57dcf4b95c5c t-ishii committed Nov 5, 2009
Showing with 3 additions and 3 deletions.
  1. +3 −3 pool_relcache.c
View
@@ -1,6 +1,6 @@
/* -*-pgsql-c-*- */
/*
- * $Header: /cvsroot/pgpool/pgpool-II/pool_relcache.c,v 1.2 2009/10/29 12:46:10 t-ishii Exp $
+ * $Header: /cvsroot/pgpool/pgpool-II/pool_relcache.c,v 1.3 2009/11/05 06:27:12 t-ishii Exp $
*
* pgpool: a language independent connection pool server for PostgreSQL
* written by Tatsuo Ishii
@@ -188,8 +188,8 @@ void *pool_search_relcache(POOL_RELCACHE *relcache, POOL_CONNECTION_POOL *backen
/*
* Call user defined unregister/register fuction.
*/
- (*relcache->unregister_func)(relcache->cache[i].data);
- relcache->cache[i].data = (*relcache->register_func)(res);
+ (*relcache->unregister_func)(relcache->cache[index].data);
+ relcache->cache[index].data = (*relcache->register_func)(res);
free_select_result(res);
return relcache->cache[index].data;

0 comments on commit 9bd5dc1

Please sign in to comment.