-
Bug
-
Resolution: Fixed
-
Minor
-
3.3
-
MOODLE_33_STABLE
-
MOODLE_32_STABLE, MOODLE_33_STABLE
-
wip-
MDL-59476-master-2 -
Dear Moodle community,
MariaDB > 10.2.4 and Mysql 8 refuse to create temporary tables with ROW_FORMAT=Compressed (see link https://jira.mariadb.org/browse/MDEV-11816 and https://dev.mysql.com/worklog/task/?id=7899) and innodb_strict_mode=1 (which is the default).
This problem has crashed my LDAP sync but can maybe affect other functions.
The error is (reported in https://moodle.org/mod/forum/discuss.php?d=354954 too) :
php admin/tool/task/cli/schedule_task.php --execute='\auth_ldap\task\sync_task'
Execute scheduled task: Tâche de synchronisation pour utilisateurs LDAP (auth_ldap\task\sync_task)
Connection au serveur LDAP...Création de la table temporaire tmp_extuser... used 5 dbqueries
... used 0.033057928085327 seconds
Scheduled task failed: Tâche de synchronisation pour utilisateurs LDAP (auth_ldap\task\sync_task),Erreur d'exécution DDL sql
Debug info:
CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
CREATE TEMPORARY TABLE mdl_tmp_extuser (
id BIGINT(10) NOT NULL auto_increment,
username VARCHAR(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
mnethostid BIGINT(10) NOT NULL,
CONSTRAINT PRIMARY KEY (id)
) DEFAULT COLLATE utf8mb4_unicode_ci ROW_FORMAT=Compressed
This are my my.cnf parameters :
innodb_file_per_table = 1
innodb_strict_mode = 1
innodb_large_prefix = 1
As a workaround, I have putted innodb_strict_mode = 0 but it is not recommanded (see https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_strict_mode)
I think a solution would be to add a condition in the public function is_compressed_row_format_supported (lib/dml/mysqli_native_moodle_database.php) but I do not know much the code of Moodle to propose an universal solution.
Thank you for your work, Moodle is great !
Baptiste