ZF-10631: Zend_Queue_Adapter_Db is missing SQL Server table definition file.

Issue Type: Bug Created: 2010-11-02T20:50:20.000+0000 Last Updated: 2010-11-05T16:33:00.000+0000 Status: Resolved Fix version(s): - 1.11.1 (30/Nov/10)

Reporter: Nathan Bell (nathanpbell) Assignee: Justin Plock (jplock) Tags: - Zend_Queue

Related issues: Attachments: - mssql.sql


There are no Zend_Queue_Adapter_Db table definitions for Microsoft SQL Server.


Posted by Nathan Bell (nathanpbell) on 2010-11-02T20:55:07.000+0000

Here is a Zend_Queue_Adapter_Db table definition file for MS SQL Server 2008. I have not tested it on earlier versions of SQL, but it may work for them as well.

The difference between this and the MySQL database definitions is that there is no UNIQUE constraint on the the 'handle' column, but that constraint is not necessary with a minimal change to the Zend_Queue_Db_Adapter::deleteMessage() method. Namely, change:

public function deleteMessage(Zend_Queue_Message $message)
    $db    = $this->_messageTable->getAdapter();
  • $where = $db->quoteInto('handle=?', $message->handle); + $where = array(); + $where[] = $db->quoteInto('message_id=?', $message->message_id); + $where[] = $db->quoteInto('handle=?', $message->handle);
    if ($this->_messageTable->delete($where)) {
        return true;

    return false;

Posted by Matthew Weier O'Phinney (matthew) on 2010-11-04T21:33:27.000+0000

Added to trunk and 1.11 release branch

Posted by Nathan Bell (nathanpbell) on 2010-11-05T16:32:59.000+0000

Thanks for accepting my patch. However, with out the mentioned change to Zend_Queue_Db_Adapter::deleteMessage(), the provided SQL file will not work with Zend_Queue.

Have you found an issue?

See the Overview section for more details.


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

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