[pgpool-committers: 421] pgpool: Fix segfault in the case on memory query cache is enabled and P
Tatsuo Ishii
ishii at postgresql.org
Fri Jun 22 08:49:26 JST 2012
Fix segfault in the case on memory query cache is enabled and PHP PDO
used. Actually this is not specific for PDO: PDO sends Sync message
right after Parse. Pgpool is confused because
pool_handle_query_cache() is called within ReadyForQuery() in this
case. Solution is, checking query_context->query_w_hex. If it is
NULL, then Bind message has not been sent yet.
Here is the small PDO script to reproduce the problem just F.Y.I.
<?php
function db() {
$db = new PDO("pgsql:host=localhost;port=11002;dbname=test");
return $db;
}
$n = 1;
for($i=0;$i < $n;$i++)
{
$db[$i] = db();
$stmt = $db[$i]->prepare("SELECT :num::int");
$stmt->execute(array(':num' => $i));
print_r($stmt->fetch());
//sleep(1);
$db[$i] = NULL;
echo date(DATE_RFC822);
}
// sleep(300);
?>
Branch
------
master
Details
-------
http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=4d91196df63ab34ac6567cfd793134e160680c9d
Modified Files
--------------
pool_proto_modules.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
More information about the pgpool-committers
mailing list