Moodle
  1. Moodle
  2. MDL-39588

Auto-detection if Oracle database used & info to run oci_native_moodle_package.sql

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5, 2.6
    • Fix Version/s: 2.5.1
    • Component/s: Installation
    • Labels:
      None
    • Database:
      Oracle
    • Testing Instructions:
      Hide

      1/ execute "drop PACKAGE MOODLELIB" in your oracel to remove the package
      2/ access your moodle server - the package should be created automatically if your user has enough rights
      3/ execute phpunit tests
      4/ somehow break the /lib/dml/oci_native_moodle_package.sql and "drop PACKAGE MOODLELIB"
      5/ access moodle - now you should get a general message complaining about missing package
      6/ execute oci_native_moodle_package.sql and everything should be back to normal
      7/ execute phpunit tests

      note: it is enough to execute only ddl and dml unit tests

      Show
      1/ execute "drop PACKAGE MOODLELIB" in your oracel to remove the package 2/ access your moodle server - the package should be created automatically if your user has enough rights 3/ execute phpunit tests 4/ somehow break the /lib/dml/oci_native_moodle_package.sql and "drop PACKAGE MOODLELIB" 5/ access moodle - now you should get a general message complaining about missing package 6/ execute oci_native_moodle_package.sql and everything should be back to normal 7/ execute phpunit tests note: it is enough to execute only ddl and dml unit tests
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull from Repository:
    • Pull 2.5 Branch:
      w23_MDL-39588_m25_ociinstall
    • Pull Master Branch:
      w23_MDL-39588_m26_ociinstall
    • Rank:
      50277

      Description

      Moodle Installation should include an auto-detection if a Oracle DB is used and if so, the user needs to be advised that oci_native_moodle_package.sql needs to be run before performing the installation / upgrade. Otherwise it leads to multiple errors https://moodle.org/mod/forum/discuss.php?d=228116.

      I know this is mentioned in the requirements, but the installer should integrate it as well.

        Activity

        Hide
        Petr Škoda added a comment -

        I have created a patch that tests the presence of support package on every connect and tries to install it automatically, if it fails the error message is displayed.

        This adds one extra query to some pages, performance is non-issue here because Oracle database is NOT suitable for any production Moodle servers...

        Thanks for the report.

        Show
        Petr Škoda added a comment - I have created a patch that tests the presence of support package on every connect and tries to install it automatically, if it fails the error message is displayed. This adds one extra query to some pages, performance is non-issue here because Oracle database is NOT suitable for any production Moodle servers... Thanks for the report.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        "to some pages" (only) ?

        It's being added to all connections!

        Why, instead, isn't this checked on install/upgrade...more yet, with some sort of versioning... to detect outdated packages in the future...?

        Show
        Eloy Lafuente (stronk7) added a comment - "to some pages" (only) ? It's being added to all connections! Why, instead, isn't this checked on install/upgrade...more yet, with some sort of versioning... to detect outdated packages in the future...?
        Hide
        Petr Škoda added a comment -

        It was already in most pages because it was inside get_session_lock().

        On install/upgrade is not enough because it errors out very early. Versioning will be done by using different package name, that was one of the reasons why I renamed the package name in 2.5

        Show
        Petr Škoda added a comment - It was already in most pages because it was inside get_session_lock(). On install/upgrade is not enough because it errors out very early. Versioning will be done by using different package name, that was one of the reasons why I renamed the package name in 2.5
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Integrated (25 & master), thanks!

        Show
        Eloy Lafuente (stronk7) added a comment - Integrated (25 & master), thanks!
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Wow, tested steps 1-6, Dan is going to run the DML/DDL tests.

        It took 2h45m here to install 25_STABLE form scratch. My VM is really old but it never has been soooo slow before.

        Show
        Eloy Lafuente (stronk7) added a comment - Wow, tested steps 1-6, Dan is going to run the DML/DDL tests. It took 2h45m here to install 25_STABLE form scratch. My VM is really old but it never has been soooo slow before.
        Hide
        Dan Poltawski added a comment -

        All the ddl/dml tests worked fine in the various combinations. Hurrah!

        Show
        Dan Poltawski added a comment - All the ddl/dml tests worked fine in the various combinations. Hurrah!
        Hide
        Dan Poltawski added a comment -
        Feature: Thanks to our superb contributors
          In order to make Moodle better
          As an integrator
          I need to thank all our contributors
        
          Scenario: Dan thanks you all
            Given I log in as "dan"
            And I see "lots of fixed issues"
            When I follow "Close integrated issues"
            Then I should see "Lots of thanks to all our contributors"
        

        Your changes are upstream

        Show
        Dan Poltawski added a comment - Feature: Thanks to our superb contributors In order to make Moodle better As an integrator I need to thank all our contributors Scenario: Dan thanks you all Given I log in as "dan" And I see "lots of fixed issues" When I follow "Close integrated issues" Then I should see "Lots of thanks to all our contributors" Your changes are upstream
        Hide
        Michael E added a comment -

        You guys are awesome for implementing this. Thank you!

        Show
        Michael E added a comment - You guys are awesome for implementing this. Thank you!

          People

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

            Dates

            • Created:
              Updated:
              Resolved: