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

Can you show me code for reproduce ?

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"

Thank You for Your comment. I think this issue is key to solve ZF-4553 ;-)

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?

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.

attach a link, that may be useful information. http://zend.com/de/forums/…

Is there any news about this bug?

Sadly, No :-( Do you have nice idea?

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.