Zend Framework

Provide unit tests for using bound parameters with stored procedures

Details

  • Fix Version Priority:
    Should Have

Description

Patrick Calkins wrote:

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)...

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.

Issue Links

Activity

Hide
Wil Sinclair added a comment -

This issue should have been fixed for the 1.5 release.

Show
Wil Sinclair added a comment - This issue should have been fixed for the 1.5 release.
Hide
Wil Sinclair added a comment -

Please categorize/fix as needed.

Show
Wil Sinclair added a comment - Please categorize/fix as needed.
Hide
Wil Sinclair added a comment -

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

Show
Wil Sinclair added a comment - This doesn't appear to have been fixed in 1.5.0. Please update if this is not correct.
Hide
Simon Mundy added a comment -

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.

Show
Simon Mundy added a comment - 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.
Hide
Wil Sinclair added a comment -

Reassigning as Ralph is the maintainer of Zend_Db

Show
Wil Sinclair added a comment - Reassigning as Ralph is the maintainer of Zend_Db
Hide
Ralph Schindler added a comment -

Will evaluate within 2 weeks

Show
Ralph Schindler added a comment - Will evaluate within 2 weeks
Hide
emerald007 emerald007 added a comment -

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

Show
emerald007 emerald007 added a comment - Hi - i'm wondering has their been any update on this issue?

People

Vote (2)
Watch (3)

Dates

  • Created:
    Updated: