Project

General

Profile

Actions

Task #90104

closed

Introduce prepared statement for BackendUtility::getPageForRootline

Added by Markus Klein almost 5 years ago. Updated over 4 years 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 4 (0 open4 closed)

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
Actions #1

Updated by Gerrit Code Review almost 5 years 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

Actions #2

Updated by Markus Klein almost 5 years ago

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

Updated by Gerrit Code Review almost 5 years 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

Actions #4

Updated by Gerrit Code Review almost 5 years 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

Actions #5

Updated by Gerrit Code Review almost 5 years 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

Actions #6

Updated by Gerrit Code Review almost 5 years 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

Actions #7

Updated by Gerrit Code Review almost 5 years 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

Actions #8

Updated by Gerrit Code Review almost 5 years 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

Actions #9

Updated by Markus Klein almost 5 years ago

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

Updated by Wolfgang Klinger almost 5 years 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.

Actions #11

Updated by Markus Klein almost 5 years ago

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

Actions #12

Updated by Wolfgang Klinger almost 5 years 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);
Actions #13

Updated by Markus Klein almost 5 years ago

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

Updated by Georg Ringer over 4 years 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
Actions #15

Updated by Benni Mack over 4 years ago

  • Status changed from Resolved to Closed
Actions #16

Updated by Markus Klein over 4 years ago

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

Also available in: Atom PDF