Moodle
  1. Moodle
  2. MDL-16945

backuplib uses an Oracle reserved word as a table alias

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.3
    • Fix Version/s: 1.9.4
    • Component/s: Backup
    • Labels:
      None
    • Database:
      Oracle
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      30318

      Description

      'uid' is a reserved word on Oracle (see http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/ap_keywd.htm)

      Here is the problematic query in backuplib:

      SELECT uif.shortname, uif.datatype, uid.data
      FROM {$CFG->prefix}user_info_field uif,
      {$CFG->prefix}user_info_data uid
      WHERE uif.id = uid.fieldid
      AND uid.userid = $user->id

      A simple solution is to simply rename the uid alias to uidata. The attached patch does this.

        Issue Links

          Activity

          Hide
          Eloy Lafuente (stronk7) added a comment -

          Thanks F! Closing.

          Show
          Eloy Lafuente (stronk7) added a comment - Thanks F! Closing.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: