ZF2-429: DBTable Adapter - Row count is not available in unbuffered result sets.

Issue Type: Bug Created: 2012-07-26T17:01:07.000+0000 Last Updated: 2012-08-25T00:56:59.000+0000 Status: Resolved Fix version(s): Reporter: coud vanrm (coudvanrm) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend\Authentication

  • zend_authentication

Related issues: Attachments:


Using DBTable Adapter as Adapter for AuthenticationService throws exception on authenticate

Bug exists at line 418, _authenticateQuerySelect() method;

<pre class="highlight">

$resultSet->initialize($statement->execute(array($this->_credential, $this->_identity)));
$resultIdentities = $resultSet->toArray();

Fix: Call buffer method in Zend\DB\ResultSet\AbstractResultSet in initialize method below line 52:

<pre class="highlight">

if ($dataSource instanceof ResultInterface) {
      $this->count = $dataSource->count();
      $this->fieldCount = $dataSource->getFieldCount();
      $this->dataSource = $dataSource;
      return $this;


Posted by Maks 3w (maks3w) on 2012-07-26T19:49:19.000+0000

You can send the patch following this instructions…

Posted by John Kelly (postalservice14) on 2012-08-24T15:53:08.000+0000

I'm not able to reproduce this problem. Do you have a test case that can reproduce the issue?

Posted by Sammie S. Taunton (diemuzi) on 2012-08-24T15:55:45.000+0000

Which DB Connection type are you using?

Posted by coud vanrm (coudvanrm) on 2012-08-25T00:53:38.000+0000

This is not happening in pdo adapter. Only in mysqli. I didn't know that there is an option in mysqli adapter for auto buffering resultsets.

Posted by coud vanrm (coudvanrm) on 2012-08-25T00:56:59.000+0000

This is a config for auto buffering.

$dbconfig = array( 'driver' => 'Mysqli', 'hostname' => 'localhost', 'username' => 'developer', 'password' => 'developer', 'database' => 'zend_db_example', 'options' => array('buffer_results' => true) );

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.