Moodle
  1. Moodle
  2. MDL-33821

Glossary database error after lots of recent activity

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Glossary
    • Labels:
    • Testing Instructions:
      Hide

      There are several ways of doing this - the easy way, the other mostly easy way, or the insane way.

      Easy way:

      • Open /mod/glossary/lib.php
        • change the GLOSSARY_RECENT_ACTIVITY_LIMIT to something very low, like 1

      Mostly easy way:

      Hard way:

      • Create at least 50 glossary entries in 5 minutes

      General Procedure

      • Open a course
        • Ensure that the Recent activity block is shown
      • Create a new glossary
      • Create lots of entries (At least GLOSSARY_RECENT_ACTIVITY_LIMIT)
      • View the course page
        • Confirm no errors were shown
      Show
      There are several ways of doing this - the easy way, the other mostly easy way, or the insane way. Easy way: Open /mod/glossary/lib.php change the GLOSSARY_RECENT_ACTIVITY_LIMIT to something very low, like 1 Mostly easy way: Take an existing glossary with at least 50 entries and export them (or use http://moodle.org/pluginfile.php/855/mod_glossary/attachment/6031/texfilter_glossary_en.xml ) Import them into a new glossary Hard way: Create at least 50 glossary entries in 5 minutes General Procedure Open a course Ensure that the Recent activity block is shown Create a new glossary Create lots of entries (At least GLOSSARY_RECENT_ACTIVITY_LIMIT) View the course page Confirm no errors were shown
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-33821-master-1
    • Rank:
      41908

      Description

      Just been adding glossary support to the jmeter load testing scripts. In doing so, I'm obviously generating quite a few glossary entries in a short space of time. As a result, I've hit a bug in glossary_print_recent_activity() with an invalid SQL query.

        Issue Links

          Activity

          Hide
          Andrew Nicols added a comment -

          Caused by changes to the sql construction in MDL-30482.

          Show
          Andrew Nicols added a comment - Caused by changes to the sql construction in MDL-30482 .
          Hide
          Andrew Nicols added a comment -

          The bug is only demonstrated if the recent activity block is shown

          Show
          Andrew Nicols added a comment - The bug is only demonstrated if the recent activity block is shown
          Hide
          Andrew Nicols added a comment -

          Only affects Moodle 2.3

          Show
          Andrew Nicols added a comment - Only affects Moodle 2.3
          Hide
          Michael de Raadt added a comment -

          Thanks for working on that, Andrew.

          Jason: I've added you here as a watcher. You might like to peer review this issue.

          Show
          Michael de Raadt added a comment - Thanks for working on that, Andrew. Jason: I've added you here as a watcher. You might like to peer review this issue.
          Hide
          Jason Fowler added a comment -

          Thanks for finding and fixing this Andrew, the fix looks good.

          Show
          Jason Fowler added a comment - Thanks for finding and fixing this Andrew, the fix looks good.
          Hide
          Michael de Raadt added a comment -

          Andrew: can you look at MDL-33707. I suspect it is a duplicate (or this is a duplicate, but anyway...). Is that the error you were seeing?

          Show
          Michael de Raadt added a comment - Andrew: can you look at MDL-33707 . I suspect it is a duplicate (or this is a duplicate, but anyway...). Is that the error you were seeing?
          Hide
          Dan Poltawski added a comment -

          Thanks Andrew, integrated this now.

          I've added the qa_test_required flag since I don't think we have any qa tests for recent activity block.

          Show
          Dan Poltawski added a comment - Thanks Andrew, integrated this now. I've added the qa_test_required flag since I don't think we have any qa tests for recent activity block.
          Hide
          Andrew Nicols added a comment -

          Michael, MDL-33707 was indeed the same bug. I couldn't find it when I looked yesterday. Have closed it now as a duplicate.

          Show
          Andrew Nicols added a comment - Michael, MDL-33707 was indeed the same bug. I couldn't find it when I looked yesterday. Have closed it now as a duplicate.
          Hide
          Andrew Nicols added a comment -

          Added an alternative replication method - importing the entries from an existing glossary

          Show
          Andrew Nicols added a comment - Added an alternative replication method - importing the entries from an existing glossary
          Hide
          Ankit Agarwal added a comment -

          Hi,
          Tried the 'easy way' and 'mostly easy way'
          Everything is working great. No errors encountered.
          Thanks for fixing this

          Thanks

          Show
          Ankit Agarwal added a comment - Hi, Tried the 'easy way' and 'mostly easy way' Everything is working great. No errors encountered. Thanks for fixing this Thanks
          Hide
          Eloy Lafuente (stronk7) added a comment -

          And this has been incorporated to all the weekly builds and also, to Moodle 2.3 Release Candidate 1, yay!

          Many, many thanks for your hard work!

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - And this has been incorporated to all the weekly builds and also, to Moodle 2.3 Release Candidate 1, yay! Many, many thanks for your hard work! Ciao
          Hide
          Helen Foster added a comment -

          I'm removing the qa_test_required label as we now have a QA test for the recent activity block: MDLQA-4601 Thanks for the suggestion Dan.

          If anyone thinks more QA tests are needed, please comment and re-add the qa_test_required label.

          Show
          Helen Foster added a comment - I'm removing the qa_test_required label as we now have a QA test for the recent activity block: MDLQA-4601 Thanks for the suggestion Dan. If anyone thinks more QA tests are needed, please comment and re-add the qa_test_required label.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: