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

ORA error: infinite loop when restoring courses!

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.7.1, 1.8
    • Fix Version/s: 1.7.3, 1.8.3, 1.9
    • Component/s: Database SQL/XMLDB
    • Labels:
      None
    • Environment:
      Solaris 10,
      Oracle 10g,
      Firefox 2.0.0.2,
      Developer messages on
    • Database:
      Oracle
    • URL:
      /backup/restore.php
    • Affected Branches:
      MOODLE_17_STABLE, MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      We have made a course backup on a 1.7.1-mysql-windows-system and uploaded the zip file to our new 1.7.1-oracle-solaris-system!

      We started the restore process and got some ora errors (we create different issues for them!) and an infinite loop when the system wants to create the gradebook (categories, preferences, letters) - please take a look at the screenshot...

      We have found a solution, but we're not quite sure, if its raising other issues... (...we haven't noticed yet...):
      At line 1198

      //Process preferences
      if ($preferencescount && $continue) {
      if (!defined('RESTORE_SILENTLY'))

      { echo '<li>'.get_string('preferences','grades').'</li>'; }

      $counter = 0;
      while ($counter < $preferencescount) {
      //Fetch recordset_size records in each iteration
      $recs = get_records_select("backup_ids","table_name = 'grade_preferences' AND backup_code = '$restore->backup_unique_code'",
      "old_id",
      "old_id, old_id",
      $counter,
      $recordset_size);

      change "old_id, old_id", to only one "old_id",

      Do the same at lines 1252 and 1302...

      Heres the better readable error message again:

      Creating gradebook

      • Preferences
        ORA-00960: In der SELECT-Liste ist eine nicht eindeutige Spalte

      SELECT old_id, old_id FROM m_backup_ids WHERE table_name = 'grade_preferences' AND backup_code = '1177587671' ORDER BY old_id

      ORA-00960: In der SELECT-Liste ist eine nicht eindeutige Spalte

      SELECT old_id, old_id FROM m_backup_ids WHERE table_name = 'grade_preferences' AND backup_code = '1177587671' ORDER BY old_id

      ORA-00960: In der SELECT-Liste ist eine nicht eindeutige Spalte

      SELECT old_id, old_id FROM m_backup_ids WHERE table_name = 'grade_preferences' AND backup_code = '1177587671' ORDER BY old_id

      ORA-00960: In der SELECT-Liste ist eine nicht eindeutige Spalte
      .........

        Attachments

          Activity

            People

            Assignee:
            stronk7 Eloy Lafuente (stronk7)
            Reporter:
            protzek D P
            Tester:
            Nobody
            Participants:
            Component watchers:
            Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              11/Oct/07