Bug #67708

Invalid SQL: ProcessedFileChecksumUpdate compares BLOB with INTEGER column

Added by Morton Jonuschat about 1 month ago. Updated 14 days ago.

Status:Resolved Start date:2015-06-23
Priority:Must have Due date:
Assigned To:Morton Jonuschat % Done:

100%

Category:7 Install Improvements Spent time: -
Target version:7.4 (Backend)
TYPO3 Version:7 Is Regression:No
PHP Version:5.6 Sprint Focus:
Complexity:easy

Description

The following statement is performed during the 7.4-dev Upgrade Wizard:

SELECT COUNT(*) FROM "sys_file_processedfile" LEFT JOIN "sys_registry" ON "entry_key"="sys_file_processedfile"."uid" AND "entry_namespace"='ProcessedFileChecksumUpdate' WHERE ("entry_key" IS NULL AND "sys_file_processedfile"."identifier" <> '') OR "sys_file_processedfile"."width" IS NULL

This query compares a BLOB field with an INTEGER field without doing an explicit cast. This is fine on MySQL but fails on DBAL Installations, i.e. running PostgreSQL.

Associated revisions

Revision acdca0a6
Added by Morton Jonuschat 14 days ago

[BUGFIX] Make ProcessedFileChecksumUpdate compatible with DBAL

Use explicit CAST statements in the SQL queries performed by the
updater to allow other DBMS to compare a VARCHAR with an INT field.

The SQLparser has been extended to support CAST statements as part
of a JOIN clause.

Resolves: #67708
Related: #66614
Releases: master
Change-Id: I4a13eae92290b9ce8149aa5ef93df1305c02715a
Reviewed-on: http://review.typo3.org/40576
Reviewed-by: Markus Klein <>
Reviewed-by: Andreas Fernandez <>
Tested-by: Andreas Fernandez <>
Reviewed-by: Xavier Perseguers <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 Updated by Gerrit Code Review about 1 month ago

  • Status changed from New 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 http://review.typo3.org/40576

#2 Updated by Gerrit Code Review 29 days ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40576

#3 Updated by Gerrit Code Review 25 days ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40576

#4 Updated by Susanne Moog 21 days ago

  • Category changed from Install Tool to 7 Install Improvements

#5 Updated by Morton Jonuschat 14 days ago

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

Also available in: Atom PDF