From f5825db70f3cfbfa32905a34bec85f1e14789973 Mon Sep 17 00:00:00 2001 From: Fernando A Castro <25346182+webfer@users.noreply.github.com> Date: Tue, 23 Jul 2024 22:08:00 +0200 Subject: [PATCH 1/3] Update settings.php.j2 feat: setting the MySQL transaction isolation level in settings.php.j2 template --- templates/settings.php.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/settings.php.j2 b/templates/settings.php.j2 index bd7ad99..331aeda 100644 --- a/templates/settings.php.j2 +++ b/templates/settings.php.j2 @@ -11,6 +11,9 @@ $databases['{{ key }}']['{{ target }}'] = array( 'database' => '{{ values.database }}', 'username' => '{{ values.username }}', 'password' => '{{ values.password }}', + 'init_commands' => [ + 'isolation_level' => '{{ values.isolevel }}', + ], ); {% endfor %} From c3c06dbfd583bc906a3e8dab4ea8a37130a18b37 Mon Sep 17 00:00:00 2001 From: Fernando A Castro <25346182+webfer@users.noreply.github.com> Date: Tue, 23 Jul 2024 22:13:08 +0200 Subject: [PATCH 2/3] Update README.md feat: support to setting the MySQL transaction isolation level - README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9348d55..d39e1d9 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ drupal_settings: database: mydatabase username: user password: secret + isolevel: "SET SESSION transaction_isolation=\\'READ-COMMITTED\\'" config_directories: # Optional, Drupal 8 sync: path/to/config trusted_hosts: # Optional, Drupal 8 From 782da3d1034a9a561d7ee236b66ae1415b3807b6 Mon Sep 17 00:00:00 2001 From: Fernando A Castro <25346182+webfer@users.noreply.github.com> Date: Wed, 24 Jul 2024 12:32:26 +0200 Subject: [PATCH 3/3] Update README.md This commit includes a fix for the isolevel key. It was changed to 'isolevel: SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED' to use a more standard syntax that closely follows SQL conventions. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d39e1d9..f4fa54b 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ drupal_settings: database: mydatabase username: user password: secret - isolevel: "SET SESSION transaction_isolation=\\'READ-COMMITTED\\'" + isolevel: 'SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED' config_directories: # Optional, Drupal 8 sync: path/to/config trusted_hosts: # Optional, Drupal 8