[BUGFIX] Handle large number of pages in linkvalidator
This patch handles problems which occured with a large number of pages and also for a large number of records to be checked for broken links. The problems previously resulted in "Prepared statement contains too many placeholders" exceptions and consumption of too much RAM and (possibly) out of memory errors. Technical details about the implementation follows because this is handled slightly differently than in other areas of the core. LinkValidator used named placeholders to build database queries, and the EditableRestriction class also used a number of placeholder. Technically 'doctrine/dbal' explodes named placeholders for array values with quote type 'PARAM_INT_ARRAY' or 'PARAM_STR_ARRAY' to single unnamed placeholders for each value, using one placeholder for each array value. If multiple array value placeholder are used with a large number of values this could quickly emit the "Prepared statement contains too many placeholders" error as the li...
Showing
- typo3/sysext/core/Classes/Database/Query/QueryHelper.php 62 additions, 0 deletionstypo3/sysext/core/Classes/Database/Query/QueryHelper.php
- typo3/sysext/linkvalidator/Classes/LinkAnalyzer.php 34 additions, 21 deletionstypo3/sysext/linkvalidator/Classes/LinkAnalyzer.php
- typo3/sysext/linkvalidator/Classes/QueryRestrictions/EditableRestriction.php 9 additions, 13 deletions...lidator/Classes/QueryRestrictions/EditableRestriction.php
- typo3/sysext/linkvalidator/Classes/Repository/BrokenLinkRepository.php 159 additions, 118 deletions...linkvalidator/Classes/Repository/BrokenLinkRepository.php
- typo3/sysext/linkvalidator/Tests/Functional/LinkAnalyzerTest.php 40 additions, 0 deletions...ysext/linkvalidator/Tests/Functional/LinkAnalyzerTest.php
Please register or sign in to comment