Note: You are currently viewing documentation for Moodle 2.0. Up-to-date documentation for the latest stable version is available here: error/moodle/ddlexecuteerror.

error/moodle/ddlexecuteerror

From MoodleDocs

This error indicates that an error occurred when the Moodle installer tried to run a SQL statement that makes changes to the Moodle database structure. This error will normally only occur during a Moodle installation or upgrade. It will also occur during backup if moodle database user has not sql privilege: create temporary tables.

To get more information about the error that caused this message you can enable the Debugging option in Moodle and then reattempt the Moodle installation. If the problem does occur again you will get a more detailed description of the problem. You can then use this information to report the problem to the Moodle developers via the Moodle Tracker, which is the database for recording and managing Moodle bugs, improvements and feature requests.

Technical Information

This error message is constructed by the ddl_change_structure_exception class in \lib\ddllib.php. This is a function that is used to trap errors that occur during Moodle database changes.

The error can be triggered from one of two places in Moodle:

  • The execute_sql() function in \lib\ddl\database_manager.php. This function is part of the database_manager class and is responsible for all database structure modifications.
  • The query_end() function in \lib\dml\moodle_database.php which is called immediately after each database query. It is a "cleanup" routine that forms part of the the Moodle database interface.

See also