From:             top dot bagger at bk dot ru
Operating system: CentOS 5
PHP version:      5.2.6
PHP Bug Type:     MySQLi related
Bug description:  failed to prepare statement

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 bug report at http://bugs.php.net/?id=44897&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44897&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44897&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44897&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=44897&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=44897&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=44897&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=44897&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=44897&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=44897&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=44897&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=44897&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=44897&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=44897&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44897&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=44897&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=44897&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=44897&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44897&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=44897&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=44897&r=mysqlcfg

Reply via email to