Task #90104

Introduce prepared statement for BackendUtility::getPageForRootline

Added by Markus Klein over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Backend API
Target version:
-
Start date:
2020-01-13
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

This function is called a lot, hence the DB statement should be reused.


Related issues

Related to TYPO3 Core - Epic #88474: Page tree performance in 9.5Closed2018-11-16

Actions
Related to TYPO3 Core - Bug #90434: getPageForRootline() caches the SQL statement too greedyClosedMarkus Klein2020-02-19

Actions
Related to TYPO3 Core - Bug #90535: 10.3.0 throws PHP Warning: mysqli_stmt::bind_param(): Couldn't fetch mysqli_stmt in /vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php line 236Closed2020-02-25

Actions
Related to TYPO3 Core - Bug #91206: PDOException "You cannot serialize or unserialize PDOStatement instances" in PopulatePageSlugs wizardClosed2020-04-27

Actions
#1

Updated by Gerrit Code Review over 1 year 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 https://review.typo3.org/c/Packages/TYPO3.CMS/+/62867

#2

Updated by Markus Klein over 1 year ago

  • Related to Epic #88474: Page tree performance in 9.5 added
#3

Updated by Gerrit Code Review over 1 year ago

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

#4

Updated by Gerrit Code Review over 1 year ago

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/c/Packages/TYPO3.CMS/+/62873

#5

Updated by Gerrit Code Review over 1 year ago

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

#6

Updated by Gerrit Code Review over 1 year ago

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

#7

Updated by Gerrit Code Review over 1 year ago

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

#8

Updated by Gerrit Code Review over 1 year ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62902

#9

Updated by Markus Klein over 1 year ago

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

Updated by Wolfgang Klinger over 1 year ago

This introduces a big (at least for me) regression, as the 'additionalFields' are not taken into account here!

So it's impossible to fetch a rootline with any other fields than the default fields hardcoded in the class.

#11

Updated by Markus Klein over 1 year ago

Wolfgang Podbregar: Can you please explain why this change should be responsible? I did not change the query itself.

#12

Updated by Wolfgang Klinger over 1 year ago

            $statement = $runtimeCache->get('getPageForRootlineStatement');

statement is fetched without taking the additionalFields into account.
So when it's cached once, you can pass whatever additionalFields parameter you want, you'll always only get an array of the hardcoded fields of the first call.

So imho this

            $statement = $runtimeCache->get('getPageForRootlineStatement');

should be (only drafted quickly):

            $statement = $runtimeCache->get('getPageForRootlineStatement' . md5(implode(',', $additionalFields)));


and
              $runtimeCache->set('getPageForRootlineStatement' . md5(implode(',', $additionalFields)), $statement);
#13

Updated by Markus Klein over 1 year ago

  • Related to Bug #90434: getPageForRootline() caches the SQL statement too greedy added
#14

Updated by Georg Ringer over 1 year ago

  • Related to Bug #90535: 10.3.0 throws PHP Warning: mysqli_stmt::bind_param(): Couldn't fetch mysqli_stmt in /vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php line 236 added
#15

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
#16

Updated by Markus Klein about 1 year ago

  • Related to Bug #91206: PDOException "You cannot serialize or unserialize PDOStatement instances" in PopulatePageSlugs wizard added

Also available in: Atom PDF