Commit c03be605 authored by Stephan Großberndt's avatar Stephan Großberndt Committed by Wouter Wolters
Browse files

[BUGFIX] Avoid SQL error in ProcessedFileChecksumUpdate

Avoid an 'Illegal mix of collations'-SQL error when using collation
utf8_unicode_ci and accessing the ProcessedFileChecksumUpdate wizard
by casting both comparison arguments.

Resolves: #75932
Related: #67708
Releases: master, 7.6
Change-Id: I3c7355eab35bf7d7301eaf10b87f7e5b00bd6908
Reviewed-on: https://review.typo3.org/47925


Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
Reviewed-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
parent 21dba7b1
......@@ -40,7 +40,7 @@ class ProcessedFileChecksumUpdate extends AbstractUpdate
return false;
}
$join = 'sys_file_processedfile LEFT JOIN sys_registry ON entry_key = CAST(sys_file_processedfile.uid AS CHAR) AND entry_namespace = \'ProcessedFileChecksumUpdate\'';
$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\'';
$count = $this->getDatabaseConnection()->exec_SELECTcountRows('*', $join, '(entry_key IS NULL AND sys_file_processedfile.identifier <> \'\') OR sys_file_processedfile.width IS NULL');
if (!$count) {
return false;
......
Supports Markdown
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