From 6ca3ca108bd2432b62d4b8971e3c4175b2a792fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20Espi=C3=A9?= Date: Fri, 8 Jun 2018 09:23:30 +0000 Subject: [PATCH] =?UTF-8?q?N=C2=B01420=20-=20Fix=20index=20generation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SVN:2.4[5837] --- core/metamodel.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/metamodel.class.php b/core/metamodel.class.php index c33f7db4cc..69067b8d59 100644 --- a/core/metamodel.class.php +++ b/core/metamodel.class.php @@ -3911,7 +3911,10 @@ abstract class MetaModel foreach (self::DBGetIndexes($sClass) as $aColumns) { $sIndexId = implode('_', $aColumns); - + if (isset($aTableInfo['Indexes'][$sIndexId]) && $aTableInfo['Indexes'][$sIndexId]['used']) + { + continue; + } if(!CMDBSource::HasIndex($sTable, $sIndexId, $aColumns)) { $sColumns = "`".implode("`, `", $aColumns)."`";