#40085 [Opn->Bgs]: PHP/MySQL connector and Stored Procedure problem
| From: | georg@php.net | Date: | Wed, 10 Jan 2007 06:26:12 +0000 |
| Subject: | #40085 [Opn->Bgs]: PHP/MySQL connector and Stored Procedure problem | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-107405@lists.php.net to get a copy of this message | ||
ID: 40085
Updated by: georg@php.net
Reported By: edward_chan at hotmail dot com
-Status: Open
+Status: Bogus
Bug Type: MySQL related
Operating System: XP
PHP Version: 5.2.0
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
mysql extension doesn't support advanced features like prepared
statements and stored procedures.
For using these features you have to use mysqli extension.
Previous Comments:
------------------------------------------------------------------------
[2007-01-10 03:58:24] edward_chan at hotmail dot com
Description:
------------
New version of libmysql.dll and php_mysql.dll do not support running
more than one stored procedure within the same connection. The second
stored procedure will cause the lost of connection. The old version
5.1.2 do not have this kind of problem.
Reproduce code:
---------------
<?php
mysql_connect($hostname, $db_login, $db_pass, FALSE, 65536) or
die("Could not connect: ".mysql_error());
mysql_select_db($database) or die("Could not select database:
".mysql_error());
$result = mysql_query("CALL SelectUsersCount()") or die("Query failed:
".mysql_error());
if (mysql_result($result, 0, 0))
{
$result = mysql_query("CALL SelectUsers()") or die("Query failed:
".mysql_error());
}
mysql_close();
?>
Expected result:
----------------
Should not lose the connection when executing the second stored
procedure within the same connection
Actual result:
--------------
Lost connection to MySQL server during query
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40085&edit=1