From: sales at girderboot dot com
Operating system: Windows Server 2003
PHP version: 5.0.4
PHP Bug Type: MySQLi related
Bug description: Stored Procedure spoils connection
Description:
------------
After executing a query using a stored procedure that returns a result
set, no futher queries can be executed.
SProc's that don't return a result set, or embedded SQL queries are not
affected (but even they still cannot run after a SP with a result set is
run.)
MySQL and PHP both version 5.0.4
Reproduce code:
---------------
$db = new mysqli('localhost','xxx','xxx','campnet');
if (!$exec = $db->query("CALL Acct_Bal(1)"))
echo $db->error;
$balance = $exec->fetch_row();
$exec->close();
echo $balance[0];
echo "<BR>";
// Second Time
if (!$exec = $db->query("CALL Acct_Bal(1)"))
echo $db->error;
$balance = $exec->fetch_row();
$exec->close();
echo $balance[0];
Expected result:
----------------
Should Output the same result Twice (In this case, the accout balance):
0.00
0.00
Actual result:
--------------
0.00
Lost connection to MySQL server during query
Fatal error: Call to a member function fetch_row() on a non-object in
C:\Program Files\Apache Group\Apache2\htdocs\driver.php on line 40
--
Edit bug report at http://bugs.php.net/?id=32882&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32882&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=32882&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=32882&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=32882&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=32882&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=32882&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=32882&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=32882&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=32882&r=support
Expected behavior: http://bugs.php.net/fix.php?id=32882&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=32882&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=32882&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=32882&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32882&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=32882&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=32882&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=32882&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=32882&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=32882&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=32882&r=mysqlcfg