ZF-12458: CLONE - DB2 on i5 fails because of table and column names quoting

Issue Type: Bug Created: 2012-10-30T05:05:33.000+0000 Last Updated: 2013-04-05T16:07:11.000+0000 Status: Closed Fix version(s): - 1.7.3 (19/Jan/09)

Reporter: Stephen McMahon (stephenmcm) Assignee: Ralph Schindler (ralph) Tags: - Zend_Db_Adapter_Db2

  • Zend_Db

Related issues: - ZF-3072



The following script was used:

<pre class="highlight">
echo 'Version:- '.Zend_Version::VERSION.'<br></br><br></br>';

$stmt = $db->select()->from('psvf.STOCK')->where( 'VIN = ?' , 'ZZZ');


echo '<br></br>';

$test = $db->fetchAll($stmt,2);

It fails with the following result:

<pre class="highlight">
Version:- 1.11.10


Fatal error: Uncaught exception 'Zend_Db_Statement_Db2_Exception' with message 'HYOLABR in "psvf" type *FILE not found. SQLCODE=-204' in /usr/local/zendsvr/share/ZendFramework/library/Zend/Db/Statement/Db2.php:69 Stack trace: #0 /usr/local/zendsvr/share/ZendFramework/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Db2->_prepare('SELECT "HYOLABR...') #1 /usr/local/zendsvr/share/ZendFramework/library/Zend/Db/Adapter/Db2.php(238): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Db2), 'SELECT "HYOLABR...') #2 /usr/local/zendsvr/share/ZendFramework/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Db2->prepare('SELECT "HYOLABR...') #3 /usr/local/zendsvr/share/ZendFramework/library/Zend/Db/Adapter/Abstract.php(736): Zend_Db_Adapter_Abstract->query(Object(Zend_Db_Select), 2) #4 /www/zendsvr/htdocs/PSIwarranty/zendtest.php(24): Zend_Db_Adapter_Abstract->fetchAll(Object(Zend_Db_Select), 2) #5 {main} thrown in /usr/local/zendsvr/share/ZendFramework/library/Zend/Db/Statement/Db2.php on line 69

The following script works OK:

<pre class="highlight">
$stmt = "select * from psvf.STOCK where VIN = 'ZZZ'";

$prepare = $db->query($stmt);

$result = $db->fetchAll($stmt);


Posted by Stephen McMahon (stephenmcm) on 2012-10-30T05:18:08.000+0000

This error appears to be related to ZF-3011 but not quite the same. Happens with ZendServer CE running on iSeries

Posted by Stephen McMahon (stephenmcm) on 2012-10-30T22:48:02.000+0000

Setting Zend_Db::AUTO_QUOTE_IDENTIFIERS => false fixes issue, seems likely that DB2 doesn't like aggressive quoting of tables. Maybe extend the DB2 class to overwrite to false.

Posted by Ralph Schindler (ralph) on 2013-04-05T16:07:11.000+0000

This issue has been closed on Jira and moved to GitHub for issue tracking. To continue following the resolution of this issues, please visit:

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.