Skip to content

Commit

Permalink
[BUGFIX] Use correct type in DB query
Browse files Browse the repository at this point in the history
A database query was executed when creating a scheduler
task which fetched all optimizable tables.

This was executed with the wrong type in createNamedParameter
(string instead of string array) and resulted in exception in
some scenarios (with MySQL, with additional table mappings).

The problem is now fixed.

Resolves: #100979
Releases: main, 12.4, 11.5
Change-Id: Id5119b9fb07c68baf33fdf4f48e584fec0284455
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79252
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: core-ci <typo3@b13.com>
  • Loading branch information
sypets authored and lolli42 committed Jun 11, 2023
1 parent 17f4346 commit a710f46
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -216,7 +216,7 @@ protected function getOptimizableTablesForConnection(Connection $connection, arr
$queryBuilder->andWhere(
$queryBuilder->expr()->in(
'TABLE_NAME',
$queryBuilder->createNamedParameter($tableNames)
$queryBuilder->createNamedParameter($tableNames, Connection::PARAM_STR_ARRAY)
)
);
}
Expand Down

0 comments on commit a710f46

Please sign in to comment.