From: randall dot carlson at navy dot mil Operating system: REL 4 PHP version: 5.1.4 PHP Bug Type: PDO related Bug description: PDO stored procedure prepare call hangs
Description: ------------ It appears the PDO execute is hanging when a MySQL stored procedure is called. The same code works fine on PHP 5.1.2 & MySQL 4.0.21. Once we upgraded to 5.1.4, the problem began. It looks as if the call is being executed a couple of times in the MySQL queries.log. Our application code has many such calls and after attempting to execute each one the browser eventually timesout. When I subtitute the SQL statment in the prepare, it comes back fine. Reproduce code: --------------- create procedure pdo_test() begin select dummy from dummy; end; $pdo = new PDO("mysql:host=localhost;dbname=x","x","x"); $stmt = $pdo->prepare("call pdo_test()"/*"select dummy from dummy;"*/); $stmt->execute(); echo "<B>outputting...</B><BR>"; while ($rs = $stmt->fetch(PDO::FETCH_OBJ)) { echo "output: ".$rs->dummy."<BR>"; } echo "<BR><B>".date("r")."</B>"; Expected result: ---------------- should get outputting... output: 1 Fri, 26 May 2006 13:02:17 -0400 Actual result: -------------- timeout -- Edit bug report at http://bugs.php.net/?id=37605&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37605&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37605&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37605&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37605&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37605&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37605&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=37605&r=needscript Try newer version: http://bugs.php.net/fix.php?id=37605&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37605&r=support Expected behavior: http://bugs.php.net/fix.php?id=37605&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37605&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37605&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37605&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37605&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37605&r=dst IIS Stability: http://bugs.php.net/fix.php?id=37605&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37605&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37605&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37605&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=37605&r=mysqlcfg