Fixed bug #16501: DBAL does not support multi-column indexes in create table queries
authorXavier Perseguers <typo3@perseguers.ch>
Tue, 30 Nov 2010 15:13:40 +0000 (15:13 +0000)
committerXavier Perseguers <typo3@perseguers.ch>
Tue, 30 Nov 2010 15:13:40 +0000 (15:13 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/dbal/trunk@40682 735d13b6-9817-0410-8766-e36946ffe9aa

typo3/sysext/dbal/ChangeLog
typo3/sysext/dbal/tests/sqlParserGeneralTest.php

index 5294d1e..d5fb039 100644 (file)
@@ -1,5 +1,6 @@
 2010-11-30  Xavier Perseguers  <typo3@perseguers.ch>
 
+       * Fixed bug #16501: DBAL does not support multi-column indexes in create table queries
        * Added feature #16491: Provide a pass-through flag for sql_exec() which goes directly to the native MySQL engine
 
 2010-11-18  Xavier Perseguers  <typo3@perseguers.ch>
index eba6932..820eec3 100644 (file)
@@ -522,6 +522,30 @@ class sqlParserGeneralTest extends BaseTestCase {
 
        /**
         * @test
+        * @see http://bugs.typo3.org/view.php?id=16501
+        */
+       public function indexMayBeCreatedOnMultipleColumns() {
+               $sql = '
+                       CREATE TABLE sys_registry (
+                               uid int(11) unsigned NOT NULL auto_increment,
+                               entry_namespace varchar(128) DEFAULT \'\' NOT NULL,
+                               entry_key varchar(128) DEFAULT \'\' NOT NULL,
+                               entry_value blob,
+                               PRIMARY KEY (uid),
+                               UNIQUE KEY entry_identifier (entry_namespace,entry_key)
+                       )
+               ';
+               $parseString = $sql;
+
+               $createTables = $this->fixture->_callRef('parseCREATETABLE', $parseString);
+               $this->assertTrue(is_array($createTables), $createTables);
+
+               $actual = $this->fixture->_callRef('compileCREATETABLE', $createTables);
+               $this->assertEquals($this->cleanSql($sql), $this->cleanSql($actual[0]));
+       }
+
+       /**
+        * @test
         * @see http://bugs.typo3.org/view.php?id=12829
         */
        public function indexMayContainALengthRestrictionInAlterTable() {