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

Problems with MySQL 5.5.8 and viewing assignments

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Duplicate
    • Affects Version/s: 1.9.12, 2.0
    • Fix Version/s: None
    • Component/s: Assignment (2.2)
    • Environment:
      MySQL 5.5.8
      PHP 5.3.4
    • Database:
      MySQL
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      When a teacher checks on assignments in a course they see "view 1 submitted assignment" Clicking on it causes a database error.
      Warning: mysqli::query() [mysqli.query]: (22003/1690): BIGINT UNSIGNED value is out of range in '(`moodle2`.`s`.`timemarked` - `moodle2`.`s`.`timemodified`)' in C:\xampp\htdocs\moodle2\lib\dml\mysqli_native_moodle_database.php on line 774
      A number of "fixes" have been suggested including a mod to my.ini
      I have found that a fix orginally suggested by Pino Calambrogio aimed at 1.9 worked wonders

      COALESCE(SIGN(SIGN(s.timemarked) + SIGN(s.timemarked - s.timemodified)), 0) AS status ';

      in the forums and you should find a discussion by Pino Calambrogio that refers to editing \mod\assignment\lib.php to this...

      COALESCE(SIGN(CAST(s.timemarked as SIGNED) + SIGN(CAST(s.timemarked as SIGNED) - CAST(s.timemodified as SIGNED))), 0) AS status ';

      I applied the modification in two (2) places in that file and it SEEMS to be OK now. I suspect this is a bug with the version of MySQL.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              blepoxp Glenn Ansley
              Reporter:
              stuartcox100 Stuart Cox
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              10 Vote for this issue
              Watchers:
              14 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: