Skip to content

Commit

Permalink
Merge branch '1.1.0-features' of github.com:guvra/mysqldump-php into …
Browse files Browse the repository at this point in the history
…1.1.0-features
  • Loading branch information
back-2-95 committed Mar 1, 2024
2 parents 2ececab + 847dec0 commit 6e7314b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/Mysqldump.php
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,11 @@ private function listValues(string $tableName)
$ignore = $this->settings->isEnabled('insert-ignore') ? ' IGNORE' : '';
$count = 0;

$isInfoCallable = $this->infoCallable && is_callable($this->infoCallable);
if ($isInfoCallable) {
($this->infoCallable)('table', ['name' => $tableName, 'completed' => false, 'rowCount' => $count]);
}

$line = '';
foreach ($resultSet as $row) {
$count++;
Expand Down Expand Up @@ -867,6 +872,10 @@ private function listValues(string $tableName)
$onlyOnce = true;
$this->write($line . ';' . PHP_EOL);
$line = '';

if ($isInfoCallable) {
($this->infoCallable)('table', ['name' => $tableName, 'completed' => false, 'rowCount' => $count]);
}
}
}

Expand All @@ -878,8 +887,8 @@ private function listValues(string $tableName)

$this->endListValues($tableName, $count);

if ($this->infoCallable && is_callable($this->infoCallable)) {
($this->infoCallable)('table', ['name' => $tableName, 'rowCount' => $count]);
if ($isInfoCallable) {
($this->infoCallable)('table', ['name' => $tableName, 'completed' => true, 'rowCount' => $count]);
}

$this->settings->setCompleteInsert($completeInsertBackup);
Expand Down

0 comments on commit 6e7314b

Please sign in to comment.