Bug #75932
closedSQL-Error in ProcessedFileChecksumUpdate
100%
Description
We use utf8_unicode_ci on our servers. Using the ProcessedFileChecksumUpdate leads to an SQL error:
Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=' array(4 items) caller => "TYPO3\CMS\Core\Database\DatabaseConnection::exec_SELECTquery" (60 chars) ERROR => "Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IM PLICIT) for operation '='" (101 chars) lastBuiltQuery => "SELECT COUNT(*) FROM sys_file_processedfile LEFT JOIN sys_registry ON entry_ key = CAST(sys_file_processedfile.uid AS CHAR) AND entry_namespace = 'Proces sedFileChecksumUpdate' WHERE (entry_key IS NULL AND sys_file_processedfile.i dentifier <> '') OR sys_file_processedfile.width IS NULL" (284 chars) debug_backtrace => "call_user_func#109 // {closure}# // TYPO3\CMS\Install\Http\Application->run# 108 // TYPO3\CMS\Core\Core\Bootstrap->handleRequest#74 // TYPO3\CMS\Install\ Http\RequestHandler->handleRequest#302 // TYPO3\CMS\Install\Controller\ToolC ontroller->execute#64 // TYPO3\CMS\Install\Controller\ToolController->dispat chAuthenticationActions#64 // TYPO3\CMS\Install\Controller\Action\AbstractAc tion->handle#192 // TYPO3\CMS\Install\Controller\Action\Tool\UpgradeWizard-> executeAction#92 // TYPO3\CMS\Install\Controller\Action\Tool\UpgradeWizard-> listUpdates#72 // TYPO3\CMS\Install\Updates\AbstractUpdate->shouldRenderWiza rd#98 // TYPO3\CMS\Install\Updates\ProcessedFileChecksumUpdate->checkForUpda te#120 // TYPO3\CMS\Core\Database\DatabaseConnection->exec_SELECTcountRows#4 4 // TYPO3\CMS\Core\Database\DatabaseConnection->exec_SELECTquery#440 // TYP O3\CMS\Core\Database\DatabaseConnection->debug#314" (886 chars)
In the patch https://review.typo3.org/#/c/32117/ for issue #36754 this has been solved for the TceformsUpdateWizard
and TtContentUploadsUpdateWizard
In the patch https://review.typo3.org/#/c/40576/ for issue #66614 this behaviour leading to the SQL error has been introduced in ProcessedFileChecksumUpdate
This is related to #36754.
Casting both sides of the comparison solves the issue:
Instead of
$join = 'sys_file_processedfile LEFT JOIN sys_registry ON entry_key = CAST(sys_file_processedfile.uid AS CHAR) AND entry_namespace = \'ProcessedFileChecksumUpdate\'';
use
$join = 'sys_file_processedfile LEFT JOIN sys_registry ON CAST(entry_key AS CHAR) = CAST(sys_file_processedfile.uid AS CHAR) AND entry_namespace = \'ProcessedFileChecksumUpdate\'';
Updated by Stephan Großberndt almost 9 years ago
- Assignee set to Stephan Großberndt
Updated by Gerrit Code Review almost 9 years ago
- Status changed from In Progress to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47925
Updated by Gerrit Code Review almost 9 years ago
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47946
Updated by Stephan Großberndt almost 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset c03be605def5fcb70f1e1d8ce2dadce51137cc21.