Moodle
  1. Moodle
  2. MDL-25942

Using Oracle reserved word as Bind variable in upgrade.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.2
    • Component/s: Installation
    • Labels:
    • Environment:
      Oracle 11g
    • Rank:
      15874

      Description

      The moodle upgrade uses an oracle reserved word as as a bind variable. The reserved word is "view". This is a reserved word in both 10g and 11g. The given error is below:

      Debug info: ORA-01745: invalid host/bind variable name
      UPDATE m_role_capabilities SET capability = :participate WHERE capability = :view
      [array (
      'participate' => 'moodle/course:participate',
      'view' => 'moodle/course:view',
      )]
      Stack trace:

      • line 394 of \lib\dml\moodle_database.php: dml_write_exception thrown
      • line 268 of \lib\dml\oci_native_moodle_database.php: call to moodle_database->query_end()
      • line 947 of \lib\dml\oci_native_moodle_database.php: call to oci_native_moodle_database->query_end()
      • line 2829 of \lib\db\upgrade.php: call to oci_native_moodle_database->execute()
      • line 1309 of \lib\upgradelib.php: call to xmldb_main_upgrade()
      • line 252 of \admin\index.php: call to upgrade_core()

        Activity

        Hide
        Eloy Lafuente (stronk7) added a comment -

        sending to stable backlog fix should be easy, just replace reserved "view" placeholder name by "viewp" or whatever. Trivial but important to keep this as blocker.

        Thanks for the report, ciao

        Show
        Eloy Lafuente (stronk7) added a comment - sending to stable backlog fix should be easy, just replace reserved "view" placeholder name by "viewp" or whatever. Trivial but important to keep this as blocker. Thanks for the report, ciao
        Hide
        Eloy Lafuente (stronk7) added a comment -

        This has been fixed and will be reviewed and integrated by PULL-199.

        Thanks for the report! Ciao

        Show
        Eloy Lafuente (stronk7) added a comment - This has been fixed and will be reviewed and integrated by PULL-199. Thanks for the report! Ciao

          People

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

            Dates

            • Created:
              Updated:
              Resolved: