- added a condition that removes wrong default values from autoinc-lines when importi...
authorRupert Germann <rupi@gmx.li>
Mon, 18 Apr 2005 11:30:13 +0000 (11:30 +0000)
committerRupert Germann <rupi@gmx.li>
Mon, 18 Apr 2005 11:30:13 +0000 (11:30 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@653 709f56b5-9817-0410-a4d7-c38de5d9e867

t3lib/class.t3lib_install.php

index 1fa1d0d..a985bd2 100755 (executable)
@@ -647,6 +647,9 @@ if (!$this->changedUnsignedFields && isset($this->coreFieldsWithUnsignedKeywordR
                                $this->mysqlVersion = doubleval(substr(trim($linecontent),16));
                        }
                        $is_set = 0;
+                       if(stristr($linecontent,'auto_increment')) {
+                               $linecontent = eregi_replace(' default \'0\'','',$linecontent);
+                       }
 
                        if (!$removeNonSQL || (strcmp(trim($linecontent),'') && substr(trim($linecontent),0,1)!='#' && substr(trim($linecontent),0,2)!='--'))   {               // '--' is seen as mysqldump comments from server version 3.23.49
                                $statementArray[$statementArrayPointer].= $linecontent;