[BUGFIX] Superfluous SQL queries on copying records 02/31502/2
authorOliver Hader <oliver@typo3.org>
Thu, 3 Jul 2014 11:12:20 +0000 (13:12 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Tue, 8 Jul 2014 11:06:58 +0000 (13:06 +0200)
commit3e1a8f53915c3e7ea871fe2a42aa8048ae540375
treeb71a7414d5ea8604b90a4e63eebe2fdb86097619
parent560793ebd5a0f8f481e0e30520329b33187cae34
[BUGFIX] Superfluous SQL queries on copying records

On copying a page in the backend there are lots of superfluous
SQL queries containing "... WHERE uid=0". The reason for that
is, that DataHandler::recordInfo() is called for each field
which then tries to fetch the database record for the given
uid "NEW...". Casting the new record placeholder to an integer
value ends up with the "uid=0" condition.

In a test with copying a page with some sub-pages, there was a
total of about 1300 SQL queries, 300 of them have been those
superfluous "uid=0" SELECT statements.

Resolves: #58357
Releases: 6.2, 6.3
Change-Id: Ib7006a7ceb52376032df8eaefaa918407718a482
Reviewed-on: https://review.typo3.org/31502
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/backend/Tests/Unit/Utility/BackendUtilityTest.php
typo3/sysext/core/Classes/DataHandling/DataHandler.php