Project

General

Profile

Bug #18251 » 7589.diff

Administrator Admin, 2008-02-19 13:12

View differences:

t3lib/class.t3lib_install.php (working copy)
// Remove double blanks
$parts[1] = preg_replace('/([^ ]+)[ ]+([^ ]+)/', '$1 $2', $parts[1]);
if ($parts[0]!='PRIMARY' && $parts[0]!='KEY' && $parts[0]!='UNIQUE') {
if ($parts[0]!='PRIMARY' && $parts[0]!='FULLTEXT' && $parts[0]!='KEY' && $parts[0]!='UNIQUE') {
$key = str_replace('`', '', $parts[0]);
$total[$isTable]['fields'][$key] = $parts[1];
} else { // Process keys
$newParts = explode(' ',$parts[1],2);
$key = str_replace('`', '', ($parts[0]=='PRIMARY'?$parts[0]:$newParts[0]));
$newParts = explode(' ',$parts[1],3);
if ($parts[0] == 'PRIMARY') {
$key = $parts[0];
}
elseif ($parts[0] == 'FULLTEXT') {
$key = $newParts[1];
}
else {
$key = $newParts[0];
}
$key = str_replace('`', '', $key);
$lineV = str_replace('`', '', $lineV);
$total[$isTable]['keys'][$key] = $lineV;
}
......
}
if ($keyRow['Key_name']=='PRIMARY') {
$tempKeysPrefix[$tableName][$keyRow['Key_name']] = 'PRIMARY KEY';
} else {
}
elseif ($keyRow['Index_type'] == 'FULLTEXT') {
$tempKeysPrefix[$tableName][$keyRow['Key_name']] = 'FULLTEXT KEY ' . $keyRow['Key_name'];
}
else {
if ($keyRow['Non_unique']) {
$tempKeysPrefix[$tableName][$keyRow['Key_name']] = 'KEY';
} else {
(1-1/3)