ZF-6562: Zend_Paginator_Adapter_DbSelect fails on HAVING clause


Zend_Paginator_Adapter_DbSelect seems to create a wrong query for getting the count when the query has a 'HAVING' in it.

Simplified example:

$select = $db->select() ->from('user', 'user_id AS foo') ->having('foo > ?', 4);

// query is: SELECT user.user_id AS foo FROM user HAVING (foo > 4)

$paginator = new Zend_Paginator(new Zend_Paginator_Adapter_DbSelect($select));

Created query is: SELECT COUNT(*) AS zend_paginator_row_count FROM user HAVING (foo > 4)

which is obviously not working.

Haven't tested it yet in 1.8.0.

BR anselm


Resolved in r16157 and merged to release-1.8 in r16158