Project

General

Profile

Actions

Bug #75932

closed

SQL-Error in ProcessedFileChecksumUpdate

Added by Stephan Großberndt almost 8 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Category:
Install Tool
Target version:
-
Start date:
2016-04-26
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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\'';

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #67708: Invalid SQL: ProcessedFileChecksumUpdate compares BLOB with INTEGER columnClosedMorton Jonuschat2015-06-23

Actions
Follows TYPO3 Core - Bug #36754: SQL warning about collation in the install tool, Upgrade wizardClosed2012-05-01

Actions
Actions #1

Updated by Stephan Großberndt almost 8 years ago

  • Assignee set to Stephan Großberndt
Actions #2

Updated by Gerrit Code Review almost 8 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

Actions #3

Updated by Gerrit Code Review almost 8 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

Actions #4

Updated by Stephan Großberndt almost 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF