Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function getTag()
protected function makeDump()
{
$this->runProcess(sprintf(
'MYSQL_PWD=%s mysqldump -h %s -P %s -u %s %s > %s',
'MYSQL_PWD="%s" mysqldump -h %s -P %s -u %s %s > %s',
$this->dbPass,
$this->dbHost,
$this->dbPort,
Expand All @@ -150,7 +150,7 @@ protected function makeDump()
protected function restoreDbFromDump()
{
$this->runProcess(sprintf(
'MYSQL_PWD=%s mysql -h %s -P %s -u %s %s < %s',
'MYSQL_PWD="%s" mysql -h %s -P %s -u %s %s < %s',
$this->dbPass,
$this->dbHost,
$this->dbPort,
Expand All @@ -176,7 +176,7 @@ protected function createTempDb()
}

$this->runProcess(sprintf(
'MYSQL_PWD=%s mysql -e "create database %s;" -h %s -P %s -u %s',
'MYSQL_PWD="%s" mysql -e "create database %s;" -h %s -P %s -u %s',
$this->dbPass,
$this->dbTempName,
$this->dbHost,
Expand All @@ -192,7 +192,7 @@ protected function createDb()
}

$this->runProcess(sprintf(
'MYSQL_PWD=%s mysql -e "create database %s;" -h %s -P %s -u %s',
'MYSQL_PWD="%s" mysql -e "create database %s;" -h %s -P %s -u %s',
$this->dbPass,
$this->dbName,
$this->dbHost,
Expand All @@ -207,7 +207,7 @@ protected function createDb()
protected function renameTempDb()
{
$this->restoreDbFromDumpProcess = $this->runProcess(sprintf(
'MYSQL_PWD=%s && for table in `mysql -h %s -P %s -u %s -s -N -e "use %s;show tables from %4$s;"`; '.
'MYSQL_PWD="%s" && for table in `mysql -h %s -P %s -u %s -s -N -e "use %s;show tables from %4$s;"`; '.
'do mysql -h %2$s -u %3$s -s -N -e "use %4$s;rename table %4$s.$table to %5$s.$table;"; done;',
$this->dbPass,
$this->dbHost,
Expand All @@ -225,7 +225,7 @@ protected function dropDb()
}

$this->runProcess(sprintf(
'MYSQL_PWD=%s mysql -e "drop database %s;" -h %s -P %s -u %s',
'MYSQL_PWD="%s" mysql -e "drop database %s;" -h %s -P %s -u %s',
$this->dbPass,
$this->dbName,
$this->dbHost,
Expand All @@ -237,7 +237,7 @@ protected function dropDb()
protected function dropTempDb()
{
$this->runProcess(sprintf(
'MYSQL_PWD=%s mysql -e "drop database %s;" -h %s -P %s -u %s',
'MYSQL_PWD="%s" mysql -e "drop database %s;" -h %s -P %s -u %s',
$this->dbPass,
$this->dbTempName,
$this->dbHost,
Expand Down Expand Up @@ -272,7 +272,7 @@ protected function runProcess($commandline, $timeout = 120)
private function isDbExists($dbName)
{
$process = $this->runProcess(sprintf(
'MYSQL_PWD=%s mysql -e "SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA '.
'MYSQL_PWD="%s" mysql -e "SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA '.
'WHERE SCHEMA_NAME = \'%s\'" -h %s -P %s -u %s',
$this->dbPass,
$dbName,
Expand Down