[TASK] SqlParser: Unify internal usage of tableType/engine 76/32376/2
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Thu, 21 Aug 2014 19:50:05 +0000 (21:50 +0200)
committerMarkus Klein <klein.t3@reelworx.at>
Tue, 26 Aug 2014 10:01:10 +0000 (12:01 +0200)
For create-table "tableType" was still used while an alter-table
used "engine".

Change-Id: Idee0e569e331ec66084484f1e8d55d9cab03ff9f
Resolves: #61129
Releases: 6.3, 6.2
Reviewed-on: http://review.typo3.org/32376
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/core/Classes/Database/SqlParser.php

index 8bd85f6..ee3b6bc 100644 (file)
@@ -451,7 +451,7 @@ class SqlParser {
                        // Finding what is after the table definition - table type in MySQL
                        if ($delim == ')') {
                                if ($this->nextPart($parseString, '^((ENGINE|TYPE)[[:space:]]*=)')) {
-                                       $result['tableType'] = $parseString;
+                                       $result['engine'] = $parseString;
                                        $parseString = '';
                                }
                        } else {
@@ -1633,7 +1633,7 @@ class SqlParser {
                $query = 'CREATE TABLE ' . $components['TABLE'] . ' (
                        ' . implode(',
                        ', $fieldsKeys) . '
-                       )' . ($components['tableType'] ? ' ENGINE=' . $components['tableType'] : '');
+                       )' . ($components['engine'] ? ' ENGINE=' . $components['engine'] : '');
                return $query;
        }