Skip to content

Commit

Permalink
MDL-78492 dml: Better support for auroramysql
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mark-webster-catalyst committed Jul 25, 2023
1 parent b4cd637 commit 1a561c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/dml/mysqli_native_moodle_database.php
Expand Up @@ -404,6 +404,10 @@ public function is_compressed_row_format_supported($cached = true) {
} 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;
Expand Down

0 comments on commit 1a561c2

Please sign in to comment.