Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-47005

We should trap BINLOG_FORMAT = STATEMENT on the environment check page

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.6.4, 2.7.1
    • Fix Version/s: BACKEND
    • Component/s: Installation
    • Labels:
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE

      Description

      Reports like https://moodle.org/mod/forum/discuss.php?d=267888 are fairly common.

      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_question_usages (contextid,component,preferredbehaviour) VALUES(?,?,?)
      [array (
      0 => '182',
      1 => 'mod_quiz',
      2 => 'deferredfeedback',
      )]
      Error code: dmlwriteexception
      Stack trace:
      line 444 of /lib/dml/moodle_database.php: dml_write_exception thrown
      line 1080 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 1122 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
      line 86 of /question/engine/datalib.php: call to mysqli_native_moodle_database->insert_record()
      line 100 of /question/engine/lib.php: call to question_engine_data_mapper->insert_questions_usage_by_activity()
      line 272 of /mod/quiz/locallib.php: call to question_engine::save_questions_usage_by_activity()
      line 185 of /mod/quiz/startattempt.php: call to quiz_attempt_save_started()
      

      Surely we can trap this case on the environment check page, and give clear information about what people should change, before they get random errors with Moodle.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            timhunt Tim Hunt
            Participants:
            Component watchers:
            Matteo Scaramuccia, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: