* Improvements to Install Tool:
authorMichael Stucki <michael.stucki@typo3.org>
Mon, 3 Mar 2008 16:24:52 +0000 (16:24 +0000)
committerMichael Stucki <michael.stucki@typo3.org>
Mon, 3 Mar 2008 16:24:52 +0000 (16:24 +0000)
  - This allows extensions to define the table engine (e.g. MyISAM should be chosen if the table uses FULLTEXT keys). If no table engine is defined, the system default will be used.

git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3367 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_db.php
t3lib/class.t3lib_install.php

index da58720..807a8cf 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,7 @@
                - Cleanup in t3lib_install
                - Fixed bug #7589: FULLTEXT keys are not processed correctly
                - Detect differences in table engine and table character set during DB compare
+               - This allows extensions to define the table engine (e.g. MyISAM should be chosen if the table uses FULLTEXT keys). If no table engine is defined, the system default will be used.
                - Add character set support to t3lib_install
        * Fix DB field types for static_tsconfig_help
 
index 0055415..cb7f2b7 100755 (executable)
@@ -147,9 +147,6 @@ class t3lib_DB {
                // Default link identifier:
        var $link = FALSE;
 
-               // Default table engine, applies unless engine is explicitely set
-       var $default_engine = 'MyISAM';
-
                // Default character set, applies unless character set or collation are explicitely set
        var $default_charset = 'utf8';
 
index 44b4864..4332920 100755 (executable)
@@ -313,17 +313,16 @@ class t3lib_install {
                        } else {
                                if (substr($value,0,1)==')' && substr($value,-1)==';')  {
                                        $ttype = array();
-                                       if (preg_match('/(ENGINE|TYPE)=([a-zA-Z]*)/',$value,$ttype)) {
+                                       if (preg_match('/(ENGINE|TYPE)[ ]*=[ ]*([a-zA-Z]*)/',$value,$ttype)) {
                                                $total[$table]['extra']['ENGINE'] = $ttype[2];
-                                       } else {
-                                               $total[$table]['extra']['ENGINE'] = $GLOBALS['TYPO3_DB']->default_engine;       // Fallback to default engine
-                                       }
+                                       } // Otherwise, just do nothing: If table engine is not defined, just accept the system default.
+
                                                // Set the collation, if specified
-                                       if (preg_match('/(COLLATE)=([a-zA-z0-9_-]+)/', $value, $tcollation)) {
+                                       if (preg_match('/(COLLATE)[ ]*=[ ]*([a-zA-z0-9_-]+)/', $value, $tcollation)) {
                                                $total[$table]['extra']['COLLATE'] = $tcollation[2];
                                        } else {
                                                        // Otherwise, get the CHARACTER SET and try to find the default collation for it as returned by "SHOW CHARACTER SET" query (for details, see http://dev.mysql.com/doc/refman/5.1/en/charset-table.html)
-                                               if (preg_match('/(CHARSET|CHARACTER SET)=([a-zA-z0-9_-]+)/', $value, $tcharset)) {      // Note: Keywords "DEFAULT CHARSET" and "CHARSET" are the same, so "DEFAULT" can just be ignored
+                                               if (preg_match('/(CHARSET|CHARACTER SET)[ ]*=[ ]*([a-zA-z0-9_-]+)/', $value, $tcharset)) {      // Note: Keywords "DEFAULT CHARSET" and "CHARSET" are the same, so "DEFAULT" can just be ignored
                                                        $charset = $tcharset[2];
                                                } else {
                                                        $charset = $GLOBALS['TYPO3_DB']->default_charset;       // Fallback to default charset