Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 407605 - www-apps/moodle-2.2.1-r1 - default mysql configuration does not work
Summary: www-apps/moodle-2.2.1-r1 - default mysql configuration does not work
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL: http://tracker.moodle.org/browse/MDL-...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-03-10 01:47 UTC by Jan Vandermeer
Modified: 2012-03-12 19:38 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Vandermeer 2012-03-10 01:47:57 UTC
Not sure if this is the right place. Following through the steps of the 'webapp-config -d moodle -I moodle 2.2.1-r1'. At step 3 Click "Yes" to continue. Installation begins but throws a 

"Debug info: Binary logging not possible. Message: Transaction level 'READ-COMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT'
INSERT INTO mdl_config_plugins (plugin,name,value) VALUES(?,?,?)
[array (
 0 => 'message',
 1 => 'email_provider_moodle_notices_permitted',
 2 => 'permitted',
)]
Stack trace: 
line 397 of /lib/dml/moodle_database.php: dml_write_exception thrown
line 893 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 935 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
line 699 of /lib/db/upgradelib.php: call to mysqli_native_moodle_database->insert_record()
line 6527 of /lib/db/upgrade.php: call to upgrade_populate_default_messaging_prefs()
line 1432 of /lib/upgradelib.php: call to xmldb_main_upgrade()
line 277 of /admin/index.php: call to upgrade_core()"

and recommends that the database be reinstalled. I did this several times downgrading each time and ended up doing a successful install with moodle-2.0.7-r1. I then tried to upgrade by copying the tgz to the moodle directory, only to have it throw the same error.

I googled on several search terms and finally came up with James Logan:

"Adding the following line to the [mysqld] section of my.cnf in mysql v5.5.20 did solve the problem:
 binlog_format = 'ROW'
First added the following line, but this did not fix the problem by itself:
 transaction-isolation = 'SERIALIZABLE' from <http://tracker.moodle.org/browse/MDL-31478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel#issue-tabs>"

Which fixed the problem after I restarted mysql.

I guess the question is: how does the ebuild take into account this change to my.cnf that allows moodle to install without user intervention?
Comment 1 Anthony Basile gentoo-dev 2012-03-12 19:38:33 UTC
> I guess the question is: how does the ebuild take into account this change
> to my.cnf that allows moodle to install without user intervention?

Thanks for the report.  The ebuild cannot take into account what's in your my.cnf.  1) Touching your my.cnf would be out of the question and a QA issue for sure.  2) Parsing it would be a pita.

Here's what I can do.  If you attach a reduced copy of your my.cnf that works with little in the way of "extras", I can add it to the moodle docs in /usr/share/docs as an example my.cnf file.  Or course, scrub it of any sensitive details.  Any other example files you want, I can also add there.


> Not sure if this is the right place.

I'm always happy to help even if you "post in the wrong place".  This is in that grey area between a support question and a bug.  For support questions, use the forums because they have much more exposure to our users.  But even if you post here and it should go to the forums, we'll just move the conversation there.