ZF-6039: DB2/400 quoteIdentifierAs error
Description
The default db2(/400) code does not work at our i5 os. The code doesnt add a library name to the select statement so the statement will fail. By commenting the following code the application does work. I've also tested the new code with a mysql database which still works perfect:
Removed code:
if ($alias !== null && end($ident) == $alias) {
$alias = null;
}
We've now created a new class that overrides but I think its better when this bug can be fixed.
Comments
Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2009-05-10T18:55:52.000+0000
Can you show me code for reproduce ?
Posted by Laurens (laurens0619) on 2009-05-19T06:45:26.000+0000
Ofcourse:
In my controller I just make a ordinary zend_db_table object and do a select() function. In this example code I echo the query to see the difference: Code: $oStrange= new Strange(); echo $oStrange->select();
Result before fix: SELECT "STRANGE".* FROM "QGPL"."STRANGE" Result after fix: SELECT "STRANGE".* FROM "QGPL"."STRANGE" AS "STRANGE"
Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2009-05-19T18:44:49.000+0000
Thank You for Your comment. I think this issue is key to solve ZF-4553 ;-)
Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2009-05-21T03:04:17.000+0000
I think Zend_Db_Adapter_Db2 class should have his own _quoteIdentifierAs() method, instead of using the same method in the Zend_Db_Adapter_Abstract class.
The change of Zend_Db_Adapter_Abstract seems to be harmful for another DB vendors.
By the way, the 3 methods , quoteIdentifier() , quoteColumnAs() and quoteTableAs() use the _quoteIdentifierAs() method.
Do they have no bad influence from the change of the _quoteIdentifierAs() method?
Posted by Laurens (laurens0619) on 2009-06-03T06:40:24.000+0000
Yeah you are right. Chaning the quoteidentifierAs method in the Zend_Db_Adpater_Db2 class is better. We have no bad influence from the change.
Posted by Satoru Yoshida (satoruyoshida) on 2009-07-08T20:15:14.000+0000
attach a link, that may be useful information. http://zend.com/de/forums/…
Posted by Alex Frenkel (sirshurf) on 2009-07-28T06:22:19.000+0000
Is there any news about this bug?
Posted by Satoru Yoshida (satoruyoshida) on 2009-07-28T19:39:24.000+0000
Sadly, No :-( Do you have nice idea?
Posted by Rob Allen (rob) on 2012-11-20T20:53:31.000+0000
Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".
Feel free to re-open and provide a patch if you want to fix this issue.