Project

General

Profile

Bug #22731 » 14496_dbal.diff

Administrator Admin, 2010-05-27 19:27

View differences:

class.ux_t3lib_sqlparser.php (working copy)
case 'ADDUNIQUE':
$query .= ' (' . implode(',', $components['fields']) . ')';
break;
case 'DEFAULTCHARACTERSET':
case 'ENGINE':
// ??? todo!
break;
tests/sqlparser_general_testcase.php (working copy)
$this->assertEquals($expected, $alterTable[0]);
}
/**
* @test
* @see http://bugs.typo3.org/view.php?id=14496
*/
public function canParseAlterCharacterSetStatement() {
$parseString = 'ALTER TABLE `index_phash` DEFAULT CHARACTER SET utf8';
$components = $this->fixture->_callRef('parseALTERTABLE', $parseString);
$this->assertTrue(is_array($components), $components);
$alterTable = $this->cleanSql($this->fixture->_callRef('compileALTERTABLE', $components));
$expected = 'ALTER TABLE index_phash DEFAULT CHARACTER SET utf8';
$this->assertTrue(is_array($alterTable), $alterTable);
$this->assertEquals($expected, $alterTable[0]);
}
///////////////////////////////////////
// Tests concerning JOINs
///////////////////////////////////////
(2-2/2)