#22100 [Csd->Bgs]: Query failure when WHERE clause matches on column with value '0'
| From: | magnus@php.net | Date: | Sat, 08 Feb 2003 08:23:52 +0000 |
| Subject: | #22100 [Csd->Bgs]: Query failure when WHERE clause matches on column with value '0' | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-32488@lists.php.net to get a copy of this message | ||
ID: 22100
Updated by: magnus@php.net
Reported By: eigenuser@yahoo.com
-Status: Closed
+Status: Bogus
Bug Type: PostgreSQL related
Operating System: FreeBSD 4.7
PHP Version: 4.3.0
New Comment:
Not a PHP bug => Bogus
Previous Comments:
------------------------------------------------------------------------
[2003-02-08 02:07:22] eigenuser@yahoo.com
This must've been a PostgreSQL bug, not PHP.
I installed php4-STABLE-200302080430, and the problem was still there.
I noticed a new release of PostgreSQL, so I upgraded from 7.3.1 to
7.3.2, and now everything seems to be fine.
------------------------------------------------------------------------
[2003-02-07 06:31:39] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2003-02-06 18:05:51] eigenuser@yahoo.com
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 this bug report at http://bugs.php.net/?id=22100&edit=1