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

Detect foreign tables in 2.3.x upgrade, print error and skip

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • 2.3.2
    • 2.3.1, 2.4
    • Database SQL/XMLDB
    • MOODLE_23_STABLE, MOODLE_24_STABLE
    • MOODLE_23_STABLE
    • w36_MDL-35080_m24_weirdtables
    • Hide

      1/ install Moodle 2.2 with 'mdl_' prefix
      2/ add bogus tables with names: 'mdl_111user', 'mdl_user-bak', 'mdl_userBak'
      3/ create with 'mdl_tableview' from any other table such as "create view mdl_tableview as select * from mdl_config"
      4/ expected warnings during upgrade to 2.3 or master branch:

      • Database table with invalid name 'mdl_111user' detected, skipping.
      • Database table with invalid name 'mdl_user-bak' detected, skipping.
      • Database table with invalid name 'mdl_userBak' detected, skipping.
      • Unsupported database table view 'mdl_tableview' detected, skipping.
      Show
      1/ install Moodle 2.2 with 'mdl_' prefix 2/ add bogus tables with names: 'mdl_111user', 'mdl_user-bak', 'mdl_userBak' 3/ create with 'mdl_tableview' from any other table such as "create view mdl_tableview as select * from mdl_config" 4/ expected warnings during upgrade to 2.3 or master branch: Database table with invalid name 'mdl_111user' detected, skipping. Database table with invalid name 'mdl_user-bak' detected, skipping. Database table with invalid name 'mdl_userBak' detected, skipping. Unsupported database table view 'mdl_tableview' detected, skipping.

    Description

      It is not allowed to add custom views or tables that are not defined in install.xml, these foreign tables must not use moodle database table prefix.

      Some admins and developers ignore this, we need to educate them and for now skip these tables during upgrade to 2.3.x

      In the future standalone db diagnostics scripts should detect this and warn admins.

      Attachments

        Activity

          People

            skodak Petr Skoda (Inactive)
            skodak Petr Skoda (Inactive)
            Aparup Banerjee Aparup Banerjee
            Michael de Raadt Michael de Raadt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Clockify

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.