mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38:45 +02:00
N°1173 : mysqldump now correctly use 'mysql_bindir' parameter on setup & move to prod's backups
SVN:trunk[5767]
This commit is contained in:
@@ -677,6 +677,7 @@ if (class_exists('ZipArchive')) // The setup must be able to start even if the "
|
||||
*
|
||||
* @uses mysqldump -V Sample return value : mysqldump Ver 10.13 Distrib 5.7.19, for Win64 (x86_64)
|
||||
* @since 2.5 needed to check compatibility with utf8mb4 (N°1001)
|
||||
* @throws \BackupException
|
||||
*/
|
||||
private static function GetMysqldumpVersion($sMysqldumpCommand)
|
||||
{
|
||||
@@ -684,6 +685,11 @@ if (class_exists('ZipArchive')) // The setup must be able to start even if the "
|
||||
$aOutput = array();
|
||||
exec($sCommand, $aOutput, $iRetCode);
|
||||
|
||||
if ($iRetCode != 0)
|
||||
{
|
||||
throw new BackupException("mysqldump could not be executed (retcode=$iRetCode): Please make sure it is installed and located at : $sMysqldumpCommand");
|
||||
}
|
||||
|
||||
$sMysqldumpOutput = $aOutput[0];
|
||||
$aDumpVersionMatchResults = array();
|
||||
preg_match('/Distrib (\d+\.\d+\.\d+)/', $sMysqldumpOutput, $aDumpVersionMatchResults);
|
||||
|
||||
Reference in New Issue
Block a user