Database update failure.

Database update failure.

by Marc Stakey -
Number of replies: 1

Okay, I'm attempting to upgrade moodle to 2.3.3.  I have all of the other updates done I need to make it happy and now at the very end of all this "fun" I've had I am getting the following:

 

 

Debug info: Binary logging not possible. Message: Transaction level 'READ-COMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT'
CREATE UNIQUE INDEX mdl_coursect_cousec_uix ON mdl_course_sections (course, section)
Error code: ddlexecuteerror
Stack trace:
  • line 413 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown
  • line 803 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 88 of /lib/ddl/database_manager.php: call to mysqli_native_moodle_database->change_database_structure()
  • line 77 of /lib/ddl/database_manager.php: call to database_manager->execute_sql()
  • line 806 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
  • line 400 of /lib/db/upgrade.php: call to database_manager->add_index()
  • line 1481 of /lib/upgradelib.php: call to xmldb_main_upgrade()
  • line 275 of /admin/index.php: call to upgrade_core()
 
Hopefully someone has a solution to this that will help.
 
Thanks in advance for the help
Average of ratings: -
In reply to Marc Stakey

Re: Database update failure.

by Ken Task -
Picture of Particularly helpful Moodlers

Upgrade a Moodle from what version to 2.3.3?

Have not experienced this same error on any upgrades so far but the process used may not be same as the one used. This to say consider this 'food for thought' (or until a true MySQL DB admin with familiarity of Moodle DB corrects this).

First, backup the DB even if there is an issue right now.

Sometimes Google is your friend ... searching for that specific error up to and including the word 'STATEMENT' renders some hits with other apps and their solutions.   Such is what is below:

Locate the binlog_format property in this file in the [mysqld] section and ensure that its value is row, such that you end up with:

binlog_format=row

This is only needed (and valid) for MySQL versions 5.1.5 and later.

Restart mysqld service.

To check to see that change is in affect, from the mysql> prompt:

show variables like 'binlog_format';

'spirit of sharing', Ken

Average of ratings: Useful (1)