N°5900 - DB integrity analysis crashes when too many errors - limit the results to 100 to avoid memory errors

This commit is contained in:
Eric Espie
2023-01-19 08:51:02 +01:00
parent 9dc54d6e4c
commit f75a51d59e
6 changed files with 25 additions and 4 deletions

View File

@@ -8,6 +8,7 @@
namespace Combodo\iTop\DBTools\Service;
use CoreException;
use DatabaseAnalyzer;
use Dict;
use DictExceptionMissingString;
use MetaModel;
@@ -38,6 +39,9 @@ class DBAnalyzerUtils
fwrite($fReport, "\r\n-- \r\n");
fwrite($fReport, '-- Class: '.MetaModel::GetName($sClass).' ('.$sClass.")\r\n");
$iCount = $aError['count'];
if ($iCount === DatabaseAnalyzer::LIMIT) {
$iCount = "$iCount(+)";
}
fwrite($fReport, '-- Count: '.$iCount."\r\n");
fwrite($fReport, '-- Error: '.$sErrorLabel."\r\n");
if (array_key_exists('query', $aError)) {