[BUGFIX] Superfluous SQL queries on copying records 10/31310/9
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 10:48:47 +0000 (12:48 +0200)
commit0fa74c59e040649e2f34765364c8ce1022fc2f1b
tree9ac59f97d5782f1d3d5c404922a4971dcd3a5aba
parent75b909c86f2ad197527e22456a5b6febc25a5296
[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.

Change-Id: Ib7006a7ceb52376032df8eaefaa918407718a482
Resolves: #58357
Releases: 6.2, 6.3
Reviewed-on: https://review.typo3.org/31310
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Sascha Egerer
Tested-by: Sascha Egerer
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