Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 1.7.1
-
Fix Version/s: 1.7.3
-
Component/s: Zend_Db_Adapter_Db2
-
Labels:None
-
Fix Version Priority:Should Have
Description
The reason is the sql statement in the describeTable() method. If you change it to our version, it works. We have created a modified version of Zend_Db_Adapter_Db2 called Zend_Db_Adapter_Db2iseries, that overloads this method, but I think, that some kind of option in Zend_Db_Adapter_Db2 will be better.
We are using ZF 1.5.3 now, so it is possible, that it will be necessary to adapt the code for 1.7.x
It seems, that this will not work for z/OS version of DB2, only for AS400
This is our sql code:
$sql = "SELECT DISTINCT c.table_schema, c.table_name, c.column_name, c.ordinal_position,
c.data_type, c.column_default, c.is_nullable, c.length, c.numeric_scale,
c.is_identity, tc.type AS tabconsttype, k.colseq
FROM qsys2.syscolumns c
LEFT JOIN (qsys2.syskeys k JOIN qsys2.syscst tc
ON (k.index_schema = tc.table_schema
AND k.index_name = tc.table_name
AND tc.type = 'PRIMARY KEY'))
ON (c.table_schema = k.index_schema
AND c.table_name = k.index_name
AND c.column_name = k.column_name)
WHERE "
. $this->quoteInto('UPPER(c.table_name) = UPPER
', $tableName);
if ($schemaName) {
$sql .= $this->quoteInto(' AND UPPER(c.table_schema) = UPPER(?)', $schemaName);
}
$sql .= " ORDER BY c.ordinal_position";
Can't you close this with fix for 1.7.0, Ralph?