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

Error from the quiz participation reports on MySQL because of subtracting two unsigned columns

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.3
    • Component/s: Quiz
    • Labels:
      None
    • Environment:
      Windows; MySQL 5.5.9;
    • Database:
      MySQL
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Same problem as http://tracker.moodle.org/browse/MDL-26416, except the error occurs in the "Response" section of the quiz results.

      Debug info: BIGINT UNSIGNED value is out of range in '(`xxx`.`qa`.`timefinish` - `xxx`.`qa`.`timestart`)'
      SELECT CONCAT(u.id, '#', COALESCE(qa.attempt, 0)) AS concattedid, qa.uniqueid, qa.id AS attempt, u.id AS userid, u.idnumber, u.firstname, u.lastname, u.institution, u.department, u.email, u.picture, u.imagealt, qa.sumgrades, qa.timefinish, qa.timestart, qa.timefinish - qa.timestart AS duration, qa.layout FROM mdl_user u LEFT JOIN mdl_quiz_attempts qa ON qa.userid = u.id AND qa.quiz = ? WHERE qa.id IS NOT NULL AND qa.preview = 0 ORDER BY concattedid ASC LIMIT 0, 30

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              timhunt Tim Hunt added a comment -

              Thanks for the report, and sorry for missing this before.

              Pull request done, so the fix should be in the next weekly build.

              Show
              timhunt Tim Hunt added a comment - Thanks for the report, and sorry for missing this before. Pull request done, so the fix should be in the next weekly build.
              Hide
              tsala Helen Foster added a comment -

              Confirming that the fix is included in the latest 2.0.2+.

              Show
              tsala Helen Foster added a comment - Confirming that the fix is included in the latest 2.0.2+.
              Hide
              colin Colin Campbell added a comment -

              This appears to not actually be fixed. We got this "BIGINT UNSIGNED value is out of range" error, so I checked the code and it appears that the original duration calculation was never deleted. Just above the CASE statement added by commit c159b070 is the original "qa.timefinish - qa.timestart AS duration". Consequently, the error still occurs.

              Show
              colin Colin Campbell added a comment - This appears to not actually be fixed. We got this "BIGINT UNSIGNED value is out of range" error, so I checked the code and it appears that the original duration calculation was never deleted. Just above the CASE statement added by commit c159b070 is the original "qa.timefinish - qa.timestart AS duration". Consequently, the error still occurs.
              Hide
              timhunt Tim Hunt added a comment -

              Wierd. How did that get through review? Anyway, it is already fixed in 2.1 and 2.2. And, in Moodle 2.3 they finally got rid of the stupidity that is unsigned columns. Yay!

              So, if this is causing you problems in 2.0.x, then upgrade, or just delete that line. Moodle 2.0 is no longer getting bug fixes.

              Show
              timhunt Tim Hunt added a comment - Wierd. How did that get through review? Anyway, it is already fixed in 2.1 and 2.2. And, in Moodle 2.3 they finally got rid of the stupidity that is unsigned columns. Yay! So, if this is causing you problems in 2.0.x, then upgrade, or just delete that line. Moodle 2.0 is no longer getting bug fixes.

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    5/May/11