N°1163 - GET_LOCK 64 characters limitation in MySQL

SVN:trunk[5135]
This commit is contained in:
Eric Espié
2017-11-21 12:14:20 +00:00
parent d7c78b3ce2
commit b401c65684

View File

@@ -45,7 +45,7 @@ class iTopMutex
}
$sDBName = $oConfig->GetDBName();
$sDBSubname = $oConfig->GetDBSubname();
$this->sName = 'itop.'.$sName;
$this->sName = $sName;
if (substr($sName, -strlen($sDBName.$sDBSubname)) != $sDBName.$sDBSubname)
{
// If the name supplied already ends with the expected suffix
@@ -54,6 +54,9 @@ class iTopMutex
$this->sName .= $sDBName.$sDBSubname;
}
// Limit the length of the name for MySQL > 5.7.5
$this->sName = 'itop.'.md5($this->sName);
$this->bLocked = false; // Not yet locked
if (!array_key_exists($this->sName, self::$aAcquiredLocks))