Bug #91516
closedInstall-Tool -> Analyze Database Structure is broken / fails if cache tables dosen't exist
0%
Description
if for example database table "cache_hash" or "cache_hash_tags" doesn't exist, then the "Analyze Database Structure" wizard doesn't work - upgrade wizard fails too -> message: "Something went wrong".
At the TYPO3 log:
Thu, 28 May 2020 16:14:41 +0200 [CRITICAL] request="dbf918a918ac0" component="TYPO3.CMS.Core.Error.DebugExceptionHandler": Core: Exception handler (WEB): Uncaught TYPO3 Exception: An exception occurred while executing 'TRUNCATE `cache_hash_tags`':
Table '[DB-Name].cache_hash_tags' doesn't exist | Doctrine\DBAL\Exception\TableNotFoundException thrown in file C:\MAMP\htdocs\typo3_sources\typo3_src-10.4.3\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\AbstractMySQLDriver.php in line 42. Requested URL: http://[DB-Name].localhost/typo3/install.php?install[controller]=maintenance&install[action]=cacheClearAll - {"TYPO3_MODE":"BE","exception":"Doctrine\\DBAL\\Driver\\Mysqli\\MysqliException: Table '[DB-Name].cache_hash_tags' doesn't exist in C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\Mysqli\\MysqliConnection.php:161\nStack trace:\n#0 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Connection.php(1066): Doctrine\\DBAL\\Driver\\Mysqli\\MysqliConnection->exec('TRUNCATE `cache...')\n#1 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Database\\Connection.php(340): Doctrine\\DBAL\\Connection->executeUpdate('TRUNCATE `cache...')\n#2 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Cache\\Backend\\Typo3DatabaseBackend.php(258): TYPO3\\CMS\\Core\\Database\\Connection->truncate('cache_hash_tags')\n#3 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Cache\\Frontend\\AbstractFrontend.php(116): TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend->flush()\n#4 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Cache\\CacheManager.php(174): TYPO3\\CMS\\Core\\Cache\\Frontend\\AbstractFrontend->flush()\n#5 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\install\\Classes\\Service\\ClearCacheService.php(111): TYPO3\\CMS\\Core\\Cache\\CacheManager->flushCaches()\n#6 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\install\\Classes\\Service\\ClearCacheService.php(76): TYPO3\\CMS\\Install\\Service\\ClearCacheService->flushCaches(Array)\n#7 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\install\\Classes\\Controller\\MaintenanceController.php(125): TYPO3\\CMS\\Install\\Service\\ClearCacheService->clearAll()\n#8 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\install\\Classes\\Middleware\\Maintenance.php(237): TYPO3\\CMS\\Install\\Controller\\MaintenanceController->cacheClearAllAction(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#9 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Http\\MiddlewareDispatcher.php(121): TYPO3\\CMS\\Install\\Middleware\\Maintenance->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(class@anonymous))\n#10 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Middleware\\NormalizedParamsAttribute.php(45): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#11 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Http\\MiddlewareDispatcher.php(172): TYPO3\\CMS\\Core\\Middleware\\NormalizedParamsAttribute->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(class@anonymous))\n#12 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Http\\MiddlewareDispatcher.php(78): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#13 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Http\\AbstractApplication.php(85): TYPO3\\CMS\\Core\\Http\\MiddlewareDispatcher->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#14 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\install\\Classes\\Http\\Application.php(50): TYPO3\\CMS\\Core\\Http\\AbstractApplication->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#15 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Http\\AbstractApplication.php(97): TYPO3\\CMS\\Install\\Http\\Application->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#16 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\install.php(105): TYPO3\\CMS\\Core\\Http\\AbstractApplication->run()\n#17 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\install.php(106): {closure}()\n#18 {main}\n\nNext Doctrine\\DBAL\\Exception\\TableNotFoundException: An exception occurred while executing 'TRUNCATE `cache_hash_tags`':\n\nTable '[DB-Name].cache_hash_tags' doesn't exist in C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\AbstractMySQLDriver.php:42\nStack trace:\n#0 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\DBALException.php(166): Doctrine\\DBAL\\Driver\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\DBAL\\Driver\\Mysqli\\MysqliException))\n#1 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\DBALException.php(146): Doctrine\\DBAL\\DBALException::wrapException(Object(Doctrine\\DBAL\\Driver\\Mysqli\\Driver), Object(Doctrine\\DBAL\\Driver\\Mysqli\\MysqliException), 'An exception oc...')\n#2 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Connection.php(1069): Doctrine\\DBAL\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\DBAL\\Driver\\Mysqli\\Driver), Object(Doctrine\\DBAL\\Driver\\Mysqli\\MysqliException), 'TRUNCATE `cache...', Array)\n#3 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Database\\Connection.php(340): Doctrine\\DBAL\\Connection->executeUpdate('TRUNCATE `cache...')\n#4 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Cache\\Backend\\Typo3DatabaseBackend.php(258): TYPO3\\CMS\\Core\\Database\\Connection->truncate('cache_hash_tags')\n#5 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Cache\\Frontend\\AbstractFrontend.php(116): TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend->flush()\n#6 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Cache\\CacheManager.php(174): TYPO3\\CMS\\Core\\Cache\\Frontend\\AbstractFrontend->flush()\n#7 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\install\\Classes\\Service\\ClearCacheService.php(111): TYPO3\\CMS\\Core\\Cache\\CacheManager->flushCaches()\n#8 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\install\\Classes\\Service\\ClearCacheService.php(76): TYPO3\\CMS\\Install\\Service\\ClearCacheService->flushCaches(Array)\n#9 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\install\\Classes\\Controller\\MaintenanceController.php(125): TYPO3\\CMS\\Install\\Service\\ClearCacheService->clearAll()\n#10 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\install\\Classes\\Middleware\\Maintenance.php(237): TYPO3\\CMS\\Install\\Controller\\MaintenanceController->cacheClearAllAction(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#11 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Http\\MiddlewareDispatcher.php(121): TYPO3\\CMS\\Install\\Middleware\\Maintenance->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(class@anonymous))\n#12 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Middleware\\NormalizedParamsAttribute.php(45): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#13 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Http\\MiddlewareDispatcher.php(172): TYPO3\\CMS\\Core\\Middleware\\NormalizedParamsAttribute->process(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest), Object(class@anonymous))\n#14 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Http\\MiddlewareDispatcher.php(78): class@anonymous->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#15 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Http\\AbstractApplication.php(85): TYPO3\\CMS\\Core\\Http\\MiddlewareDispatcher->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#16 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\install\\Classes\\Http\\Application.php(50): TYPO3\\CMS\\Core\\Http\\AbstractApplication->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#17 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\sysext\\core\\Classes\\Http\\AbstractApplication.php(97): TYPO3\\CMS\\Install\\Http\\Application->handle(Object(TYPO3\\CMS\\Core\\Http\\ServerRequest))\n#18 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\install.php(105): TYPO3\\CMS\\Core\\Http\\AbstractApplication->run()\n#19 C:\\MAMP\\htdocs\\typo3_sources\\typo3_src-10.4.3\\typo3\\install.php(106): {closure}()\n#20 {main}"}
Expectation:
at least the "Analyze Database Structure" wizard should only create the table if it does not exist before trying to empty it or not?