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

Register Moodle fails with "Error reading from database (backport of MDL-34072, MDL-34440)

    Details

    • Database:
      Oracle
    • Testing Instructions:
      Hide

      0. This fix is only for 22_STABLE. DEBUG_DEVELOPER and display errors recommended.

      1. For each DB flavor (mysql, postgresql, mssql and oracle)...
      1.1. Install one site.
      1.2. Proceed with registration.
      1.2. TEST: No error happen and the registration ends ok.
      2. Yay!

      Show
      0. This fix is only for 22_STABLE. DEBUG_DEVELOPER and display errors recommended. 1. For each DB flavor (mysql, postgresql, mssql and oracle)... 1.1. Install one site. 1.2. Proceed with registration. 1.2. TEST: No error happen and the registration ends ok. 2. Yay!
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE
    • Pull from Repository:

      Description

      Clicking on the Register Site with Mooches button under the registration tab generates a "Error reading from Database" message.

      Apache Error log shows this:

      Default exception handler: Error reading from database Debug: ORA-00933: SQL command not properly ended
      SELECT COUNT(*) FROM (
             SELECT DISTINCT ue.userid, e.courseid
             FROM m_user_enrolments ue, m_enrol e, m_course c
             WHERE ue.enrolid = e.id
                 AND e.courseid <> :o_siteid
                 AND c.id = e.courseid
                 AND c.visible = 1) as total
      [array (
        'o_siteid' => '1',
      )]
      * line 391 of /lib/dml/moodle_database.php: dml_read_exception thrown
      * line 268 of /lib/dml/oci_native_moodle_database.php: call to moodle_database->query_end()
      * line 1093 of /lib/dml/oci_native_moodle_database.php: call to oci_native_moodle_database->query_end()
      * line 1270 of /lib/dml/moodle_database.php: call to oci_native_moodle_database->get_records_sql()
      * line 1029 of /lib/dml/oci_native_moodle_database.php: call to moodle_database->get_record_sql()
      * line 1345 of /lib/dml/moodle_database.php: call to oci_native_moodle_database->get_record_sql()
      * line 1516 of /lib/dml/moodle_database.php: call to moodle_database->get_field_sql()
      * line 3838 of /course/lib.php: call to moodle_database->count_records_sql()
      * line 371 of /admin/registration/forms.php: call to average_number_of_participants()
      * line 153 of /lib/formslib.php: call to site_registration_form->definition()
      * line 59 of /admin/registration/register.php: call to moodleform->moodleform(), referer: https://moodle.umass.edu/admin/registration/index.php

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  4 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    12/Nov/12