From: Marcel Werk Date: Fri, 29 Jul 2011 19:31:34 +0000 (+0200) Subject: Fixed an issue where index names exceeded the maximum size permitted by MySQL X-Git-Tag: 2.0.0_Beta_1~1930^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d18de6f6362fa32eb1035fa0786a7ac7c901b6a2;p=GitHub%2FWoltLab%2FWCF.git Fixed an issue where index names exceeded the maximum size permitted by MySQL --- diff --git a/wcfsetup/install/files/lib/system/database/util/SQLParser.class.php b/wcfsetup/install/files/lib/system/database/util/SQLParser.class.php index 45ba7b2fa8..ffaa048d57 100644 --- a/wcfsetup/install/files/lib/system/database/util/SQLParser.class.php +++ b/wcfsetup/install/files/lib/system/database/util/SQLParser.class.php @@ -311,6 +311,6 @@ class SQLParser { // get first column $columns = ArrayUtil::trim(explode(',', $columns)); - return $tableName . '_' . reset($columns) . ($suffix ? '_' . $suffix : ''); + return md5($tableName . '_' . reset($columns)) . ($suffix ? '_' . $suffix : ''); } }