ZF-2097: Provide unit tests for using bound parameters with stored procedures

Description

Patrick Calkins wrote:

{quote} Code:


$db = Zend_Db::factory('Mysqli', array(
    'host'     => '127.0.0.1',
    'username' => 'webuser',
    'password' => 'xxxxxxxx',
    'dbname'   => 'test'
));

$userName = 'jo';
$password = 'xyzzy';

$stmt = $db->prepare('CALL authenticate_user(?, ?)');
$stmt->bindParam(1, $userName);
$stmt->bindParam(2, $password);
$stmt->execute();
$result = $stmt->fetch();

The bindParam statements call _bindParam in Zend/Db/Statement/Mysqli.php, which have nothing more than a 'return true;' statement. It does not appear the Mysqli bind_param function is implemented - is this correct?? If so does anyone have any workarounds for using stored procedures in MySql 5.1??

Using the PDO_MYSQL driver does not help as it has a problem calling 2 stored procedures back-to-back (throws the 'SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active.' error, which has been discussed before)... {quote}

Zend_Db_Statement_MysqliTest tests bound parameters with regular queries but not with stored procedures.

Also check to see where else these tests should appear.

Comments

This issue should have been fixed for the 1.5 release.

Please categorize/fix as needed.

This doesn't appear to have been fixed in 1.5.0. Please update if this is not correct.

There appears to be major issues with the Mysqli adapter - the Pdo_Mysql has been resolved. Leaving open until next major version to see if any core PHP issues are related to this.

Reassigning as Ralph is the maintainer of Zend_Db

Will evaluate within 2 weeks

Hi - i'm wondering has their been any update on this issue?

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.