Skip to content

Commit

Permalink
add option for --no-tablespaces in mysqldump
Browse files Browse the repository at this point in the history
  • Loading branch information
steinkel committed Jul 14, 2022
1 parent dae801f commit 746d819
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Docs/Documentation/Configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Configuration
=============

**DbTest** Config options:

* `DbTest.dumpNoTablespaces` (?bool, default null). Will append `--no-tablespaces` when doing a mysqldump (in MysqlEngine).
* `DbTest.dumpExtendedInserts` (?bool, default null). IF `false` it will append `--extended-insert=FALSE` when doing a mysqldump (in MysqlEngine).
1 change: 1 addition & 0 deletions Docs/Home.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ Documentation
* [Installation](Documentation/Installation.md)
* [Examples](Documentation/Examples.md)
* [Workflow](Documentation/Workflow.md)
* [Configuration](Documentation/Configuration.md)

3 changes: 3 additions & 0 deletions src/Engine/MysqlEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ public function export($file, $options = [])
if (Configure::read('DbTest.dumpExtendedInserts') !== true) {
$command .= " --extended-insert=FALSE";
}
if (Configure::read('DbTest.dumpNoTablespaces') === true) {
$command .= " --no-tablespaces";
}
$command .= " $baseArgs $databaseName | grep -v -a '/*!50013 DEFINER'";
if (!empty($file)) {
$command .= " > $file";
Expand Down

0 comments on commit 746d819

Please sign in to comment.