Moodle
  1. Moodle
  2. MDL-34840

The fix for MDL-30515 broke the upgrade for PostgreSQL 8.3.17

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2.4
    • Fix Version/s: 2.2.5
    • Component/s: Database SQL/XMLDB
    • Labels:
      None
    • Testing Instructions:
      Hide

      1/ install 1.9 on postgresql 8.3.x
      2/ upgrade to 2.2.x
      3/ no problem expected

      Show
      1/ install 1.9 on postgresql 8.3.x 2/ upgrade to 2.2.x 3/ no problem expected
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE
    • Pull from Repository:
    • Rank:
      43345

      Description

      Hi,

      While testing an upgrade from 1.9.19+20120712 to 2.2.*, I noticed that upgrading to 2.2.4+20120802 worked while upgrading from 2.2.4+20120809 failed with the following error:

      > Default exception handler: Error reading from database Debug: ERROR: syntax error at or near "count"
      > LINE 1: ...newestid, contextid, lowerboundary, letter, COUNT('x') count
      > ^
      > SELECT MAX(id) as newestid, contextid, lowerboundary, letter, COUNT('x') count
      > FROM mdl_grade_letters
      > GROUP BY contextid, lowerboundary, letter
      > HAVING COUNT('x') > 1
      > [array (
      > )]

      By git-blaming, I quickly found that this code was added to fix MDL-30515 but unfortunately, it makes the ugprade fail on its own.

        Issue Links

          Activity

          Hide
          Petr Škoda added a comment -

          right, missing "AS"

          Show
          Petr Škoda added a comment - right, missing "AS"
          Hide
          Petr Škoda added a comment -

          Thanks a lot for the report.

          Show
          Petr Škoda added a comment - Thanks a lot for the report.
          Hide
          Dan Poltawski added a comment -

          Integrated, thanks

          Show
          Dan Poltawski added a comment - Integrated, thanks
          Hide
          Eloy Lafuente (stronk7) added a comment -

          For the good and the bad... this is now part of Moodle and people around the world will start using it immediately, what a responsibility!

          Many thanks for your collaboration, yay!

          Closing, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - For the good and the bad... this is now part of Moodle and people around the world will start using it immediately, what a responsibility! Many thanks for your collaboration, yay! Closing, ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved: