mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-30 22:18:46 +02:00
N°5900 - DB integrity analysis crashes when too many errors - limit the results to 100 to avoid memory errors
This commit is contained in:
@@ -21,6 +21,8 @@ use Combodo\iTop\Core\MetaModel\HierarchicalKey;
|
||||
|
||||
class DatabaseAnalyzer
|
||||
{
|
||||
const LIMIT = 100;
|
||||
|
||||
var $iTimeLimitPerOperation;
|
||||
|
||||
public function __construct($iTimeLimitPerOperation = null)
|
||||
@@ -45,7 +47,7 @@ class DatabaseAnalyzer
|
||||
set_time_limit(intval($this->iTimeLimitPerOperation));
|
||||
}
|
||||
|
||||
$aWrongRecords = CMDBSource::QueryToArray($sSelWrongRecs);
|
||||
$aWrongRecords = CMDBSource::QueryToArray($sSelWrongRecs.' limit '.self::LIMIT);
|
||||
if (count($aWrongRecords) > 0)
|
||||
{
|
||||
foreach($aWrongRecords as $aRes)
|
||||
|
||||
Reference in New Issue
Block a user