|
|
@@ -154,6 +154,14 @@ class Zend_Db_Adapter_Db2 extends Zend_Db_Adapter_Abstract
|
|
|
$this->_config['driver_options']['DB2_ATTR_CASE'] = $caseAttrMap[$this->_config['options'][Zend_Db::CASE_FOLDING]];
|
|
|
}
|
|
|
|
|
|
+ if ($this->_isI5 && isset($this->_config['driver_options']['i5_naming'])) {
|
|
|
+ if ($this->_config['driver_options']['i5_naming']) {
|
|
|
+ $this->_config['driver_options']['i5_naming'] = DB2_I5_NAMING_ON;
|
|
|
+ } else {
|
|
|
+ $this->_config['driver_options']['i5_naming'] = DB2_I5_NAMING_OFF;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if ($this->_config['host'] !== 'localhost' && !$this->_isI5) {
|
|
|
// if the host isn't localhost, use extended connection params
|
|
|
$dbname = 'DRIVER={IBM DB2 ODBC DRIVER}' .
|
|
|
@@ -411,10 +419,10 @@ class Zend_Db_Adapter_Db2 extends Zend_Db_Adapter_Abstract
|
|
|
AND C.TABLE_NAME = k.TABLE_NAME
|
|
|
AND C.COLUMN_NAME = k.COLUMN_NAME)
|
|
|
WHERE "
|
|
|
- . $this->quoteInto('UPPER(C.TABLE_NAME) = UPPER(?)', $tableName);
|
|
|
+ . $this->quoteInto('UPPER(C.TABLE_NAME) = ?', strtoupper($tableName));
|
|
|
|
|
|
if ($schemaName) {
|
|
|
- $sql .= $this->quoteInto(' AND UPPER(C.TABLE_SCHEMA) = UPPER(?)', $schemaName);
|
|
|
+ $sql .= $this->quoteInto(' AND UPPER(C.TABLE_SCHEMA) = ?', strtoupper($schemaName));
|
|
|
}
|
|
|
|
|
|
$sql .= " ORDER BY C.ORDINAL_POSITION FOR FETCH ONLY";
|