mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°4399 Fix memory error on setup when lots of attachment in DB
This commit is contained in:
@@ -177,6 +177,12 @@ SQL;
|
||||
SetupPage::log_info("Initializing attachment/item_org_id - zero to the container");
|
||||
$oSearch = DBObjectSearch::FromOQL("SELECT Attachment WHERE item_org_id = 0");
|
||||
$oSet = new DBObjectSet($oSearch);
|
||||
$oSet->OptimizeColumnLoad([
|
||||
'Attachment' => [
|
||||
'item_class',
|
||||
'item_id',
|
||||
]
|
||||
]);
|
||||
$iUpdated = 0;
|
||||
while ($oAttachment = $oSet->Fetch())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user