mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°1163 - GET_LOCK 64 characters limitation in MySQL
SVN:trunk[5135]
This commit is contained in:
@@ -45,7 +45,7 @@ class iTopMutex
|
|||||||
}
|
}
|
||||||
$sDBName = $oConfig->GetDBName();
|
$sDBName = $oConfig->GetDBName();
|
||||||
$sDBSubname = $oConfig->GetDBSubname();
|
$sDBSubname = $oConfig->GetDBSubname();
|
||||||
$this->sName = 'itop.'.$sName;
|
$this->sName = $sName;
|
||||||
if (substr($sName, -strlen($sDBName.$sDBSubname)) != $sDBName.$sDBSubname)
|
if (substr($sName, -strlen($sDBName.$sDBSubname)) != $sDBName.$sDBSubname)
|
||||||
{
|
{
|
||||||
// If the name supplied already ends with the expected suffix
|
// If the name supplied already ends with the expected suffix
|
||||||
@@ -54,6 +54,9 @@ class iTopMutex
|
|||||||
$this->sName .= $sDBName.$sDBSubname;
|
$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
|
$this->bLocked = false; // Not yet locked
|
||||||
|
|
||||||
if (!array_key_exists($this->sName, self::$aAcquiredLocks))
|
if (!array_key_exists($this->sName, self::$aAcquiredLocks))
|
||||||
|
|||||||
Reference in New Issue
Block a user