|
|
@@ -1781,6 +1781,46 @@ abstract class Zend_Db_Adapter_TestCommon extends Zend_Db_TestSetup
|
|
|
$this->assertEquals(array_fill(0, 4, 'EMPTY'), $value);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @group ZF-8597
|
|
|
+ * Oracle is limited to 30 characters for an identifier
|
|
|
+ */
|
|
|
+ public function testAdapterUpdateWithLongColumnIdentifier()
|
|
|
+ {
|
|
|
+ // create test table using no identifier quoting
|
|
|
+ $this->_util->createTable('zf_longidentifier', array(
|
|
|
+ 'id' => 'INTEGER NOT NULL',
|
|
|
+ 'veryveryveryverylongidentifier' => 'INTEGER NOT NULL'
|
|
|
+ ));
|
|
|
+ $tableName = $this->_util->getTableName('zf_longidentifier');
|
|
|
+
|
|
|
+ // insert into the table
|
|
|
+ $this->_db->insert($tableName, array(
|
|
|
+ 'id' => 1,
|
|
|
+ 'veryveryveryverylongidentifier' => 2
|
|
|
+ ));
|
|
|
+
|
|
|
+ //try to update
|
|
|
+ $this->_db->update($tableName,
|
|
|
+ array('veryveryveryverylongidentifier' => 3),
|
|
|
+ array($this->_db->quoteIdentifier('id') . ' = 1'));
|
|
|
+
|
|
|
+ // check if the row was inserted as expected
|
|
|
+ $select = $this->_db->select()->from($tableName, array('id', 'veryveryveryverylongidentifier'));
|
|
|
+
|
|
|
+ $stmt = $this->_db->query($select);
|
|
|
+ $fetched = $stmt->fetchAll(Zend_Db::FETCH_NUM);
|
|
|
+ $a = array(
|
|
|
+ 0 => array(0 => 1, 1 => 3)
|
|
|
+ );
|
|
|
+ $this->assertEquals($a, $fetched,
|
|
|
+ 'result of query not as expected');
|
|
|
+
|
|
|
+ // clean up
|
|
|
+ unset($stmt);
|
|
|
+ $this->_util->dropTable($tableName);
|
|
|
+ }
|
|
|
+
|
|
|
protected function _testAdapterAlternateStatement($stmtClass)
|
|
|
{
|
|
|
$ip = get_include_path();
|