LMSouq
moodle-core Open

How can I solve the ddl execute error on Moodle 3.8.4?

JO
John Pantelidis
1 month ago
3 views
Problem Description
I'm using Moodle 3.8.4 connected with the Azure Database for MySQL server. I'm trying to duplicate an activity by right-clicking on an activity and selecting Edit->Duplicate. [![duplicate_activity_moodle][1]][1] I've set the debugging mode to DEVELOPER, then I see the following error message: ``` > Unknown table 'learn_nprod.mdl_backup_ids_temp' DROP TABLE mdl_backup_ids_temp Error code: ddlexecuteerror * line 492 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown * line 1072 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end() * line 77 of /lib/ddl/database_manager.php: call to mysqli_native_moodle_database->change_database_structure() * line 332 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr() * line 171 of /backup/util/dbops/backup_controller_dbops.class.php: call to database_manager->drop_table() * line 40 of /backup/moodle2/backup_stepslib.php: call to backup_controller_dbops::drop_backup_ids_temp_table() * line 34 of /backup/util/plan/backup_execution_step.class.php: call to create_and_clean_temp_stuff->define_execution() * line 181 of /backup/util/plan/base_task.class.php: call to backup_execution_step->execute() * line 178 of /backup/util/plan/base_plan.class.php: call to base_task->execute() * line 119 of /backup/util/plan/backup_plan.class.php: call to base_plan->execute() * line 375 of /backup/controller/backup_controller.class.php: call to backup_plan->execute() * line 3530 of /course/lib.php: call to backup_controller->execute_plan() * line 3518 of /course/externallib.php: call to duplicate_module() * line 250 of /lib/externallib.php: call to core_course_external::edit_module() * line 79 of /lib/ajax/service.php: call to external_api::call_external_function() ``` Also, I discovered that the backup job is freezed to 0%: [![backup_job][2]][2] On Azure MySQL I changed the values from: > wait_timeout = 440, max_heap_table_size = 16777216, tmp_table_size = 16777216, innodb_strict_mode = ON To: > wait_timeout = 3600, max_heap_table_size = 2147483648, tmp_table_size = 536870912, innodb_strict_mode = OFF and I restarted the Azure MySQL Server. This action solved my issue only for some minutes. Are any suggestions to bypass this error? MySQL settings are on this <a href="https://1drv.ms/t/s!AmXFR_mi54aQg48VuH0hRC5ZAcYp-A?e=Bm5CXZ">link.</a> Update: I followed this <a href="https://tracker.moodle.org/browse/MDL-61478">solution</a>, which practically it not uses the temp tables however I don't understand why is this happening and also if it will have an impact on the DB. [1]: https://i.sstatic.net/zA2Zq.png [2]: https://i.sstatic.net/UfTZa.png

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base