diff options
author | Justin Velluppillai <justin@innocraft.com> | 2021-06-29 08:20:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-29 08:20:13 +0300 |
commit | 163445befe0fd3317b284bd409a3762b95c352b8 (patch) | |
tree | 4a3229ba19551ac04b814dc1c0abb27b58abf031 | |
parent | 0c61a7500caae5a427eef8dc38c785b5d56155a2 (diff) |
Allow enabling aurora read replica read committed (#17718)
-rw-r--r-- | core/Db.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/Db.php b/core/Db.php index 09e99b32ce..0e3a8d1df7 100644 --- a/core/Db.php +++ b/core/Db.php @@ -184,6 +184,10 @@ class Db $db = @Adapter::factory($dbConfig['adapter'], $dbConfig); + if (!empty($dbConfig['aurora_readonly_read_committed'])) { + $db->exec('set session aurora_read_replica_read_committed = ON;set session transaction isolation level read committed;'); + } + self::$readerConnection = $db; } |