From: andre dot baggio at bol dot com dot br
Operating system: Linux hm517 2.6.9-67.0.4.ELsmp #
PHP version: 5.2.5
PHP Bug Type: PostgreSQL related
Bug description: pg_send_execute doesn't working and pg_send_query is blocking.
Description:
------------
PHP Version is 5.1.6
PostgreSQL(libpq) Version 8.1.6
Hi,
Problem 1:
In this code, the part 1 with pg_send_query()
stores one record in the DB. (it's ok)
the part 2 with the pg_send_prepare() and pg_send_excute()
DOESN'T stores the record in the DB.
Problem 2:
Besides , when I use:
pg_send_query($con,"select my_slow_func()");
sending a very slow query, the page takes the same time to be ready,
as if it was using pg_query().
but it was supposed that will be fast;
It seems that the pg_send_query is been bloking.
Reproduce code:
---------------
///part 1
$query = "insert into teste (dt_ini,dt_fim) values ('ggg','hhh')";
$qq = pg_send_query($connrc,$query);
/// part 2
$query = "insert into teste (dt_ini,dt_fim) values ('rrrr','tttt')";
pg_send_prepare($connrc, "my_query", $query);
if (!pg_connection_busy($connrc) )
pg_send_execute($connrc, "my_query");
Expected result:
----------------
I expected 2 records in the database
'ggg','hhh'
'rrrr','tttt'
Problem 2:
the page should be ready quickly;
Actual result:
--------------
Only one record is
'ggg','hhh'
Problem 2:
the page takes the same time as using pg_query();
--
Edit bug report at http://bugs.php.net/?id=44509&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=44509&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=44509&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=44509&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44509&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=44509&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44509&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44509&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44509&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44509&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44509&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=44509&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=44509&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44509&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44509&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44509&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44509&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44509&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44509&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44509&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44509&r=mysqlcfg