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

Summary of Violated Foreign Key Constraints from 700+ Moodles

    Details

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

      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

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              poltawski Dan Poltawski added a comment -

              Adding some watchers

              Show
              poltawski Dan Poltawski added a comment - Adding some watchers
              Hide
              skodak Petr Skoda 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
              skodak Petr Skoda 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
              timhunt Tim Hunt added a comment -

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

              Show
              timhunt Tim Hunt added a comment - I'm making sub-tasks for some of the worst ones.
              Hide
              timhunt 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
              timhunt 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
              timhunt Tim Hunt added a comment -

              Quiz_question_versoins is gone in HEAD.

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

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

              Show
              poltawski Dan Poltawski added a comment - Tim: created a subtask MDL-17636 - pretty conclusively backup/restore issue.
              Hide
              stronk7 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
              stronk7 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:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated: