From 1b4f5112392871702b82c7abbe1d234376195503 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 8 Jun 2013 17:59:19 +0200 Subject: [PATCH] Added more break-points for initial SQL insert Some MySQL-servers are ridiculous slow, even creating a simple table takes ages. This change should avoid hitting the maximum execution time. --- wcfsetup/install/files/lib/system/WCFSetup.class.php | 8 ++++---- wcfsetup/setup/db/install.sql | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/system/WCFSetup.class.php b/wcfsetup/install/files/lib/system/WCFSetup.class.php index 47d0fc1653..60340f1bcc 100644 --- a/wcfsetup/install/files/lib/system/WCFSetup.class.php +++ b/wcfsetup/install/files/lib/system/WCFSetup.class.php @@ -304,22 +304,22 @@ class WCFSetup extends WCF { break; case 'logFiles': - $this->calcProgress(11); + $this->calcProgress(14); $this->logFiles(); break; case 'installLanguage': - $this->calcProgress(12); + $this->calcProgress(15); $this->installLanguage(); break; case 'createUser': - $this->calcProgress(13); + $this->calcProgress(16); $this->createUser(); break; case 'installPackages': - $this->calcProgress(14); + $this->calcProgress(17); $this->installPackages(); break; } diff --git a/wcfsetup/setup/db/install.sql b/wcfsetup/setup/db/install.sql index bb9c5f5e59..d09f984ba3 100644 --- a/wcfsetup/setup/db/install.sql +++ b/wcfsetup/setup/db/install.sql @@ -608,6 +608,8 @@ CREATE TABLE wcf1_package_installation_sql_log ( UNIQUE KEY packageID (packageID, sqlTable, sqlColumn, sqlIndex) ); +/* SQL_PARSER_OFFSET */ + DROP TABLE IF EXISTS wcf1_package_requirement; CREATE TABLE wcf1_package_requirement ( packageID INT(10) NOT NULL, @@ -1359,6 +1361,8 @@ ALTER TABLE wcf1_package_installation_queue ADD FOREIGN KEY (packageID) REFERENC ALTER TABLE wcf1_package_installation_sql_log ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE; +/* SQL_PARSER_OFFSET */ + ALTER TABLE wcf1_package_requirement ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE; ALTER TABLE wcf1_package_requirement ADD FOREIGN KEY (requirement) REFERENCES wcf1_package (packageID) ON DELETE CASCADE; @@ -1464,6 +1468,8 @@ ALTER TABLE wcf1_user_notification_event_to_user ADD FOREIGN KEY (eventID) REFER ALTER TABLE wcf1_user_profile_menu_item ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE; +/* SQL_PARSER_OFFSET */ + ALTER TABLE wcf1_user_rank ADD FOREIGN KEY (groupID) REFERENCES wcf1_user_group (groupID) ON DELETE SET NULL; ALTER TABLE wcf1_user_activity_event ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_object_type (objectTypeID) ON DELETE CASCADE; -- 2.20.1