Skip to content

Commit

Permalink
Use a readonly connection to create the dump
Browse files Browse the repository at this point in the history
  • Loading branch information
guvra committed Mar 5, 2024
1 parent 2c62e00 commit aa034ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

## WIP

- Use a readonly connection to create the dump ([#121](https://github.com/Smile-SA/gdpr-dump/pull/121))

## [4.2.0] - 2024-03-05
[4.2.0]: https://github.com/Smile-SA/gdpr-dump/compare/4.1.1...4.2.0

Expand Down
3 changes: 3 additions & 0 deletions src/Dumper/MysqlDumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ private function getDumpSettings(DumperConfig $config): array
$settings['exclude-tables'] = $config->getTablesBlacklist();
$settings['no-data'] = $config->getTablesToTruncate();

// Set readonly session
$settings['init_commands'][] = 'SET SESSION TRANSACTION READ ONLY';

return $settings;
}
}

0 comments on commit aa034ae

Please sign in to comment.