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

Error upgrading questions from 2007080903 to 2007081001

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9
    • Component/s: Questions, Quiz
    • Labels:
      None
    • Database:
      PostgreSQL, Microsoft SQL, Oracle
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      Upgrading to latest HEAD:

      I guess it's the AS keyword used under PG tables (http://docs.moodle.org/en/Coding#Database_structures point #11). Also some parenthesis seems unnecesary, but it shouldn't be a problem, I think.

      (postgres7): SELECT q.* FROM mdl_question as q LEFT JOIN (mdl_quiz_question_instances as qqi) ON (q.id = qqi.question) WHERE q.qtype='random' AND qqi.question IS NULL
      Warning: pg_exec(): Query failed: ERROR: syntax error at or near ")" at character 80 in /Users/stronk7/cvs_moodle/moodle_head/lib/adodb/drivers/adodb-postgres64.inc.php on line 780
      -1: ERROR: syntax error at or near ")" at character 80

      adodb_postgres7._execute(SELECT q.* FROM mdl_question as q LEFT JOIN (mdl_quiz_question_instances as qqi) ON (q.id = qqi.question) WHERE q.qtype='random'..., false) % line 891, file: adodb.inc.php
      adodb_postgres7.execute(SELECT q.* FROM mdl_question as q LEFT JOIN (mdl_quiz_question_instances as qqi) ON (q.id = qqi.question) WHERE q.qtype='random'...) % line 674, file: dmllib.php
      get_recordset_sql(SELECT q.* FROM mdl_question as q LEFT JOIN (mdl_quiz_question_instances as qqi) ON (q.id = qqi.question) WHERE q.qtype='random'..., , ) % line 918, file: dmllib.php
      get_records_sql(SELECT q.* FROM mdl_question as q LEFT JOIN (mdl_quiz_question_instances as qqi) ON (q.id = qqi.question) WHERE q.qtype='random'...) % line 107, file: upgrade.php
      question_delete_unused_random() % line 206, file: upgrade.php

      ERROR: syntax error at or near ")" at character 80

      SELECT q.* FROM mdl_question as q LEFT JOIN (mdl_quiz_question_instances as qqi) ON (q.id = qqi.question) WHERE q.qtype='random' AND qqi.question IS NULL

      • line 677 of lib/dmllib.php: call to debugging()
      • line 918 of lib/dmllib.php: call to get_recordset_sql()
      • line 107 of question/upgrade.php: call to get_records_sql()
      • line 206 of question/upgrade.php: call to question_delete_unused_random()
      • line 1723 of lib/db/upgrade.php: call to question_upgrade_context_etc()
      • line 324 of admin/index.php: call to xmldb_main_upgrade()

        Attachments

          Activity

            People

            Assignee:
            jamiesensei Jamie Pratt
            Reporter:
            stronk7 Eloy Lafuente (stronk7)
            Participants:
            Component watchers:
            Tim Hunt, Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Tim Hunt, Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              3/Mar/08