#22100 [NEW]: Query failure when WHERE clause matches on column with value '0'

From: Date: Fri, 07 Feb 2003 00:05:51 +0000
Subject: #22100 [NEW]: Query failure when WHERE clause matches on column with value '0'
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-32340@lists.php.net to get a copy of this message
From: eigenuser@yahoo.com Operating system: FreeBSD 4.7 PHP version: 4.3.0 PHP Bug Type: PostgreSQL related Bug description: Query failure when WHERE clause matches on column with value '0' I have a PostgreSQL db with the table 'news_article', which has its primary index a serial column named 'art_id'. This table has a row whose art_id is set to zero. Now I'll do the following: 1. Make a persistent connection. 2. Make query of the form: SELECT * FROM news_article WHERE art_id = 0 Most of the time this query will work fine, but if I refresh the PHP script multiple times, I'll eventually get an error with the following error messages. ------------------- PHP error message: ------------------- Warning: pg_query() [function.pg-query]: Query failed: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. .in [filename.php] on line 21 -------------------------- PostgreSQL error message: -------------------------- pq_recvbuf: recv() failed: Undefined error: 0 Some things I've noticed: * This problem does not seem to appear when connecting with non-persistent connections. * Although the PHP error message suggests the connection was closed prematurely, you can still issue successful queries using the same connection resource later on in the PHP page, so it appears that the connection is still open. -- Edit bug report at http://bugs.php.net/?id=22100&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22100&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22100&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22100&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22100&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22100&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22100&r=support Expected behavior: http://bugs.php.net/fix.php?id=22100&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22100&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22100&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22100&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22100&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22100&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22100&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22100&r=gnused

« previous php.bugs (#32340) next »