Project

General

Profile

Actions

Bug #85257

closed

Bug #80875: Multiple problems with relation handler if too many records exist on a page

OrphanRecordsCommand fails if list of ids is too long

Added by Sascha Egerer almost 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2018-06-13
Due date:
% Done:

100%

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

Description

Thomas Rawiel wrote:

Sascha, here is the requested stack trace,
when running
./typo3cms cleanup:orphanrecords -vvv via CLI
(TYPO3 8.7.16)

[ Doctrine\DBAL\Exception\DriverException ]      
 An exception occurred while executing 'SELECT `uid` FROM `tx_dmdeveloperlog_domain_model_logentry` WHERE `uid` NOT IN (?, ###ABOUT 140000 Placeholders###, ?) ORDER BY `uid` ASC' with params [###LIST-OF-IDs###]:  

 Prepared statement contains too many placeholders  

Exception trace:
#0 ()
  /var/www/src/typo3_src-8.7.16/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:115
#1 Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException()
  /var/www/src/typo3_src-8.7.16/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:128
#2 Doctrine\DBAL\DBALException::driverExceptionDuringQuery()
  /var/www/src/typo3_src-8.7.16/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:855
#3 Doctrine\DBAL\Connection->executeQuery()
  /var/www/src/typo3_src-8.7.16/vendor/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php:206
#4 Doctrine\DBAL\Query\QueryBuilder->execute()
  typo3/sysext/core/Classes/Database/Query/QueryBuilder.php:187
#5 TYPO3\CMS\Core\Database\Query\QueryBuilder->execute()
  typo3/sysext/lowlevel/Classes/Command/OrphanRecordsCommand.php:109
#6 TYPO3\CMS\Lowlevel\Command\OrphanRecordsCommand->execute()
  typo3conf/ext/typo3_console/Libraries/symfony-process.phar/vendor/symfony/console/Command/Command.php:252
#7 Symfony\Component\Console\Command\Command->run()
  typo3conf/ext/typo3_console/Libraries/symfony-process.phar/vendor/symfony/console/Application.php:946
#8 Symfony\Component\Console\Application->doRunCommand()
  typo3conf/ext/typo3_console/Libraries/symfony-process.phar/vendor/symfony/console/Application.php:248
#9 Symfony\Component\Console\Application->doRun()
  typo3conf/ext/typo3_console/Libraries/symfony-process.phar/vendor/symfony/console/Application.php:148
#10 Symfony\Component\Console\Application->run()
  typo3conf/ext/typo3_console/Classes/Console/Core/Kernel.php:162
#11 Helhum\Typo3Console\Core\Kernel->handle()
  typo3conf/ext/typo3_console/Scripts/typo3-console.php:19
#12 {closure}()
  typo3conf/ext/typo3_console/Scripts/typo3-console.php:21
#13 require()
  typo3cms:18

Caused by:

 [ Doctrine\DBAL\Driver\Mysqli\MysqliException ]
 Prepared statement contains too many placeholders

Exception trace:
#0 ()
  /var/www/src/typo3_src-8.7.16/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php:94
#1 Doctrine\DBAL\Driver\Mysqli\MysqliStatement->__construct()
  /var/www/src/typo3_src-8.7.16/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php:120
#2 Doctrine\DBAL\Driver\Mysqli\MysqliConnection->prepare()
  /var/www/src/typo3_src-8.7.16/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:844
#3 Doctrine\DBAL\Connection->executeQuery()
  /var/www/src/typo3_src-8.7.16/vendor/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php:206
#4 Doctrine\DBAL\Query\QueryBuilder->execute()
  typo3/sysext/core/Classes/Database/Query/QueryBuilder.php:187
#5 TYPO3\CMS\Core\Database\Query\QueryBuilder->execute()
  typo3/sysext/lowlevel/Classes/Command/OrphanRecordsCommand.php:109
#6 TYPO3\CMS\Lowlevel\Command\OrphanRecordsCommand->execute()
  typo3conf/ext/typo3_console/Libraries/symfony-process.phar/vendor/symfony/console/Command/Command.php:252
#7 Symfony\Component\Console\Command\Command->run()
  typo3conf/ext/typo3_console/Libraries/symfony-process.phar/vendor/symfony/console/Application.php:946
#8 Symfony\Component\Console\Application->doRunCommand()
  typo3conf/ext/typo3_console/Libraries/symfony-process.phar/vendor/symfony/console/Application.php:248
#9 Symfony\Component\Console\Application->doRun()
  typo3conf/ext/typo3_console/Libraries/symfony-process.phar/vendor/symfony/console/Application.php:148
#10 Symfony\Component\Console\Application->run()
  typo3conf/ext/typo3_console/Classes/Console/Core/Kernel.php:162
#11 Helhum\Typo3Console\Core\Kernel->handle()
  typo3conf/ext/typo3_console/Scripts/typo3-console.php:19
#12 {closure}()
  typo3conf/ext/typo3_console/Scripts/typo3-console.php:21
#13 require()
  typo3cms:18

cleanup:orphanrecords [--dry-run]
Actions

Also available in: Atom PDF