ID: 44897
Updated by: [EMAIL PROTECTED]
Reported By: top dot bagger at bk dot ru
-Status: Open
+Status: Verified
Bug Type: MySQLi related
Operating System: CentOS 5
PHP Version: 5.2.6
-Assigned To:
+Assigned To: andrey
New Comment:
Andrey, I can reproduce this with libmysql and mysqlnd using PHP 5.3
CVS and a recent version of MySQL 5.1. Have a look, I'll send you the
test.
Previous Comments:
------------------------------------------------------------------------
[2008-05-27 07:02:10] top dot bagger at bk dot ru
Mysql function that I wrote returns only one result. But anyway I will
try and provide you feedback.
------------------------------------------------------------------------
[2008-05-27 00:14:32] [EMAIL PROTECTED]
Maybe if you fetch all the results caused by the execute of the CALL
statement before you try executing another query?
e.g. while($stmta->fetch());
------------------------------------------------------------------------
[2008-05-02 20:29:31] top dot bagger at bk dot ru
Sorry, I forgot to add my output of this:
State of user: 1prepare failed
errno: 2013 - error: Lost connection to MySQL server during query
------------------------------------------------------------------------
[2008-05-02 20:27:03] top dot bagger at bk dot ru
Description:
------------
"prepare" method call returns false if mysql stored procedure was
prepared before
Reproduce code:
---------------
$my = new mysqli("localhost","test","test","test_db");
$stmta = $my->prepare("CALL sp_auth_user(?,?)");
$user = 'user';
$pass = 'pass';
$stmta->bind_param("ss", $user,$pass);
$stmta->execute();
$stmta->bind_result($state);
$stmta->fetch();
printf("State of user: %s\n", $state);
$stmta->close();
$stmtb = $my->prepare("SELECT userId FROM appUsers WHERE login = ?");
if ($stmtb) echo "prepare succeeded";
else {
echo "prepare failed<br />";
echo "errno: ", $my->errno, " - error: ", $my->error, "<br />";
}
Expected result:
----------------
$stmtb contains mysqli_stmt object
Actual result:
--------------
$stmtb is false
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44897&edit=1