From 1a561c23e626c7bfbb62d0c752c68f891540ff58 Mon Sep 17 00:00:00 2001 From: Mark Webster Date: Fri, 16 Jun 2023 13:07:19 +0100 Subject: [PATCH] MDL-78492 dml: Better support for auroramysql Aurora MySQL does not support row format COMPRESSED and falls back to COMPACT if you try to use it, cuasing column size too large errors if you try to use it with utf8mb4 collation. --- lib/dml/mysqli_native_moodle_database.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/dml/mysqli_native_moodle_database.php b/lib/dml/mysqli_native_moodle_database.php index b66f576135e..c99e98fd0a4 100644 --- a/lib/dml/mysqli_native_moodle_database.php +++ b/lib/dml/mysqli_native_moodle_database.php @@ -404,6 +404,10 @@ class mysqli_native_moodle_database extends moodle_database { } else if ($this->get_row_format() !== 'Barracuda') { $this->compressedrowformatsupported = false; + } else if ($this->get_dbtype() === 'auroramysql') { + // Aurora MySQL doesn't support COMPRESSED and falls back to COMPACT if you try to use it. + $this->compressedrowformatsupported = false; + } else { // All the tests passed, we can safely use ROW_FORMAT=Compressed in sql statements. $this->compressedrowformatsupported = true;