[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)
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

No differences found