ZF-11764: Bind variables lost when calling Zend_Db_Select->union()

Issue Type: Bug Created: 2011-09-22T17:35:07.000+0000 Last Updated: 2012-03-05T22:37:12.000+0000 Status: Open Fix version(s): Reporter: Mason Malone (masonm) Assignee: Ralph Schindler (ralph) Tags: - Zend_Db_Select

  • state:need-feedback
  • state:patch-ready-for-review
  • zf-crteam-review

Related issues: Attachments: - ZF-11764.diff


If you call Zend_Db_Select->union() with an array of Zend_Db_Select objects, any bind variables from those objects will not be copied over to the first select, resulting in an error when the union is executed. Tested in both release and in Subversion (r24460).


Posted by Mason Malone (masonm) on 2011-09-22T17:39:24.000+0000

Here's a patch to fix this, complete with a test case:

Posted by Mason Malone (masonm) on 2011-10-11T16:14:39.000+0000

p.s. could someone give me file attachment permissions? It does not seem I am able to attach files to tickets.

Posted by Adam Lundrigan (adamlundrigan) on 2011-10-19T17:50:44.000+0000

Only those who have signed a CLA can receive file attachment permissions. See here:…

Posted by Adam Lundrigan (adamlundrigan) on 2011-11-08T14:37:31.000+0000

I've reviewed your patch, and everything seems A-OK to me. The test you have provided passes, as does the whole Zend_Db test suite (excluding the normal fails I get back from the sqlite portion of Zend_Db on my system).

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.