diff --git a/docker-compose.yml b/docker-compose.yml index 6dcc7ec2f6..62a322db81 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,7 +15,7 @@ services: ports: # Useful to connect a local MySQL client / GUI - 127.0.0.1:13306:3306 - command: --max-connections=1000 --max-allowed-packet=512M + command: --max-connections=1000 --max-allowed-packet=512M --innodb_snapshot_isolation=OFF volumes: - /var/lib/mysql domjudge: diff --git a/webapp/src/Controller/Jury/JuryMiscController.php b/webapp/src/Controller/Jury/JuryMiscController.php index e664c4b9dd..13fbd55696 100644 --- a/webapp/src/Controller/Jury/JuryMiscController.php +++ b/webapp/src/Controller/Jury/JuryMiscController.php @@ -50,9 +50,9 @@ public function __construct( public function indexAction(ConfigurationService $config): Response { if ($this->isGranted('ROLE_ADMIN')) { - $innodbSnapshotIsolation = $this->em->getConnection()->query('SHOW VARIABLES LIKE "innodb_snapshot_isolation"')->fetchOne(); - if ($innodbSnapshotIsolation) { - $this->addFlash('danger', 'InnoDB snapshot isolation is enabled. Set --innodb_snapshot_isolation=false in your MariaDB configuration. See https://github.com/DOMjudge/domjudge/issues/2848 for more information.'); + $innodbSnapshotIsolation = $this->em->getConnection()->query('SHOW VARIABLES LIKE "innodb_snapshot_isolation"')->fetchAssociative(); + if ($innodbSnapshotIsolation && $innodbSnapshotIsolation['Value'] === 'ON') { + $this->addFlash('danger', 'InnoDB snapshot isolation is enabled. Set --innodb_snapshot_isolation=OFF in your MariaDB configuration. See https://github.com/DOMjudge/domjudge/issues/2848 for more information.'); } } diff --git a/webapp/src/Service/CheckConfigService.php b/webapp/src/Service/CheckConfigService.php index 6de3f32837..14c8f9b652 100644 --- a/webapp/src/Service/CheckConfigService.php +++ b/webapp/src/Service/CheckConfigService.php @@ -255,9 +255,9 @@ public function checkMysqlSettings(): ConfigCheckItem $desc .= sprintf("max_allowed_packet is set to %s.\n", Utils::printsize((int)$vars['max_allowed_packet'])); } - if ($vars['innodb_snapshot_isolation'] === 'true') { + if ($vars['innodb_snapshot_isolation'] === 'ON') { $result = 'E'; - $desc .= 'InnoDB snapshot isolation is enabled. Set --innodb_snapshot_isolation=false in your MariaDB configuration. See https://github.com/DOMjudge/domjudge/issues/2848 for more information.'; + $desc .= 'InnoDB snapshot isolation is enabled. Set --innodb_snapshot_isolation=OFF in your MariaDB configuration. See https://github.com/DOMjudge/domjudge/issues/2848 for more information.'; } else { $desc .= "InnoDB snapshot isolation is not enabled.\n"; }