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

mysql/mariadb dbcollation in config.php and other consistency checks

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 3.1.4, 3.2.1, 3.3
    • Fix Version/s: None
    • Component/s: Database SQL/XMLDB
    • Labels:

      Description

      This is a followup of MDL-48228, where support of utf8mb4 was added to mysql/mariadb.

      One of the differences is that, after the patch, new sites being installed from scratch get the dbcollation written to config.php, while that was not happening before (when everybody was utf8 and done). It has both ADVantages and PROblems:

      1) ADV: 1-less query per request. Having the collation in config.php makes moodle trust it 100% and a minimum of one query (against slow information schema) is saved on each request.
      2) PRO: In case of the dbcollation being changed (using our mysql_collation.php CLI, or any other strategy)... it's possible that the config.php becomes outdated and easily forget about t.

      So this is about:

      1) reconsider if we want to move new installations back to the initial proposal - aka, don't write the dbcollation to config.php ever, knowing it's 1-Q slower. That's exactly Adrian's patch. And it's how Moodle has been working since the born of the times.

      2) if we decide to continue with dbcollation written in config.php.. then we need some check (enviromental or health) detecting if file and real collations diverge at any point.

      And that's it. Would be interesting to have the outcome of this decided ASAP, so I'm raising its importance.

      Also, Adrian Greeve, would you please drag your patch from MDL-48228 here so everybody knows what we are talking about (getting rid of collation in config.php). TIA!

      Ciao

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated: