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

Adjust detection of trigger names under Oracle to allow more triggers to be added

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9.1
    • Component/s: Database SQL/XMLDB
    • Labels:
      None

      Description

      Current introspection into Oracle when looking for triggers and sequences is too much generic. In fact they are exclusive, causing problems if more triggers are added to one table.

      So the too much generic query:

      SELECT trigger_name, trigger_body
      FROM user_triggers
      WHERE table_name = '{$tablename}'

      is going to be changed to:

      SELECT trigger_name, trigger_body
      FROM user_triggers
      WHERE table_name = '{$tablename}'
      AND trigger_name like '{$this->prefix}_%ID%_TRG'

      That is a more accurate way to look for Moodle triggers on ID fields.

      Thanks to Francisco Marín for spotting this at: http://moodle.org/mod/forum/discuss.php?d=95777

      Ciao

        Attachments

          Activity

            People

            • Assignee:
              stronk7 Eloy Lafuente (stronk7)
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Jake Dallimore, Jun Pataleta, Ryan Wyllie
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/May/08