2010-05-27 Xavier Perseguers <typo3@perseguers.ch>
+ * Fixed bug #14496: SQL parser does not handle ALTER TABLE with character set operation
* Fixed bug #14456: SQL parser doesn't accept ALTER TABLE statement without CHANGE, DROP or ADD keyword
* Fixed bug #14457: 1-2-3 Install Process breaks with PostgreSQL
$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
///////////////////////////////////////