Skip to content
Snippets Groups Projects
Commit 2bdbb2ba authored by Christian Kuhn's avatar Christian Kuhn Committed by Georg Ringer
Browse files

[BUGFIX] Install tool upgrade wizards fail on postgres

Controller class UpgradeWizard of install tool method performUpdate()
calls getDatabaseConnection() (old TYPO3_DB) and connects. This was
done in the past to receive the list of executed queries during
upgrade and is now implemented in the single upgrade classes directly.

If running postgres, the connect attempt of old database class tries
to connect to a mysql instance and runs into a timeout.

Remove this TYPO3_DB left over from the install tool to successfully
execute upgrade wizards on non-mysql platforms.

Change-Id: Ia87ae4bce1c4f4992527f0fa6fbddebdb6e3733c
Resolves: #80026
Releases: master
Reviewed-on: https://review.typo3.org/51862


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
parent b62f0625
Branches
Tags
No related merge requests found
......@@ -186,30 +186,6 @@ abstract class AbstractAction implements ActionInterface
return $context;
}
/**
* Get database instance.
* Will be initialized if it does not exist yet.
*
* @return \TYPO3\CMS\Core\Database\DatabaseConnection
*/
protected function getDatabaseConnection()
{
static $database;
if (!is_object($database)) {
/** @var \TYPO3\CMS\Core\Database\DatabaseConnection $database */
$database = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Database\DatabaseConnection::class);
$database->setDatabaseUsername($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['user']);
$database->setDatabasePassword($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['password']);
$database->setDatabaseHost($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['host']);
$database->setDatabasePort($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['port']);
$database->setDatabaseSocket($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['unix_socket']);
$database->setDatabaseName($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['dbname']);
$database->initialize();
$database->connectDB();
}
return $database;
}
/**
* Some actions like the database analyzer and the upgrade wizards need additional
* bootstrap actions performed.
......
......@@ -284,8 +284,6 @@ class UpgradeWizard extends Action\AbstractAction
*/
protected function performUpdate()
{
$this->getDatabaseConnection()->store_lastBuiltQuery = true;
$wizardIdentifier = $this->postValues['values']['identifier'];
$className = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'][$wizardIdentifier];
$updateObject = $this->getUpdateObjectInstance($className, $wizardIdentifier);
......@@ -336,8 +334,6 @@ class UpgradeWizard extends Action\AbstractAction
$this->view->assign('wizardData', $wizardData);
$this->getDatabaseConnection()->store_lastBuiltQuery = false;
// Next update wizard, if available
$nextUpdate = $this->getNextUpdateInstance($updateObject);
$nextUpdateIdentifier = '';
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment