Moodle
  1. Moodle
  2. MDL-17623

Summary of Violated Foreign Key Constraints from 700+ Moodles

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Database SQL/XMLDB
    • Labels:
      None
    • Environment:
      MySQL, 1.9.3
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_20_STABLE
    • Rank:
      2263

      Description

      I have run the report testing for violated foreign key constraints on all our 730+ production moodles.

      I've collated all the violated constrains using (http://cvs.moodle.org/contrib/tools/devtools/xmldb_refintegreport.php) and then aggregated all the data from all the moodles and produced a summary report which is attached.

      As you can see the grade-book is the major offender here.

      This data is from quite a wide cross section of sites, from heavy users upgraded from external hosts on < Moodle 1.4, to brand new installs on 1.9.3. (All are now on 1.9.3).

      230ish didn't have any violated constraints at all

        Issue Links

          Activity

          Hide
          Dan Poltawski added a comment -

          Adding some watchers

          Show
          Dan Poltawski added a comment - Adding some watchers
          Hide
          Petr Škoda added a comment -

          Yes, there was a bug in gradebook that was causing bazillion of bogus grade_grades entries
          unfortunately automatic cleanup is not easy

          Show
          Petr Škoda added a comment - Yes, there was a bug in gradebook that was causing bazillion of bogus grade_grades entries unfortunately automatic cleanup is not easy
          Hide
          Tim Hunt added a comment -

          I'm making sub-tasks for some of the worst ones.

          Show
          Tim Hunt added a comment - I'm making sub-tasks for some of the worst ones.
          Hide
          Tim Hunt added a comment -

          Right, I have done subtasks for all the ones with >= 25 affected Moodles.

          Dan, could you look at some sample rows for question.modifiedby and question.createdby. My guess is that either these are 0 where it should be NULL, or backup/restore problems.

          Show
          Tim Hunt added a comment - Right, I have done subtasks for all the ones with >= 25 affected Moodles. Dan, could you look at some sample rows for question.modifiedby and question.createdby. My guess is that either these are 0 where it should be NULL, or backup/restore problems.
          Hide
          Tim Hunt added a comment -

          Quiz_question_versoins is gone in HEAD.

          Show
          Tim Hunt added a comment - Quiz_question_versoins is gone in HEAD.
          Hide
          Dan Poltawski added a comment -

          Tim: created a subtask MDL-17636 - pretty conclusively backup/restore issue.

          Show
          Dan Poltawski added a comment - Tim: created a subtask MDL-17636 - pretty conclusively backup/restore issue.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          This issue was assigned to me automatically, however I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue.

          For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment

          Show
          Eloy Lafuente (stronk7) added a comment - This issue was assigned to me automatically, however I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue. For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: