DB error in upgrade moodle 2.6 to 2.6.1

DB error in upgrade moodle 2.6 to 2.6.1

by Amiad B -
Number of replies: 2

I try to upgrade to 2.6.1. I replace the files and started the upgrade but in the finish I get error:

Debug info: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.
INSERT INTO mdl_context (contextlevel, instanceid)
 SELECT 30, u.id
 FROM mdl_user u
 WHERE u.deleted = 0
 AND NOT EXISTS (SELECT 'x'
 FROM mdl_context cx
 WHERE u.id = cx.instanceid AND cx.contextlevel=30)
[array (
)]
Error code: dmlwriteexception

Stack trace:

    line 444 of /lib/dml/moodle_database.php: dml_write_exception thrown

    line 886 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()

    line 6394 of /lib/accesslib.php: call to mysqli_native_moodle_database->execute()

    line 5884 of /lib/accesslib.php: call to context_user::create_level_instances()

    line 1551 of /lib/upgradelib.php: call to context_helper::create_instances()

    line 356 of /admin/index.php: call to upgrade_core()

I use Ubuntu 13.10, nginx 1.4.1, PHP 5.5.3-1, MariaDB 5.5.34.

What the problem and which I can solve its?

Average of ratings: -
In reply to Amiad B

Re: DB error in upgrade moodle 2.6 to 2.6.1

by jason everling -

Shutdown MySQL Server, Seems you have a variable in your MySQL Configuation.

Edit my.cnf or my.ini

change

binlog_format = statement

to

binlog_format=ROW

StartUp MySQL Server

Reason,

the transaction isolation level is READ-COMMITTED which in innodb is not safe for the binlog_format=statement

http://dev.mysql.com/doc/refman/5.5/en/set-transaction.html

"If you use READ COMMITTED or enable innodb_locks_unsafe_for_binlog, you must use row-based binary logging"

Thanks,

JASON

Average of ratings: Useful (3)
In reply to jason everling

Re: DB error in upgrade moodle 2.6 to 2.6.1

by Amiad B -

Thanks. The problem is solved and I was upgraded my site.